Including Text Modules

Use

You use the text type Text M odule of the text node to refer to an existing text module in the system. This allows you to easily use texts from one text module in several forms. In addition, it is not necessary to load the entire form description to maintain these texts.

You can use text modules in two ways:

  • Refer to the text module. The text then appears read-only in the PC editor and is included when you print the form.
  • Copy the text module. The system then copies the text of the module and automatically converts the text node into an editable text element.

Text modules can be used across clients and are connected to the transport and translation systems.

If you refer to a text module, you can use the SFSY-SUBRC system field to check at runtime, whether the text module was found in the system.

Prerequisites

The text module you want to include must exist in the system. To create a text module use the SAP Smart Forms initial screen.

Procedure

  1. Create a text node in the navigation tree of the Form Builder.
  2. Enter a unique name for the node and a description (for example, business terms).
  3. On the General Attributes tab select the text type Text M odule.

    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. Enter the name of the text module in the Text N ame field. Or click on the black arrow and enter the name of a field to be evaluated dynamically. In addition, you can use the Language field to include the module in a particular language.
  5. If you want to change the text of the text module for the current form, choose Copy. The Form Builder changes the text type to Text E lement and copies the text of the module into the PC Editor, where you can edit it. In this case, the original text module remains unchanged.
  6. Use the checkbox Always C opy S tyle F rom T ext to determine that the style of the text module is of higher priority than that of the text node or any style inherited from a superior node. This is important if you specified the name of a field in step 4 (see F1 help).
  7. Mark No Error, if Text does not Exist if you want the form to be printed even if the text module you refer to does not exist in the system. Otherwise, processing is terminated and an error message appears.
  8. If required, use the Output options tab to maintain attributes for style, box and shading of the text.

Result

The system displays the node including name and description in the tree structure. It includes the relevant text itself in the moment the form is processed. If you refer to a text module, it appears in the PC Editor in read-only mode; if you copy it you can edit it.