Show TOC

Including SAPscript TextsLocate this document in the navigation structure

Context

You use the text type Include Text of the text node to refer to a SAPscript text that already exists in the system. To identify the text, you need the Text Name, the Text Object, the Text ID, and the Language. This allows you to easily use a text in several forms. In addition, you do not need to load the whole form description to maintain these texts.

Note

This text type corresponds to the SAPscript statement INCLUDE. However, SAP Smart Forms does not allow any control statements in include texts. They are simply ignored when the form is processed.

To manage application-specific form texts, applications define their own text objects with subordinate text IDs in transaction SE75. Use text object TEXT with text ID ST to enter general standard texts. To maintain them, use the standard text editor (transaction SO10).

Note

If you do not have to use SAPscript texts, we recommend that you use text modules. They are cross-client texts and are linked to Change and Transport System and the translation tools.

Note

When using an include text, you can use the SFSY-SUBRC system field to check at runtime whether the text could be found in the system.

Procedure


  1. Create a text node in the navigation tree of the Form Builder.

  2. Enter a unique name for the node and a node description (for example, letter).

  3. On the General Attributes tab, choose Include Text as text type.

    Caution

    Since you use the text node exclusively to edit a text element, an included text, or a text module, the system only stores information on the selected type. When you change the text type, the system therefore asks for your confirmation.

  4. In the Text Key box, identify the include text.

    • To identify individual text objects, use the search help in this field.

    • The search help for the Text Name field allows you to include the attributes of SAPscript texts in the search.

    • Use the Language field to specify the language of the text you want to include.

  5. If necessary, format the include text in the Paragraph Formats box:

    • The style that is assigned to the text node contains the format for the standard paragraphs (' *'). If you specify a paragraph format in the Standard paragraph field, you override this format for all standard paragraphs in the include text with this paragraph format.

    • In the First Paragraph field, you can set a paragraph format for the first paragraph of the include text and thereby override the setting in the style. If you leave the Standard Paragraph field empty, all standard paragraphs in the include text are also formatted with this paragraph format.

  6. In the Begin list box, choose whether you want the text to start with a new paragraph or just in a new line. You can also append the text directly at the text position of the current paragraph.

  7. Select the No Error if Text Does Not Exist checkbox if you want the form to be printed even if the include text you refer to does not exist in the system. If you do not set this flag, the form is not printed, and an error message appears.

  8. If required, use the Output options tab to maintain attributes for style, box and shading of the text.

Results

The system displays the node in the tree structure, including its name and description. The corresponding text is not inserted until the form is processed.