Syntax of Symbols

Each symbol has a name that is used when the symbol is called. A call to a symbol is normally made in a line of text that also includes other kinds of text. Therefore it is necessary that symbols can be distinguished from normal text, and that the call is structured in such a way that it is possible to identify it as a call to a symbol.

  • Use the delimiter & both immediately before and after the symbol.

  • Do not use blank characters in the name of a symbol. Moreover, since the characters '+() are used for defining formatting options, you must not use any of these a symbol name either.

  • Make sure that no SAPscript editor line break occurs between the symbol delimiters. If necessary, use a long line to avoid this (paragraph format = or /=).

  • Enclose additional formatting options in round brackets and insert them immediately after the symbol name. The code letters identifying these options must be given in capitals.

A string that does not satisfy all the above conditions is not interpreted as a symbol but is copied directly into the output text.

Examples of valid symbols:

&symbol&

&MY_symbol&

&KNA1-NAME1&

&DATE&

&KNA1-UMSAT(I)&

Examples of invalid symbols:

&mysymbol closing delimiter missing

&my symbol& name contains blanks

&mysymbol)& name contains an invalid character

&symbol(Z& closing bracket of formatting option missing

&KNA1-UMSAT(i)& formatting option not in capitals

The symbol names themselves are not case-sensitive, that is, SAP script does not distinguish between capital and lower case letters in symbol names. These symbol names are identical:

&mysymbol&

&Mysymbol&

&MYSYMBOL&

A symbol name can contain a maximum of 130 characters. However, only the first 32 characters are used for unique identification.