‎2008 Jul 22 9:18 AM
Hello,
I have a short question. I have created a table with lines of strings.
Now I want to convert these lines of the table to one string.
What is the easiest way to create one string with the entries of the table?
Regards
Philipp
‎2008 Jul 22 9:21 AM
hi Philipp,
something like this:
LOOP AT itab INTO wa.
CONCATENATE string wa INTO string SEPARATED BY space.
ENDLOOP.From Release 6.0 you can also use:
CONCATENATE LINES OF itab INTO string SEPARATED BY space.hope this helps
ec
‎2008 Jul 22 9:21 AM
hi Philipp,
something like this:
LOOP AT itab INTO wa.
CONCATENATE string wa INTO string SEPARATED BY space.
ENDLOOP.From Release 6.0 you can also use:
CONCATENATE LINES OF itab INTO string SEPARATED BY space.hope this helps
ec
‎2008 Jul 22 9:22 AM
hi,
data: v_string type string.
loop at itab into wa.
concatenate v_string into wa-string separated by space.
endloop.
*this is to remove the space in front of the string
condense v_string.
regards,
Peter
‎2008 Jul 22 9:23 AM
hi,
If i have understood your question correctly. You take an internal with single character string with 1000 length.
types : begin of ty_string,
string(1000),
end of ty_string.
data : it_string type standard table of ty_string.
loop at itab into wa_string.
cocatenate wa_string-field1 wa_string-field2 wa_string-field3 ....into it_string.
append it_string.
clear it_string.
endloop.
‎2008 Jul 22 9:26 AM
hiii
you can use a loop.then take every line of table in one variable and concatenate that variable in one another variable which is having string data type..
like below
SELECT string FROM ztable
INTO TABLE i_table.
loop at i_table.
wa_string = wa_table.
CONCATENATE wa_string into wa_longtext.
endloop.regards
twinkal