ARTICLE
Internal tables, index assess with key specification
The example shows an index access to a hashed table.
ABAP_SOURCE_CODE
ABAP_EXEC
ABAP_DESCRIPTION
The table sflight_tab is a hashed table with a unique primary key
and a non-unique secondary sorted key. Since a secondary sorted key is
specified in the MODIFY statement after USING KEY , it is
possible to access the hashed table via the associated secondary table
index.
The example only serves to demonstrate the syntax. Generally, instead of
using the MODIFY statement such modifications should be carried
out using a field symbol or a data reference:
LOOP AT sflight_tab ASSIGNING <(><<)>sflight_wa> USING KEY
plane_type
WHERE planetype = 'A310-300'.
<(><<)>sflight_wa>-seatsmax = <(><<)>sflight_wa>-seatsmax + 20.
ENDLOOP.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved