ABAP Keyword Documentation →  ABAP − Reference →  Predefined Types, Data Objects, Functions, and Constructors →  Predefined Data Types → 

Generic ABAP Types

The following table shows the predefined generic ABAP types. A generic data type is an incomplete type specification that includes multiple complete type specifications. With the exception of object, all generic types can be used after TYPE for the typing of field symbols and formal parameters. When a data object is assigned to generically typed field symbols using the statement ASSIGN, or to a formal parameter in procedure calls, the system checks whether its concrete data type is compatible with it, that is whether it is a subset of the generic type.

The only generic types that can be used after TYPE REF TO are data, for the generic typing of data references, and object for the generic typing of object references.

Type Description
any Any data type
any table Internal table with any table type
c Text field with a generic length
clike Character-like (c, d, n, t, string, and character-like flat structures); in non- Unicode programs also x, xstring, and any flat structures
csequence Text-like (c, string)
data Any data type
decfloat Decimal floating point number (decfloat16, decfloat34)
hashed table Hashed table
index table Index table
n Numeric text with generic length
numeric Numeric (i (b, s), p, decfloat16, decfloat34, f)
object Any object type (root class of the inheritance hierarchy)
p Packed number with generic length and generic number of decimal places
simple Elementary data type including structured types with exclusively character-like flat components
sorted table Sorted table
standard table Standard table
table Standard table
x Byte field with generic length
xsequence Byte-like (x, xstring)

Besides the predefined generic types shown in the table above, ABAP at present includes exactly one kind of self-defined generic type: A table type defined with TYPES - TABLE OF or defined in ABAP Dictionary is generic if the primary table key is not defined or is incompletely defined and if the secondary table key of the table type is generic.

Notes