HI kevin,
Please try this combination FM.
SOTR_SERV_TABLE_TO_STRING
SCMS_STRING_TO_XSTRING or SCMS_FTEXT_TO_XSTRING
At the end of this data would be in xstring.
For reverse process :
HR_KR_XSTRING_TO_STRING - converting to string
for converting from string to internal table. You can code it like
This is a sample code of mine
CONSTANTS:
max TYPE i VALUE 15.
DATA:
lv_string TYPE string,
lv_sum TYPE i,
lv_txt1(co_max) TYPE c,
lt_txt1 LIKE TABLE OF lv_txt1,
lv_len1 TYPE i,
lv_txt2(co_max) TYPE c,
lt_txt2 LIKE TABLE OF lv_txt2,
lv_len2 TYPE i.
lv_string = 'WHERE BNAME = ''SFLIGHT*'' AND CONNID = ''AA'''.
SPLIT lv_string AT ' ' INTO TABLE lt_txt1.
LOOP AT lt_txt1 INTO lv_txt1.
lv_len1 = strlen( lv_txt1 ).
ASSERT lv_len1 <= max.
lv_len2 = strlen( lv_txt2 ).
lv_sum = lv_len1 + lv_len2 + 1.
IF lv_sum <= max.
CONCATENATE lv_txt2 lv_txt1 INTO lv_txt2 SEPARATED BY ' '.
CONDENSE lv_txt2.
ELSE.
APPEND lv_txt2 TO lt_txt2.
lv_txt2 = lv_txt1.
ENDIF.
ENDLOOP.
APPEND lv_txt2 TO lt_txt2.
LOOP AT lt_txt2 INTO lv_txt2.
WRITE: / lv_txt2.
ENDLOOP.
Regards,
Sivaganesh