Register Login

TERM_CONTROL_EDIT (Editor window) ABAP Custom Text Editor Pop UP

Updated May 18, 2018

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

TERM_CONTROL_EDIT (Editor window)

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).  " Enter any name for the text editor

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.

The following is the text editor generated after executing the program.  Enter the data and the

Data is captured in int_text table in the program

Thanks & Regards,


Comments

  • 27 Oct 2012 11:15 am Guest
    When you press 'enter' (in order to go to next line) the editor transferes it in the second
    row of the table.. Is there a way to avoid this ? In other words... to make the editor
    write the whole text in one specific row of the table and not to change the line each time we press enter ?

×