Ansicht
Dokumentation

ABENITAB_COMPONENTS - ITAB COMPONENTS

ABENITAB_COMPONENTS - ITAB COMPONENTS

RFUMSV00 - Advance Return for Tax on Sales/Purchases   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

- 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...:

... ${ 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 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.

  • 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.

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

Example

Sorting by a dynamically specified component. An incorrect name produces a runtime error.






rdisp/max_wprun_time - Maximum work process run time   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 4396 Date: 20240427 Time: 034405     sap01-206 ( 63 ms )