Use the function module TEXT_SYMBOL_SETVALUE to assign a value to a SAPscript symbol. However, you can change only the values of text symbols. System symbols, standard symbols, and program symbols cannot receive new values.
The system keeps the new value until you initialize the symbol administration tables in SAPscript. To do this, you can use, for example, OPEN_FORM or TEXT_SYMBOL_REPLACE with the parameter INIT = ´X´.
Function call:
CALL FUNCTION 'TEXT_SYMBOL_SETVALUE'
EXPORTING NAME = ?...
VALUE = ?...
VALUE_LENGTH = 0
REPLACE_SYMBOLS = ' '
Export parameters:
NAME |
The parameter contains the name of the symbol to which you want to assign a new value. You must enter only the symbol name, without the texts or any formatting options. You can include the escape symbols &...&. |
VALUE |
Define the value of the symbol. The system can use up to 80 characters as symbol value. |
VALUE_LENGTH |
If you omit this parameter or specify 0, the system automatically determines the length of the symbol value. The system then includes all characters up to the last blank into the value. Reference field: SY-TABIX Default value: 0 |
REPLACE_SYMBOLS |
The value 'X' in this parameter means that symbols contained in the field VALUE are replaced immediately with their current values; the assigned value no longer contains SAPscript symbols. If the parameter is empty, the system includes the contents of the VALUE field without change. Any symbols occurring within are replaced with their current value only after the symbol specified in the parameter NAME is called in the text. Default value: ' ' |