Skip to content

ABAP Keyword Documentation →  ABAP - Release-Specific Changes →  Changes in Releases 4.xx →  Changes in Release 4.6A 

Internal Tables in Release 4.6A

In Release 4.6A, the following new features have been introduced in internal tables:


1. New keys specified in unstructured internal tables


2. References as table keys


3. Strings as table keys


4. Key definition for tables in ABAP Dictionary


5. Keys of unstructured tables


6. Changes to the internal structure


7. Sorting without sort key specified


8. Access to read-only tables


9. Index ranges in table extensions


10. IS REQUESTED with TABLES parameter


11. Tables as attributes of objects


12. References as row type


13. Multiple identical keys specified

Other versions: 7.31 | 7.40 | 7.54

Modification 1

New keys specified in unstructured internal tables

If the row type of an internal table does not have a structure, the pseudo component table_line can be used to specify or address the entire table row as the key. The previous form TABLE LINE is now obsolete. If a structure contains a component called table_line, this produces a warning in the syntax check.

Modification 2

References as table keys

References are now allowed as the key of an internal table.

Modification 3

Strings as table keys

Strings are now allowed as the key of an internal table. This applies to all categories of tables.

Modification 4

Key definition for tables in ABAP Dictionary

It is now possible to specify the table key explicitly for internal tables defined in ABAP Dictionary.

Modification 5

Default key of unstructured tables

The default key of an internal table without a row structure always consists of the whole row. An exception are tables of tables for which an empty key is defined.

Modification 6

Changes to the internal structure

Previously, internal tables were represented at runtime using a structure 256 bytes long. This has now been replaced by a reference that is only 8 bytes long. This means that structures that contain tables as components or tables that include other tables can now be save much more efficiently. This is because tables without content now need only 8 bytes instead of 256 bytes. The benefits are particularly clear in thinly populated structures. Furthermore, the header of a filled table now only requires approximately half of the 256 bytes previously required (the actual figure depends on the platform).

In ABAP Dictionary, all structures containing a field of length 256 bytes intended to include a table header must be modified accordingly.

Modification 7

Sorting without sort key specified

Sorting an internal table with type STANDARD or HASHED using the statement SORT now returns a correct result, even if the sort key is not specified in the addition BY.

Modification 8

Access to read-only tables

If the statements DELETE, INSERT, and MODIFY are applied to read-only tables (for example, IMPORTING-REFERENCE parameters in function modules or READ-ONLY attributes of classes), the system returns a syntax error. This error used to produce a runtime error.

Modification 9

Index ranges in table extensions

The statements INSERT LINES OF itab ... and APPEND LINES OF  itab ... return syntax errors if the source table has the type HASHED or ANY and the additions FROM and TO are used to specify an index range. This error used to produce a runtime error.

Modification 10

IS REQUESTED with TABLES parameter

If the relational operator IS REQUESTED is used with TABLES parameters in update modules, the syntax check produces a warning. These parameters are always supplied.

Modification 11

Tables as attributes of objects

The statements LOOP, READ, SORT, DELETE, and MODIFY now support access to the attributes of objects as the keys of internal tables.

If the row type of an internal table contains object reference variables from ABAP Objects as components comp, the attributes attr of the object to which the reference points can be used as key values when reading, sorting, and changing the table. This is possible in the following statements:

LOOP AT itab ... WHERE comp->attr ...

READ TABLE itab ... WITH [TABLE] KEY comp->attr = ...

SORT itab BY comp->attr ...

DELETE itab WHERE comp->attr ...

MODIFY itab ... TRANSPORTING ... WHERE comp->attr ...

Modification 12

References as row type

In the declarative statements DATA, STATICS, and TYPES, object references and data references can be used as the row type of an internal table.

Modification 13

Multiple identical keys specified

Identical keys specified more than once in the statement READ produce a warning.