Using Fields in the Form

In the SAP System, texts do not usually exist without context but refer to an object stored there. In the case of a letter, for example, this can be address data from the vendor master record or information from the material master record to be included in an order text. You do not have to enter the current values in these texts, but can use placeholders for this data instead. This allows you to make text modules flexible since you can define any variables by using these placeholders.

In SAP Smart Forms, these placeholders are called fields. Fields represent data that is only included in the text when it is formatted for output. When generating the output, the system replaces all fields in the text with the values that are currently valid for them.

There are two types of fields:

The value of a field can be a maximum of 255 characters.

In the Form Builder, choose Utilities ® Field List On/Off to display a field list beneath the tree structure. The fields in this list are sorted according to their definition. This enables you to keep track when including the fields.

Where can you include fields?

In text nodes

You include fields in text nodes if you want to display values at runtime. Once included, these fields appear with a gray background and are enclosed in ampersands ('&') to set them apart from normal text. This method is used to print tables in a form.

See also: Displaying Fields that Refer to Currencies or Quantities

In input fields of a node

You can also specify fields in the attributes of a node. By default, these input fields are set so that they expect static values.

If you want your input to be accepted as a field name, you have to first click the black arrow that is pointing away from the input field. As soon as the system expects you to enter a field name, it turns the arrow around so that it points to the input field:

Enter the field name without ampersands ('&') in the input field. In this way, you can include a graphic in the form dynamically, that is, not until the runtime of the Smart Form, for example.

Smart Forms does not use this black arrow for distinction in places where you do usually enter field names (for example, for a condition).