Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  ABAP Syntax →  ABAP Statements →  Operands →  Data Objects in Operand Positions 

Read Positions

At a read position, the content of an operand is only read, and not changed, when the statement is executed. Data objects can be specified as followed at read positions:

  • As a data object visible in this place using a name dobj, a field symbol <fs>, or a data reference dref->* dereferenced using the dereferencing operator ->* (providing dref is specified in full).

    Here, the names of data objects also include any text symbols specified using the following:

    ... text-idf ...,

    Here, idf is the three-character ID of the text symbol or chainings of reference variables. If a field symbol is used, it must be assigned to a memory area and a data reference must point to a data object. Otherwise an unhandleable exception is raised. As an alternative to specifying a text symbol using text-idf, the three-character code of a text symbol can be appended to the text field literal in parentheses:

    ... '...'(idf) ...

    If the text symbol exists in the currently loaded text pool, the content of the text symbol is used instead of the text field literal, otherwise the literal is used.

  • If the data object is an internal table, the expressions dobj[], <fs>[], or dref->*[] can also be used. An exception to this is when specifying the internal table of a table expression, where [] cannot be appended to the name. In the case of dobj[], this ensures that the table body is addressed and no header lines. If an internal table does not have a header line, its simple name dobj (without []) is interpreted as the table body in all operand positions. However, if an internal table does have a header line, its simple name dobj (without []) is interpreted as the header line and not the table body in almost all operand positions. The operand positions in which the name of an internal table with a header line is interpreted as the internal table are specified under internal tables with headers.

  • As a subarea of a character-like or byte-like data object (or a character-like initial part of a structure) by specifying an offset/length.

  • In some positions, number values must be specified directly as digits, although it is often not possible to specify a sign (which is not the case with numeric literals). Examples are numbers specified in declarative statements for the length of elementary data objects or for the initial memory requirements of internal tables.
Other versions: 7.31 | 7.40 | 7.54


Notes

  • Text symbols cannot be listed at all read positions. For example, they are not permitted for specifying the target of dynamic executions.

  • A system field should only be specified as an operand in a reading position if its content is not set by the same statement, since otherwise undefined behavior may occur.

  • The predicate expressions IS ASSIGNED and IS BOUND can be used to check whether field symbols or data references.

  • A data reference variable with a generic static type can only be deserialized using the statement ASSIGN dref->* TO <fs>.

  • Enumerated objects with an enumerated type can be used in all reading positions in which the operand type is their enumerated type or in which the operand is converted to one of the character-like types c or string.