Get Example source ABAP code based on a different SAP table
ABAP_ITAB - comp1> comp2> ... Addresses individual components of internal table lines in a range of statements for processing internal tables and in table expressions>. If not stated otherwise, the following syntax applies to comp1 comp2...>:
What does it do? 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 for off> and len>.
If the component is structured, the structure component selector - > can be used to access the sub_comp> components of the substructure.
If the component has a reference type, the object component selector ->> can be used to access all visible attributes attr> of the referenced object. In this case, a table component can be specified more than once.
Specifying a parenthesized character-like data object> name>, which contains the name of the component when the statement is executed.
The name of the component in name> can contain an offset/length specification.
The object component selector ->> can be specified in name> to access attributes, but only those attributes can be addressed that are known statically.
name> is not case-sensitive. If name> only contains blanks, this component specification is ignored when the statement is executed. If name> contains a nonexistent component, an uncatchable exception is raised.
Specifying the pseudo component> table_line> to address the whole table line as a component.
Latest 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 line 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 line type, the pseudo comment table_line> can be addressed as the only component.
The pseudo component table_line> is a reserved name. In ABAP and in the ABAP Dictionary, no structure components called table_line> can be declared.
If the line type of the internal table cannot be statically identified, the components can usually only be specified dynamically and not directly.
The components specified do not have to be elementary.
If the data type allows it (character-like and flat), an offset/length specification can also include adjacent components