‎2007 May 15 6:55 PM
HALLOW
i have internal table (person_tab) and i wont convert it to
<b>xtring</b>
how can i do that?
<b>plz give example</b>
best regards.
TYPES : BEGIN OF 1_itab,
werks TYPE persa,
persg TYPE persg,
persk TYPE persk,
orgeh TYPE orgeh,
stell TYPE stell,
lastname TYPE pad_nachn,
firstname TYPE pad_vorna,
stdaz TYPE enstd,
btrtl TYPE btrtl,
name1 TYPE pbtxt,
btext TYPE btrtx,
perid TYPE prdni,
END OF 1_itab.
DATA : person_tab TYPE TABLE OF 1_itab,
wa_person_tab LIKE LINE OF <b>person_tab</b>
‎2007 May 15 7:02 PM
Hi
Declare another internal table with a single field STRING(200).
data : begin of itab1 occurs 0,
string(200),
end of itab1,
str(200).
loop at person_tab.
concatenate person_tab-werks person_tab-persg person_tab-persk
person_tab-orgeh person_tab-stell person_tablastname person_tab-firstname
...................into str separated by ','.
move str to itab1-string.
append itab1.
clear itab1.
endloop.
Reward points if useful
Regards
Anji
‎2007 May 15 7:02 PM
Hi
Declare another internal table with a single field STRING(200).
data : begin of itab1 occurs 0,
string(200),
end of itab1,
str(200).
loop at person_tab.
concatenate person_tab-werks person_tab-persg person_tab-persk
person_tab-orgeh person_tab-stell person_tablastname person_tab-firstname
...................into str separated by ','.
move str to itab1-string.
append itab1.
clear itab1.
endloop.
Reward points if useful
Regards
Anji
‎2007 May 15 7:05 PM
hi anji
i wont to convert to xstring there is no function that can do that?
regards
‎2007 May 15 7:22 PM
Hi,
Please try this combination FM.
SOTR_SERV_TABLE_TO_STRING
SCMS_STRING_TO_XSTRING or SCMS_FTEXT_TO_XSTRING
Regards,
Ferry Lianto
‎2007 May 15 7:58 PM
hi ferry
u can give me example how to use this function becose
icant import to them table and get string (export)
regards
‎2007 May 15 8:09 PM
Hi,
Please try this.
data: l_text type string.
types: begin of text_table,
line type sotr_txt,
end of text_table.
data: l_text_tab type table of text_table.
data: l_xstring_data type string.
...
call function 'SOTR_SERV_TABLE_TO_STRING'
exporting
line_length = gl_linewidth
langu = p_langu
importing
text = l_text
tables
text_tab = l_text_tab.
call function 'SCMS_STRING_TO_XSTRING'
exporting
text = l_text
importing
buffer = l_xstring_data
exceptions
failed = 1
others = 2
...
Regards,
Ferry Lianto
‎2007 May 15 8:13 PM
hi ferry
thankes for your time
but that is what i dont understand how i use here in fm
my table <b>person_tab</b>
best regards