Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Declarations →  Declaration Statements →  Data Types and Data Objects →  Declaring Data Objects →  DATA →  DATA - TABLE OF 

DATA - tabkeys

Quick Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


... [ WITH key ] 
    [ WITH secondary_key1 ] [ WITH secondary_key2 ] ...

Effect

Defines the table keys in an internal table. The following can be defined:


Example

Declares a hashed table with a unique primary key plus two non-unique secondary sorted keys, cityfrom_to and airp_from_to.

DATA spfli_tab TYPE HASHED TABLE OF spfli 
  WITH UNIQUE KEY carrid connid 
  WITH NON-UNIQUE SORTED KEY cityfrom_to  COMPONENTS cityfrom cityto 
  WITH NON-UNIQUE SORTED KEY airp_from_to COMPONENTS airpfrom airpto.

Continue

DATA - key

DATA - secondary_key