ABAP Keyword Documentation → ABAP − Reference → ABAP Syntax → ABAP Statements → Operands → Functions and Expressions in Operand Positions
Functions and Expressions for Operand Positions
Other versions: 7.31 | 7.40 | 7.54Writing Positions
The following expressions can be specified in writing positions:
... DATA(...) ...
... FIELD-SYMBOL(...) ...
- The constructor
expressions NEW class( ...
)->attr and
CAST type( ... )->dobj
- Table expressions
itab[ ... ]
and their chainings
Reading Positions
Functions that can be executed in a read position are
- Functional methods
... meth( ) ...
... meth( a ) ...
... meth( p1 = a1 p2 = a2 ... ) ...
... meth( [EXPORTING p1 = a1 p2 = a2 ...]
[IMPORTING p1 = a1 p2 = a2 ...]
[CHANGING p1 = a1 p2 = a2 ...] ) ...
- Chained method call:
... ...->meth1( ... )->meth2( ... )->...->meth( ... ) ...
- Chained attribute access:
... ...->meth1( ... )->meth2( ... )->...->attr ...
The following expressions can be specified in reading positions:
- Arithmetic expressions
... arith_exp ...
- Bit expressions
... bit_exp ...
- String Expressions
... string_exp ...
- Table expressions
itab[ ... ]
and their chainings
Notes
- Functions with numeric return values and arithmetic expressions are combined as numeric expressions.
- Functions with character-like return values and string expressions are combined as character-like expressions.
- Functions with a byte-like return values and bit expressions are combined as byte-like expressions.
Example
Numerical expression as an index specified for an internal table.
DATA: itab TYPE STANDARD TABLE OF i,
n TYPE i.
...
READ TABLE itab INDEX lines( itab ) - n
INTO DATA(wa).