Show TOC

Assigning a Value to a Text Symbol: DEFINELocate this document in the navigation structure

Use

Text symbols acquire their values as a result of explicit assignment. To interactively assign text symbols, in the text editor choose Start of the navigation path Include Next navigation step Symbols Next navigation step Text End of the navigation path. This method is available for all text symbols belonging to a text module as well as those of the associated form.

Values defined in this way are lost when the transaction is left. If you want to print the text module again, then you must enter the symbol values again. The purpose of the DEFINE command is to provide a means of making this value assignment a permanent part of the text, so that the values are available again when the text module is called again. This command can also be used to re-assign a new value to a text symbol half-way through the text.

        
/: DEFINE &symbolname& = 'wert'
         
Example

/: DEFINE &subject& = 'Your letter dated March 17, 1994'

The value assigned can have a maximal length of 60 characters. It may itself contain other symbols. A symbol contained within the value assigned to another symbol is not replaced with its own value at the point at which the DEFINE command is executed. Rather, this replacement is made when the symbol defined in the DEFINE command is called in the text.

Example

/: DEFINE &symbol1& = 'mail'

/: DEFINE &symbol2& = 'SAP&symbol1&'

/: DEFINE &symbol1& = 'script'

&symbol2& -> SAPscript

If, however, the DEFINE command is written using the ':=' character rather than the '=' character, then any symbol contained within the value being assigned is replaced immediately with its current value. The assignment to the target symbol is made only after all symbols in the value string are replaced with their values. The total length of the value string may not exceed 80 characters. The target symbol must be a text symbol, as before.

Example

/: DEFINE &symbol1& = 'mail'

/: DEFINE &symbol2& := 'SAP&symbol1&'

/: DEFINE &symbol1& = 'script'

&symbol2& -> SAPmail