‎2009 May 14 9:12 AM
Hello
I'm looking for a standard way to get a string out of a long text table (tline table).
I get the long text by using the read_text function, and it returns a table that contains the text, with the format column. I need a function that gets this table and returns a formatted string.
Please tell me if there's a standard way of doing this.
Best regards,
Udi.
‎2009 May 14 9:20 AM
HI try this,
After the READ_TEXT, say data is in internal table it_tline.
data : v_text type string.
loop at it_tline.
concatenate v_text it_tline-tdline into v_text seperated by space.
endloop.
write v_text.
‎2009 May 14 9:21 AM
What about 'CONVERT_ITF_TO_STREAM_TEXT'
Edited by: Micky Oestreich on May 14, 2009 10:21 AM
‎2009 May 14 9:38 AM
Hi Udi ,
You need to loop the internal table that fetches record from the table type TLINE.
After that you need to concatenate the field string value into a variable type STRING.
DATA : t_itab LIKE TABLE OF tline,
fs_itab LIKE LINE OF t_itab,
w_string TYPE string , " To hold Continous text
SELECT .......
LOOP AT t_itab INTO fs_itab.
CONCATENATE fs_itab-tdline w_string INTO w_string. " Concatenate to get it continous
ENDLOOP.
WRITE : w_string. " Displaying continuous text
If want space between the concatenated parts use SEPERATED BY SPACE at the
end of CONCATENATE statement . Like -
CONCATENATE fs_itab-tdline w_string INTO w_string SEPERATED BY SPACE.Check my post in the bellow link -
[https://forums.sdn.sap.com/click.jspa?searchID=-1&messageID=7484684]
Regards
Pinaki
‎2009 May 14 11:04 AM
Thank you all,
I specifically asked for a standard way of doing this, like what Micky suggested.
But I realized it won't be much different than doing it by myself, so that's how I did it eventually.
Thanks everyone.