Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Internal tab to be converted into XSTRING format

Hi all

can u pls help me to convert a standard internal table into a XSTRING Format

Former Member
Former Member replied

Try somthing like that

DATA : GT_TABLE TYPE TABLE OF CHAR20,

GS_TABLE TYPE CHAR20,

GV_XSTRING TYPE XSTRING,

GV_XLINE TYPE XSTRING.

START-OF-SELECTION.

CLEAR : GT_TABLE ,GS_TABLE,GV_XSTRING.

DO 10 TIMES.

GS_TABLE = 'ABCDEFGHIJKLMNOPRST'.

APPEND GS_TABLE TO GT_TABLE.

ENDDO.

LOOP AT GT_TABLE Into GS_TABLE.

CONVERT TEXT GS_TABLE INTO SORTABLE CODE GV_XLINE.

CONCATENATE GV_XLINE GV_XSTRING INTO GV_XSTRING IN BYTE MODE.

ENDLOOP.

Write GV_XSTRING.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question