Ansicht
Dokumentation

ABENREAD_ITAB_USING_KEY_ABEXA - READ ITAB USING KEY ABEXA

ABENREAD_ITAB_USING_KEY_ABEXA - READ ITAB USING KEY ABEXA

General Data in Customer Master   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

- Key Accesses

This example measures the runtime of the statement READ TABLE with various table keys.

Source Code

Execute

Description

The table itab is a standard table with a non-unique primary key, a unique secondary sorted key, and a unique secondary hash key. For demonstration purposes, this program hides the syntax warning that different table keys in an internal table cannot contain the same components using the pragma ##TABKEY.

The program measures the average access time of the statement READ TABLE to individual table lines, depending on the number of lines in the table. The lines are accessed using the different keys. The keys are specified statically in the method measure_static and dynamically in the method measure_dynamic.

The result demonstrates that the response times for static access are as expected from around 50 to 100 table lines:

  • When a standard table is accessed using the primary key, the average access time increases linearly with the number of table lines.
  • When a standard table is accessed using a secondary sorted key, the average access time increases logarithmically with the number of table lines.
  • When a standard table is accessed using a secondary hash key, the access time is constant.

In dynamic accesses, each access incurs the additional time required to evaluate the dynamically specified key.






RFUMSV00 - Advance Return for Tax on Sales/Purchases   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 1768 Date: 20240420 Time: 053607     sap01-206 ( 36 ms )