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.
Always use Pretty Printer and Extended Program Check before releasing the code.
Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive.
No comments:
Post a Comment