SAPscript Symbols 

Text in the SAP system does not usually exist independently of other objects, but often contains a reference to some other stored object. For example, for a letter this could be the address data in the vendor master record or information in the material master record that is to be included in a purchase order text. You solve this problem by using placeholders for the data rather than entering the actual values into the text. Thus, you can create flexible text modules by using these placeholders at all points where the text needs to be variable. Since much of the data to be inserted in the text reflects the contents of fields in SAP tables, this technique ensures that the text modules always contain the current values of these fields when printed.

In SAPscript, these placeholders are known as symbols. They represent data that will not be added to the text until a later point. This is normally the point at which the output is formatted. All symbols occurring in the text are then replaced with their current values. This replacement is performed only in the output text. The original version of the text module is unaffected.

SAPscript recognizes four different kinds of symbols:

The main difference between these is the source of their values. SAPscript provides values for the system symbols. Standard symbols and their values are defined in the TTDTG table. Program symbols represent data supplied by the program that is currently executing. The values for text symbols come either from control commands in the text itself or are supplied dynamically by the Include function in the text editor.

SAPscript automatically recognizes the type of a symbol. First of all, it checks whether the symbol is a system symbol. If not, then it checks whether the symbol name is defined in the data area of the calling program. In this case, it is a program symbol. Otherwise, SAPscript reads table TTDTG. If the symbol is found in this table, then it is a standard symbol. If a symbol is neither a system symbol nor a program symbol nor a standard symbol, then it is a text symbol.

Syntax of Symbols

System Symbols

Program Symbols

Standard Symbols

Text Symbols

Formatting Options

Formatting Conventions