Ansicht
Dokumentation

ABENITAB_ACCESS - ITAB ACCESS

ABENITAB_ACCESS - ITAB ACCESS

Fill RESBD Structure from EBP Component Structure   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

- Accessing Internal Tables

When internal tables are accessed, either the entire table or table body, or individual lines can be addressed.

  • The entire table is accessed using special statements such as SORT, but also using general statements where internal tables can be specified at operand positions. Examples are assignments, parameter passing, target or source areas in and many other statements that return or expect tabular data.
  • Individual lines are accessed using the following:

When individual lines are accessed, either a work area is used into which the line content can be read or from which it can be modified, or a line is linked to a field symbol or a data reference variable and these are used to access the line directly.

The table category and the table keys are significant when internal tables are processed:

Notes

  • Internal tables must be specified at operand positions for internal tables when the statement is executed. Only index tables can be specified at operand positions that include index access.
  • In processing statements for internal tables, the operands can be generically typed with TYPE data or TYPE any as long as no table index is accessed. For index accesses, an operand must be typed at least with TYPE index table.

  • If the line type of internal tables contains object reference variables as the components comp, the attributes attr of the object to which the reference points can be used as key values for reading, sorting, and modifying table lines. This is always possible for statements that address individual components of the table.
  • The content of the primary table key cannot be changed for any writes to individual lines of sorted tables and hashed tables. If writes are performed in write positions across the entire table line in these tables, for example, as a target field of assignments or as actual parameters for output parameters, an exception is always raised. It is not possible to access entire table lines using field symbols, data references or table expressions.

Example

In the following example, data is written to an internal table with , sorting takes place, and reads are demonstrated with the statement READ TABLE and a table expression.






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

Length: 6842 Date: 20240328 Time: 105035     sap01-206 ( 88 ms )