SAP DATA KEYDEF ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• WITH DATA
• WITH CLASS-DATA
• WITH STATICS
• WITH CONSTANTS

DATA, tabkeys
Short Reference


ABAP_SYNTAX
... $[ WITH key $]
$[ WITH secondary_key1 $] $[ WITH secondary_key2 $] ...

What does it do?
Definition of the table keys of an internal table. The following can be defined:
A primary table key using key. Every internal table has a primary key. The primary key must be defined explicitly for sorted tables and hashed tables. The specification for the primary key can only be omitted for standard tables. The primary table key is then defined automatically as a non-unique standard key.
Multiple secondary table keys with secondary_key1, secondary_key2, ... The specification of secondary keys is optional for all table categories. If no secondary key is specified, the internal table has only one primary key.

ABAP_EXAMPLE_VX5
Declaration of a hashed table with a unique primary key and two non-unique secondary sorted keys , cityfrom_to and airp_from_to.
ABEXA 00173
ABAP_EXAMPLE_END

Return to menu