Show TOC

 Table TypesLocate this document in the navigation structure

Use

You use a table type to describe the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command DATA <inttab> TYPE TTYP. You create an internal table <inttab> in the program with the attributes defined for TTYP in the ABAP Dictionary.

A table type is defined by:

  • its line type that defines the structure and data type attributes of a line of the internal table
  • the options for managing and accessing the data ( access mode ) in the internal table
  • the primary key (see key definition and key category ) and the secondary keys (optional) of the internal table. For more information, see Secondary Keys for Table Types .

The row type is defined by directly entering the data type, length and number of decimal places or by referencing a data element , structured type ( structure , table or view ) or other table type. The row type can also be a reference type . You can see an example of row types in the figure below.

Tip

Table type TABTYPE shown in the graphic can be used with the statement DATA <name> TYPE TABTYPE in ABAP programs to define an internal table <name>.

A local type <name> that takes on the attributes of type TABTYPE can be defined in the program with TYPES <name> TYPE TABTYPE.

A special case of table types are the ranges table types .

See also:

Creating Table Types