ABAP Keyword Documentation → ABAP - Reference → ABAP Syntax → ABAP Statements → Operands → Names for Individual Operands
Whenever operands are grouped together from components, which themselves contain components, the names of these components are composed from chains with multiple component selectors. The following rules apply to these chained names:
- The names to the left of each structure component selector must, as a combined group, address a structured data type or a structure.
- The names to the left of each object component selector must, as a combined group, address a reference variable.
- The class component selector can occur in a name exactly once as the first selector.
- The interface component selector can only occur more than once in a label if other component selectors are listed between the individual interface component selectors.
7.31 | 7.40 | 7.54
The following chainings are possible alongside chainings or names:
- Method chainings with the object component selector
Declares a nested structured data type
struc1 and a structure
struc3 in an interface
struc3 is a data reference
variable of the static type
is the component interface of
i2 and the latter is implemented in
static attribute is
declared as the object reference of the static type
c1. The expression in
the last line can be at an operand position that expects a data object, and labels the component
comp of the structure
struc2 in a chaining that starts at class
c2. A prerequisite for use of the expression is that both reference variables,
dref, point to the respective instances.
TYPES: BEGIN OF struc1,
BEGIN OF struc2,
comp TYPE ...,
END OF struc2,
END OF struc1.
DATA: BEGIN OF struc3,
dref TYPE REF TO struc1,
END OF struc3.
CLASS c1 DEFINITION.
CLASS c2 DEFINITION.
CLASS-DATA oref TYPE REF TO c1.
... c2=>oref->i1~struc3-dref->struc2-comp ...