SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → Declarations → Declaration Statements → Data Types and Data Objects → Declaring Data Types → TYPES → TYPES - TABLE OF →
TYPES - tabkeys
Syntax
... [ WITH key ]
[ WITH secondary_key1 ] [ WITH secondary_key2 ] ...
[ {WITH|WITHOUT} FURTHER SECONDARY KEYS ] ... .
Extras:
1. ... WITH FURTHER SECONDARY KEYS
2. ... WITHOUT FURTHER SECONDARY KEYS
Effect
Defines the table key of a table type. The following can be defined:
The order in which the components of a table key are defined is significant for the table type. The WITH|WITHOUT FURTHER SECONDARY KEYS additions determine the genericness with respect to the secondary table key.
An internal table that has no table key or an incomplete table key is generic with respect to the table key. A table type of this nature can be used only for typing formal parameters or field symbols. For DATA, a standard table type with a generic primary table key can be specified after TYPE. In this case, a bound table type with a standard key is created.
Primary Key
The genericness of a table type with respect to the primary key is determined as follows:
The non-generic table categories can be split up as follows:
Secondary Key
The genericness of a table type with respect to the secondary key depends (by default) on the genericness of the primary key; you can override it with the WITH|WITHOUT FURTHER SECONDARY KEYS additions.
Note
A generic table type cannot be used as a component of a structured type.
... WITH FURTHER SECONDARY KEYS
Effect
This addition defines the table type explicitly as being generic with respect to the secondary key. This means it includes table types that can have further secondary keys and not just the optional secondary keys declared using WITH secondary_key ....
If you have already defined 15 secondary keys, you cannot declare the WITH FURTHER SECONDARY KEYS addition.
... WITHOUT FURTHER SECONDARY KEYS
Effect
This addition defines the table type explicitly as being non-generic with respect to the secondary key. This means it includes only those table types that have those secondary keys declared using WITH
secondary_key ....