Saturday, March 19, 2011

TERM_CONTROL_EDIT function module


This is a useful function module that can be used in Reports. Whenever you would like to capture free text or for that would like to have a text editor, this function module would give all that. It saves much time instead of creating a subscreen or for that using modular programming

Having said please note that the function module is not released as of ECC6.0 and no documentation is available. Interestingly, its only used in one include program so far. I am providing a sample program which will help us understand more on this function module:


REPORT ZASOKA.

Parameters: P_titel(10).

Data: longtext LIKE tline-tdline OCCURS 0 WITH HEADER LINE.



CALL FUNCTION 'TERM_CONTROL_EDIT'
EXPORTING
TITEL = P_titel
LANGU = 'E'
TABLES
TEXTLINES = longtext
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.
loop at longtext.

write:/ longtext.

endloop.On the output screen , you should be seeing the following screens.Well,it’s a useful utility function module that can be used by everyone.


No comments:

Post a Comment