Skip to content

Access table index

Access a specific index of an internal table directly, use the bracket notation table_name[ ].

DATA(id_of_account_5) = accounts[ 5 ]-id.

Old style:

READ TABLE accounts INDEX 5 INTO DATA(account_5).
IF sy-subrc = 0.
  DATA(id_of_account_5) = account_5-id.
ENDIF.
From SAP/styleguides under CC BY 3.0 — more details
Last updated on