Advertising:
Read texts and notes with function module READ TEXT
The text is written to a simple internal table with type 'TLINE'. Often the goal is to store the content in a string.
The concatenation depends on the TDFORMAT:
IF sy-subrc = 0 AND lines( text_lines ) > 0.
LOOP AT text_lines ASSIGNING FIELD-SYMBOL(<text_line>).
IF <text_line>-tdformat EQ '*' AND sy-tabix > 1.
result = |{ result }{ cl_abap_char_utilities=>cr_lf }{ <text_line>-tdline }|.
ELSEIF <text_line>-tdformat EQ '=' OR sy-tabix = 1.
result = |{ rv_result }{ <text_line>-tdline }|.
ELSE.
result = |{ result } { <text_line>-tdline }|.
ENDIF.
ENDLOOP.
ENDIF.
Textkonvertierung von ITF in ASCII nach Lesen SAPScript Textbausteine
Wenn ein Text von einem SO10 Text gelesen wird, können hier u.U. ungewünschte Textformatierungen vorhanden sein. Zum Beispiel wird bei einem Komma bei der Ausgabe das Komma mit "<(>,<)>" angezeigt:
Datei:READ TEXT SAPScript textbaustein.png
Mit FuBa "CONVERT_ITF_TO_ASCII" kann das SAPScript in ein ASCII Format konvertiert werden. Alternativ arbeitet man am Beispiel des Kommas mit REPLACE.
Text conversion from ITF to ASCII after reading SAPScript text modules
If a text is read from an SO10 text, unwanted text formatting may be present here. For example, if there is a comma, the output will display the comma with '(,)'.
With fm 'CONVERT_ITF_TO_ASCII' the SAPScript can be converted into an ASCII format. Alternatively, you can use keyword REPLACE.