Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  ABAP Syntax →  ABAP Statements →  Operands →  Functions and Expressions in Operand Positions →  Operand Positions for Functions and Expressions →  Reading Positions for Functions and Expressions 

General Expression Positions

General expression positions are reading positions in which suitable data objects, constructor expressions, table expressions, calculation expressions, built-in functions, or functional method calls and method chainings can be specified. The following general expression positions exist:

  • Operand of the statement CASE
  • Work area wa of the following statements:
  • Expression exp for dynamic sorts in the case of the following:

The type restrictions defined by the operand type apply in the operand positions. For example, no numeric functions can be specified in a bit expression.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • Specifying functional methods as actual parameters of methods enables the nesting of method calls in an operand position.

  • The three types of calculation expression can be executed as operands of relational expressions, but they cannot be mixed in one calculation expression.

Example

Specifies a constructor expressions with the value operator VALUE on the right side of an assignment and specifies a constructor expression with the reduction operator REDUCE as an input parameter for the method DISPLAY of the class CL_DEMO_OUTPUT.

TYPES itab TYPE TABLE OF i WITH EMPTY KEY. 

DATA(itab) = VALUE itab( ( 1 ) ( 2 ) ( 3 ) ). 

cl_demo_output=>display( 
  REDUCE string( INIT s = `` 
                 FOR <wa> IN itab 
                 NEXT s = s &&  <wa> && ` ` ) ).