ABAP Keyword Documentation →  ABAP − Reference →  Declarations →  Declaration Statements →  Data Types and Data Objects →  Declaring Data Types →  TYPES → 

TYPES - TABLE OF

Short Reference

Syntax

TYPES dtype { {TYPE tabkind OF [REF TO] type}
              | {LIKE tabkind OF dobj} }
          [tabkeys]
            [INITIAL SIZE n].

Addition:

... INITIAL SIZE n

Effect

This statement defines a table type dtype with a specific row type, a table category tabkind, and table keys tabkeys.

The row type is determined by entering the data type type after TYPE and data type dobj after LIKE:

Note

The use of the addition OCCURS for defining table types is obsolete.

Addition

... INITIAL SIZE n

Effect

The optional addition INITIAL SIZE has two meanings:

Programming Guideline

Modify the initial memory requirements only for nested tables

Notes

Example

Defines a non-generic sorted table type. The row type corresponds to the structure of the database table SPFLI. Two key fields are defined for the primary table key.

TYPES spfli_sort TYPE SORTED TABLE OF spfli
      WITH UNIQUE KEY carrid connid.






Continue
TYPES - tabkind
TYPES - tabkeys
Internal Tables, Nested Tables