Ansicht
Dokumentation

ABAPCOMPUTE_STRING - COMPUTE STRING

ABAPCOMPUTE_STRING - COMPUTE STRING

RFUMSV00 - Advance Return for Tax on Sales/Purchases   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

String Expressions ()

Short Reference



... ${ |string_tmpl| $}
  $| ${ operand1 && operand2 $[&&  operand3 ... $] $} ...


Effect

A string expression formulates an operation (calculation) with character-like operands. The result of a string expression is a character string. A string expression consists of

  • two or more operands operand1, operand2 ... that are concatenated as a character string using the string operator &&, where one of the operands can itself be a string template.

String expressions can occur in the read positions of certain statements and, in particular, on the right side of an assignment with the assignment operator =.

The operands of string expressions must be elementary and convertible to character-like data types. Structures with purely character-like flat components cannot, however, be specified.

If constructor expressions are specified as operands of string expressions, their data type is not determined by the string expression. The # character can be specified for the data type of the constructor expression only if the type can be determined from the constructor expression itself.

Notes

  • The conversion operator CONV can be applied to a structure with character-like-only components to use it as an operand of a string expression.
  • Due to their special conversion rules, enumerated objects can be used as operands of string expressions regardless of their base type, which can produce unwanted results. This is why an extended program check message can be produced in this case. A special rule for the conversion operator CONV can be implemented to use the name of the enumerated object instead of the actual enumerated value.
  • If, on the right side of an assignment, strings are appended to a variable specified with the type string on the left side of the assignment, the variable is used directly in specific cases without producing an interim result. It should be ensured that this optimization is not undone, especially in loops.

Output of a string expression. The expression concatenates a string literal with a string template that contains an embedded expression.

Output of a string expression. The expression concatenates a string literal with a string template that contains an embedded expression.






PERFORM Short Reference   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 5075 Date: 20240419 Time: 115737     sap01-206 ( 70 ms )