Advertising:

Read texts and notes with function module READ TEXT

From SAP Knowledge Base
Revision as of 21:04, 25 December 2024 by Unirab (talk | contribs)

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.

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.


This is a wiki created in the spare time of a private person working in the SAP ERP area. The aim is to collect knowledge for the own use. The wiki is maintained to the best of knowledge and belief.
All products shown, including in form of screenshots, belong to SAP SE. Their trademarks are, among others: SAP®,ABAP®,SAP Fiori®,SAP HANA®,SAP NetWeaver®,SAP® R/3®,SAP S/4HANA®,SAP S/4HANA® Cloud