ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Internal Tables → Internal Tables - Overview
Access to Internal Tables
When you access internal tables, you can address the whole table, the table body, or individual rows.
- The table body is accessed using special statements such as
SORT, but can also be accessed using general statements such as
MOVE
.
- Individual rows are accessed using special statements such
as
READ TABLE
,LOOP AT
, orMODIFY
. When you access individual rows, you use either a work area into which the row content is read or from which it is modified, or you link a row to a field symbol or a data reference variable and use these to access the row directly.
The table category and the table keys are significant when editing internal tables:
- The primary table index (which always exists) can be used to access index tables (standard tables and sorted tables).
- Primary table keys can be used for optimized access to sorted tables and hashed tables.
- A secondary table index can be used to access any tables with a sorted secondary table index.
- The secondary table key can be used for optimized access to any tables with a secondary sorted key or hash key.
Other versions: 7.31 | 7.40 | 7.54
Notes
- If the row 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 rows. 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 modifying access to individual rows of sorted tables and hash tables.