Ansicht
Dokumentation
/SAPPSSRM/STRING_VAR_PARSER - Parses text and substitutes variables with values
SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up rdisp/max_wprun_time - Maximum work process run timeThis documentation is copyright by SAP AG.
Functionality
You can use this function module to substitute pseudo variables in strings with actual parameters. This can be useful if you use text symbols in a report.
Up to now, when you wanted to use values within text symbols, you had to divide the text into several text symbols and concatenate the text symbols and the values afterwards in the source code.
With this function module you can include the whole string, including variables (for example "&1") in one text symbol. This makes it easier to maintain text symbols and allows translators to rearrange the sentence construction for other languages.
Note: Neither the sequence of the variables nor the frequency how often the same variable is used plays any role.
Example
Text symbol 100:
The example no. &1 saves the company &2 &3 per year.
Calling the function:
DATA: lv_string TYPE string.
CALL FUNCTION 'Z_TEXT_SYMBOL_VAR_PARSER'
EXPORTING
orig_text_symbol = text-100
var1 = '42'
var2 = 'USD'
var3 = '100000'
IMPORTING
text_with_values = lv_string.
WRITE /: lv_string.
Result:
The example no. 42 saves the company USD 100000 per year.
Notes
Further information
Parameters
ORIG_TEXT_SYMBOLTEXT_WITH_VALUES
VAR1
VAR2
VAR3
VAR4
VAR5
VAR6
VAR7
VAR8
VAR9
Exceptions
Function Group
PSSRM/SAPLOBSOLETEFill RESBD Structure from EBP Component Structure Vendor Master (General Section)
This documentation is copyright by SAP AG.
Length: 1813 Date: 20240603 Time: 224428 sap01-206 ( 43 ms )