Ansicht
Dokumentation

ABENITAB_KEY_PRIMARY - ITAB KEY PRIMARY

ABENITAB_KEY_PRIMARY - ITAB KEY PRIMARY

CPI1466 during Backup   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

- Primary Table Key

Each internal table has a primary table key that allows access to individual lines of the table by specifying a key.

  • The standard key, which can be declared both explicitly and implicitly, has a special role.
  • The primary table key of a standard table can also be empty, that is, it does not contain any key fields.
  • In the case of key accesses for internal tables, the primary key is always used implicitly in processing statements as long as no secondary key is specified. In table expressions, the primary key must also be specified explicitly.
  • The primary key has the predefined name primary_key, with which it can also be addressed explicitly in processing statements. In table expressions, primary_key or an alias name must be specified if the primary key is to be used explicitly.
  • Access to an internal table using the primary table key is determined by the table category and not the table key. For sorted tables and hashed tables, key access is always optimized using the primary table key. Primary key access to standard tables, however, performs a linear search.
  • The key fields of the primary table key of sorted tables and hashed tables are always read-only.
  • In the case of sorted tables and hashed tables, separate key administration exists for the primary table key, which enables optimized access but also affects the memory requirement of the internal table. There is no separate administration for the primary table key of standard tables.

Notes

  • Since sorted tables and hashed tables have real key administration for the primary key, unlike standard tables, these tables are also grouped under the term key tables.
  • To achieve optimized key access to standard tables, secondary keys can be used.

Example

Declaration of a hashed table with a unique primary key. The table is filled with data from a database table and accessed using a table expression with values specified for the primary key.






RFUMSV00 - Advance Return for Tax on Sales/Purchases   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Length: 3515 Date: 20240424 Time: 144848     sap01-206 ( 43 ms )