ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Internal Tables → Processing Statements for Internal Tables
Internal Tables - comp1 comp2 ...
Addresses individual components of internal table rows in a range of statements for editing internal tables and in
table expressions. If not stated otherwise, the following syntax applies to the labels comp1 comp2...
:
Other versions: 7.31 | 7.40 | 7.54
Syntax
... { comp_name[-sub_comp][{+off(len)}|{->attr}] } | { (name) } ...
Effect
The following alternatives are available for specifying components:
- Directly specifying the name
comp_name
of a component.
- If the data type of the components is character-like and
flat, an offset/length
+off(len)
can be appended to the name of the component (as in substring access) to access subareas of the component. Only directly specified numbers or constants can be specified foroff
andlen
.
- If the component is structured, the structure component selector
-
can be used to access thesub_comp
components of the substructure.
- If the component has a reference type, the object component selector
->
can be used to access all visible attributesattr
of the referenced object. In this case, a table component can be listed more than once.
- Specifying a parenthesized
character-like data object
name
, which contains the name of the component (uppercase) when the statement is executed.
- The name of the component in
name
can contain an offset/length.
- The object component selector
->
can be specified inname
to read attributes, but only those attributes can be addressed that can be identified statically.
name
is not case-sensitive. Ifname
only contains blanks, this specified component is ignored when the statement is executed. Ifname
contains a non-existent component, a non-handleable exception is raised.
- Specifying the pseudo component
table_line
to address the whole table row as a component.
Notes
- A component can only be specified more than once if it has a reference type. Further components,
however, can be specified alongside
table_line
. This is necessary, for example, if the row type of the internal table is an object reference and the value of the reference and the value of an attribute of the object are to be specified at the same time.
- If the table has a non-structured row type, the pseudo comment
table_line
can be addressed as the only component.
- If the row type of the internal table cannot be statically identified, the components can usually only be specified dynamically and not directly.
- The components specified must not be elementary.
- If the data type allows it (character-like and flat), an offset/length can also include adjacent components
- A customizing include must not be specified as a component if it is empty.