SAP® Documentation

Single view


PERFORM Short Reference   BAL Application Log Documentation  
This documentation is copyright by SAP AG.
SAP E-Book

string_exp - String Expressions

Short Reference


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


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

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

The operands of string expressions must have character-like data types. Structures with character-like-only flat components cannot 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.


  • The program DEMO_EXPRESSIONS shows examples of how to use string expressions.
  • String expressions and arithmetic expressions can not be mixed. Arithmetic expressions can, however, also be specified as embedded expressions of string templates. In addition, the formatting options of embedded expressions or string functions in operand positions can contain arithmetic expressions as arguments.
  • 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.
  • If the right side of an assignment appends strings 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 a subtotal. Care must be taken to preserve this optimization, especially in loops.


Displays a string expression. This is a chaining of a string literal with a string template that contains an embedded expression.


   `Hello ` && |{ sy-uname }!|


PERFORM Short Reference   PERFORM Short Reference  
This documentation is copyright by SAP AG.

Length: 4946 Date: 20191212 Time: 224903     sap01-206 ( 29 ms )

Our Service

Looking for Support? Questions?




Leave us your contact details and we will call you back. Panels marked with * are mandatory.