ABAP Keyword Documentation → ABAP - Reference → Processing Internal Data → Internal Tables → Internal Tables - Overview → Table Keys
Duplicates for Non-Unique Keys
For non-unique table keys, there can be duplicate rows with regard to these keys. This section describes the sequence of these duplicated for insertion into tables with non-unique sorted table keys. This sequence has no significance with regard to non-unique primary keys for standard tables.
Other versions: 7.31 | 7.40 | 7.54
Single Record Operations
When inserting individual rows for which the insertion position is determined using a table key - that is, for
INSERT ... INTO TABLE ...
operations or
- For a lazy update of sorted secondary keys
the sequence of the duplicates with regard to the table key of the target table is determined in accrdance with the insertion sequence of the individual rows. The duplicate row last inserted into the table is sorted ahead of all other duplicates.
Block Operations
For block operations such as a statement of two internal tables with MOVE or when inserting multiple lines with INSERT LINES OF, the sequence of duplicates with regard to a sorted key of the target table in the block is taken from the source table. If there are already one or more duplicates in the target table, the source block duplicates are inserted in their original sequence in front of the first duplicate in the target table.
Special Features
Some operations have the characteristics of block operations but are executed internally as sequences of single record operations. In this case, the original sequence of duplicates with regard to a sorted key in the target table is not retained. This is the case for the following operations:
- Filling an internal table using
IMPORT
from a table previously created withEXPORT
and all operations that are based internally on such an import, such as posting operations.
- Passing and adopting internal tables for Remote Function Calls.
- The deserialization of an internal table from a previously XML serialized table with
CALL TRANSFORMATION
.