Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  Classic Objects in ABAP Dictionary →  Data Types →  Table Types 

Technical Attributes of Table Types

A table type describes an internal table with the following technical attributes:

  • Row type
The row type can be defined as follows:
  • Elementary or reference-like row types can also be specified by using their technical attributes directly. This is done in the same way as with data elements or structure components.
  • Table category
The table category can be specified as follows:
  • Index table as a generic table category for standard tables and sorted tables
  • Any table as a generic table category for all table categories
These methods are the same as defining the table category using the statement TYPES.
  • Table key
The following can be defined as table keys:
  • A primary key as a primary table key. The primary key is either the standard key, the entire table row (if this is not a table type or does not contain a table type as component), or is defined using individual components of a structured row type in the relevant order. A primary key of sorted tables and hashed tables can be given a unique alias name from the namespace of the secondary keys. It is not currently possible to specify an empty primary table key explicitly in ABAP Dictionary. Depending on the table category, the primary key is either unique or non-unique (and cannot be specified at all in the case of generic table categories). If no primary key is specified or its uniqueness is not defined, the table type is generic with respect to this attribute.
  • Up to 15 secondary keys as secondary table keys. Each secondary key has a unique name, which cannot be PRIMARY_KEY or LOOP_KEY, and is either a sorted key or a hash key. Sorted keys can be either unique or non-unique and a hash key is always unique. A secondary key is defined either by the entire table row (if this is not a table type or does not contain a table type as component), or is defined using individual components of a structured row type in the relevant order. Using the additions WITH or WITHOUT FURTHER SECONDARY KEYS of the statement TYPES, it is possible to define explicitly whether the table type is generic with respect to the secondary keys.
  • Initial row count
This is information for internal memory management of internal tables and corresponds to the addition INITIAL SIZE in the declaration of an internal table in an ABAP program.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • Generic table types (namely table types for which one or more attributes are generic) can only be used in ABAP for generic typings of formal parameters or field symbols.