Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  ABAP Syntax →  ABAP Statements →  Operands 

Operand Type

An operand position is typed using an operand type, which is complete or generic and can also be dependent on other operand positions, for example in statements. When a statement is executed, an operand with a suitable data type is expected. If a data object specified at an operand position has a different data type than the operand type, an attempt is usually made to convert the content of the data object to the operand type on the basis of the conversion rules in writing positions, and, in the other direction, in reading positions. Note that every conversion incurs runtime costs. If no appropriate conversion rules have been defined, or the content cannot be converted, a syntax error occurs or an exception is raised. Deviations from this rule, for example that the data object must exactly match the operand type, or the data object is to be interpreted as an operand type, regardless of its actual type (casting), are described in the individual statements.

Other versions: 7.31 | 7.40 | 7.54

Operand Positions for Elementary Data Objects

For operand positions for elementary data objects, the following must be specified when the statement is executed, depending on the operand type:

Generic typed formal parameters or field symbols can also be specified statically if they are typed more generally than the expected type.

Flat structures with only character-like components of the types c, n, d, or t can also be used in all operand positions that expect elementary fields. Structures like this are handled in the same way as a single data object of type c (implicit casting).

Operand Positions for Structures

Structures must be specified at operand positions for structures when the statement is executed. Formal parameters or field symbols of generic type data or any can also be specified statically.

Operand Positions for Internal Tables

In operand positions for internal tables, internal tables must be specified both when the statement is executed and be specified as internal tables known statically. Generic formal parameters and field symbols can only be specified if they are typed with at least the generic type any table. Only index tables can be specified in operand positions that include index access, and generic formal parameters and field symbols must be typed with at least the generic type index table.

Operand Positions for Reference Variables

Depending on the operand type, either data reference variables or object reference variables must be specified in operand positions for reference variables when the statement is executed. Formal parameters or field symbols of generic type data or any can also be specified statically.


This translation does not reflect the current version of the documentation.