add_text

Use this method to add a text to a dynamic document, form area, or table.

CALL METHOD valid_reference->add_text
          EXPORTING text = text
                    text_table = text_table
                    fix_lines = fix_lines
                    sap_style = sap_style
                    sap_color = sap_color
                    sap_fontsize = sap_fontsize
                    sap_emphasis = sap_emphasis.

Parameter and Type

Opt.

Description

text
TYPE SDYDO_TEXT_
ELEMENT

X

A single text that you want to display in the document

text_table
TYPE SDYDO_TEXT_
TABLE

X

An internal table, each line of which contains a text that you want to display in the document

fix_lines
TYPE SDYDO_FLAG

X

Flag indicating how the texts in text_table should be displayed. Possible values:

  • 'X' : Display each text on a new line
  • ' ' : Display the entire table as continuous text

sap_style
TYPE SDYDO_ATTRIBUTE

X

The style of the text. The value can be any constant of class cl_dd_area with the description "SAP Style:..."

sap_color
TYPE SDYDO_ATTRIBUTE

X

The color of the text. The value can be any constant of class cl_dd_area with the description "SAP Color..."

sap_fontsize
TYPE SDYDO_ATTRIBUTE

X

The fontsize for the text. Possible values:

  • cl_dd_area=>small
  • cl_dd_area=>medium
  • cl_dd_area=>large

sap_emphasis
TYPE SDYDO_ATTRIBUTE

 

Highlighting for the text. Possible values

  • cl_dd_area=>strong : Bold text
  • cl_dd_area=>emphasis : Italic text

Any formatting settings you make apply only to the current method call. Consequently, if you want to apply one set of formatting to several lines of text, it is worth using the text_table parameter.