ABAP Keyword Documentation → ABAP - Reference → Declarative statemnts → Data Types and Data Objects → Declaring Data Objects → DATA → DATA - TABLE OF
DATA - tabkeys
Other versions: 7.31 | 7.40 | 7.54
Syntax
... [ WITH key ]
[ WITH secondary_key1 ] [ WITH secondary_key2 ] ... .
Effect
Definition of the table keys in an internal table. The following definitions can be made:
-
A primary table key with
key
Every internal table has a primary key. The primary key must be defined explicitly for sorted tables and hashed tables. The primary key specification can only be omitted for standard tables. The primary table key is then automatically defined as a non-unique standard key. -
Several secondary table
keys with
secondary_key1
,secondary_key2
,...
.
The specification of secondary keys is optional for all table types. If a secondary key is not specified, the internal table has only one primary key.