SAP® Documentation

Single view

ABAPCREATE_DATA_KEYDEF - CREATE DATA KEYDEF

CPI1466 during Backup   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

KEYDEF - Defining a Table Key in the CREATE DATA Statement

Alternatives:

1. KEY k1 ... kn

2. KEY (keytab)

3. DEFAULT KEY

Effect

You can declare the names of the key components either statically or dynamically as the contents of an internal table. The same rules apply as when you define an internal table using DATA. In particular, you cannot declare duplicate key components or key components that overlap. If you declared the line type dynamically, breakind these rules causes a runtime error.

Alternative 1

KEY k1 ... kn


Effect

The componentsk1, ..., kn are used as the key for the internal table in the order in which they were declared. Invalid component names cause a runtime error.

Alternative 2

KEY (keytab)


Effect

The system gets the key components from the internal table keytab at runtime. keytab must be an internal table with a character-type line type.

Alternative 3

DEFAULT KEY


Effect

The system uses the standard key as the key for the internal table.






General Data in Customer Master   ABAP Short Reference  
This documentation is copyright by SAP AG.

Length: 1943 Date: 20191215 Time: 092038     sap01-206 ( 22 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.