Skip to content

ABAP Keyword Documentation →  ABAP Dictionary →  Classic Objects in ABAP Dictionary →  Database Tables →  Semantic Attributes of Database Tables →  Table-Specific Semantic Attributes of Database Tables 

Key Fields of Database Tables

At least one table field must be flagged as a key field in the structure of a database table. The table fields flagged as the key field become the primary key of the table. The key fields of a table must be located together at the beginning of the table, which means that no non-key fields are allowed between two key fields. The primary key comprising the key fields is a unique identification for a table row. If other combinations of table rows identify a table row uniquely, they are called key candidates. The primary index is created for the primary key of the table. This index provides optimized key access to the table rows when values are specified for the key fields.

A maximum of 16 key fields are allowed per table and they can contain a maximum of 900 bytes. If a key contains more than 120 bytes, the following restrictions apply:

  • Table contents cannot be transported by specifying the complete key values. Instead, the generic key values must be specified with a maximum length of 120 bytes.
  • The table cannot be used as the basis table of a lock object.

The following predefined data types are not allowed for key fields: DF16_SCL and DF34_SCL (both obsolete) plus STRING, RAWSTRING, LCHAR, and LRAW.

Other versions: 7.31 | 7.40 | 7.54