ABAP Keyword Documentation → ABAP - Reference → Declarations → Declaration Statements → Classes and Interfaces → ABAP Objects - Overview → Objects
Object References in Internal Tables
If the row type of an internal table contains object reference variables in the form of the component
comp
, the attributes attr
of the object (to which
each reference of the row points) can be used as key values for reading, sorting, and modifying rows in tables. This is possible in the following statements or expressions:
LOOP AT itab ... WHERE comp->attr ...
READ TABLE itab ... WITH [TABLE] KEY comp->attr = ...
... itab[ KEY ... comp->attr = ... ] ...
SORT itab BY comp->attr ...
DELETE itab WHERE comp->attr ...
MODIFY itab ... TRANSPORTING ... WHERE comp->attr ...
If a table contains unstructured rows with the type of an object reference variable, the attributes of the object to which a row points can be addressed using table_line->attr
.