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 →  Writing Positions for Functions and Expressions 

Declaration Positions

Declaration positions are writing-only positions in which a declaration expression can be specified for an inline declaration. There are no declaration positions within expressions.

The following declaration positions are possible:

  • Positions for the inline declaration of variables with DATA(var). These are the following writer positions, where the operand type can be determined in full and where the content of the operand is completely overwritten but not evaluated.
  • Work area in statement for dynpros:

    LOOP AT SCREEN ... INTO wa
  • Target field for message output:

    MESSAGE ... INTO text
  • Target field for a serialization:

    CALL TRANSFORMATION ... RESULT XML rxml
  • All writing positions used when generating programs:

    GENERATE GENERATE SUBROUTINE POOL ... NAME prog error_handling
  • Positions for the inline declaration of field symbols with FIELD-SYMBOL(<fs>). These are all places where a memory area can be assigned to a field symbol.
  • Field symbol in the statement ASSIGN:

    ASSIGN... TO <fs>

Other versions: 7.31 | 7.40 | 7.54


Note

Unlike in standalone method calls, in a functional method call inline declarations cannot be specified as actual parameters for output parameters.


Example

Declaration expression DATA for declaring an internal table itab after the addition INTO TABLE of a SELECT statement.

SELECT * 
       FROM scarr 
       INTO TABLE @DATA(itab).