‎2010 Jun 01 8:57 AM
Hi Gurus.
We have a custom popup FM that displays text lines from a file provided by SAPScript text format.. (after u2018call function u2018READ_TEXTu2019).
However, for example, the Tab indent markers in this text u2013 represented by two commas u2018,,u2019 are printing instead of spaces representing the indent in our popup.
We are searching a FM that takes the SAPScript text format and converts it to plain text format (before our Z_popup is called) where the Tab markers are replaced by spaces (in our case this is four spaces for each Tab mark).
We have already tried FMu2019s: CONVERT_text; CONVERT_ITF_TO_STREAM_TEXT; CONVERT_ITF_TO_STREAM_TEXT. But none of them seem to fulfill the requirements stated above.
Can anyone please advice?
‎2010 Jun 01 9:14 AM
hey,
this read_text method may help you.
http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=79888699
regards,
Orhan
‎2010 Jun 01 9:55 AM
Hi Arnie,
Instead of searching for FM you can manually code which is flexible.
"after gettting text from READ_TEXT in lt_tline.
Data: lt_string type table of string,
lv_string type string.
CONSTANTS: c_par TYPE char2 VALUE ',,'. " Sign for tabs
LOOP AT lt_tline INTO wa_tline.
CONCATENATE lv_string wa_tline-tdline INTO lv_string SEPARATED BY ' '.
REPLACE ALL OCCURRENCES OF c_par IN lv_string WITH ' '.
Append lv_string to lt_string. "if needed in string table
ENDLOOP.
Regards,
Kiruba