Monday, May 26, 2008

ABAP Custom Text Editor Pop UP

ABAP Custom Text Editor Pop UP

If you wish to PopUp a Text Editor to your users this can be done by using the following function Module.

TERM_CONTROL_EDIT

This is useful in module pool programming when the user wants to enter some text either directly or via a text file from the presentation server. It can also be used to PopUp a screen for the users to enter some text in any of the business objects that needs to be exported to another business object or to an external system.

Please find the code below.

REPORT ZEX_MINITEXTEDITOR .

Parameters: P_title(10).

Data: Begin of int_text occurs 0,
      Text(100),
      End of int_text.



CALL FUNCTION 'TERM_CONTROL_EDIT'
 EXPORTING
   TITEL                = P_title
   LANGU                = 'E'
  TABLES
    TEXTLINES            = int_text
 EXCEPTIONS
   USER_CANCELLED       = 1
   OTHERS               = 2
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.




No comments:

Post a Comment