Understanding String Expressions in ABAP

Description:

A string expression is enclosed by the “|” character on both sides and generates a character string.

  • Multiple operands (e.g., operand1, operand2, …) can be concatenated into a character string using the && operator, with any operand optionally being a string template.

Syntax:

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

Example:

DATA(ls_string) = |{ 'Hi' }| & | | & |{ 'Team' }|.
WRITE: / ls_string.

Output:

Screenshot showing the title 'String Expressions' and the output 'Hi Team' in a formatted layout.

Thanks for visiting!

Sangeeta Singh

Leave a Reply

Discover more from HANAxABAP

Subscribe now to keep reading and get access to the full archive.

Continue reading