Advertising:

Read texts and notes with function module READ TEXT

From SAP Knowledge Base
Revision as of 22:00, 25 December 2024 by Unirab (talk | contribs) (Created page with "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: <syntaxhighlight lang="abap" line> 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>-tdfor...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

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