Sunday, July 25, 2010

ABAP: Display table in long text of message

Sometimes we need to pass a table alongwith the message longtext.
It's simple but with a small catch , we need to pass the table as we are using 'Script'.
Sample code:
Call FM : RKE_POPUP_TEXT_DECIDE_VARTEXT
Data : L_TEXTTAB LIKE TLINE OCCURS 0 WITH HEADER LINE,
L_TEXTTAB-TDFORMAT = 'AS'.
LOOP AT itab.
l_TEXTTAB-TDLINE = itab-value.
CONDENSE L_TEXTTAB-TDLINE.
APPEND L_TEXTTAB.
L_TEXTTAB-TDFORMAT = '/'.
ENDLOOP.
Pass l_textab as TABLES
T_TEXTTAB = L_TEXTTAB.
pass &T& in the long text as command.

No comments:

Post a Comment