Internal Tables - comp1 comp2 ...
Individual components of the lines of internal tables are addressed in a sequence of statements for
processing internal tables. If not stated otherwise, the names comp1 comp2... have the following syntax:
Syntax
... { comp_name[{+off(len)}|{->attr}] } | { (name) } ...
Effect
There are the following alternatives for component specification:
- The name comp_name of a component can be specified directly.
If the data type of the components is character-type and
flat, you can, using the same procedure as for
subfield access, append an offset/length specification
+off(len) to the name of the component to access the subareas of the component.
If
the component is an object reference, the object component selector ->
can be used to access all visible attributes attr of the referenced object. In this case, a component can be listed more than once.
- A bracketed character-type data object name can be specified, which contains the name of the component in upper case when the statement is executed.
The name of the component in name can contain an
offset/length specification. It is not possible to specify the object component selector for access to attributes.
If name only contains blank characters, this component
specification is ignored when the statement is executed. If name contains a component that does not exist, an untreatable exception is raised.
As of release 6.10, the name of the component in name can also be in lower case.
- For tables with a non-structured line type, the complete table row can be addressed as a component using
pseudo component
table_line. Before release 6.10, no other component except for table_line could be addressed.
As of release 6.10, other components can be specified in addition to
table_line. This is necessary, for example, if the line type of 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.
Note
For tables with a non-structured line type, the only component that can be addressed is the pseudo component Ptable_line.