Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata
How to pass internal tables(text) in long text for a message.

Call FM  : RKE_POPUP_TEXT_DECIDE_VARTEXT with tables T_TEXTTAB.

You may build the T_TEXTTAB as below: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.

Additionally create a message in the desired message class and in the long text use &T& as a Symbol where you want to print the text table built as above.

Sample code:

REPORT  ztest .

DATA : l_texttab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA itab TYPE TABLE OF mara WITH HEADER LINE.

SELECT * FROM mara INTO TABLE itab UP TO 10 ROWS.

  l_texttab-tdformat = 'AS'.
  LOOP AT itab.
    l_texttab-tdline = itab-matnr.
    CONDENSE l_texttab-tdline.
    APPEND l_texttab.
    l_texttab-tdformat = '/'.
  ENDLOOP.

  CALL FUNCTION 'RKE_POPUP_TEXT_DECIDE_VARTEXT'
    EXPORTING
*   OPTIONS              = ''
      object_id            = 'NA'
      object               = 'ZTEST_SANDEEP000'
     na_shorttext         = 'Test'
     titel                = 'Test'
* IMPORTING
*   ANSWER               =
   TABLES
*   T_PARAMS             =
     t_texttab            = l_texttab
* EXCEPTIONS
*   DOCU_NOT_FOUND       = 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.

Regards,

Sandeep