SAP DDIC TABLE TYPES TECH



Get Example source ABAP code based on a different SAP table
  



ABAP_DDIC - Technical Properties of Table Types
A table type describes an internal table with the following technical properties:
Line type The line type can be defined as follows:
The line type can be defined by referencing any data type, including DDIC database tables and DDIC views.
Elementary or reference-like line types can also be specified by using their technical properties 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:
Standard table
Sorted table
Hashed table
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 a table key:
A primary key as a primary table key . The primary key is either
- the standard key, or
- the entire table line, given it is not a table type and does not contain a table type as a component, or
- is determined using individual components of a structured line 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 currently not possible to specify an empty primary table key explicitly in the ABAP Dictionary. The uniqueness of the primary key is unique or non-unique, depending on the table category, and cannot be specified at all for generic tables. If no primary key is specified or its uniqueness is not defined, the table type is generic for this property.
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 line, if it is not a table type or does not contain a table type as component, or by using individual components of a structured line 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. It is currently not possible to specify an alias name for a secondary key in the ABAP Dictionary.
Initial row count This specification is a hint for the internal memory management of internal tables and corresponds to the addition INITIAL SIZE in the declaration of an internal table in an ABAP program.



Latest notes:

Generic table types, that is, table types for which one or more properties are generic, can only be used in ABAP for generic typings of formal parameters or field symbols.
A line type cannot be defined using a reference to a CDS entity, nor using a reference to a ABAP_CDS_MNG_VIEW of a corresponding ABAP_CDS_V1_VIEWS . The latter has been possible before, but since ABAP_RELEASE 7.56, access to ABAP_CDS_MNG_VIEWS is obsolete .
NON_V5_HINTS
ABAP_HINT_END