Skip to content

ABAP Keyword Documentation →  ABAP Dictionary →  Predefined Data Types in ABAP Dictionary 

Use of the Predefined Dictionary Types

The predefined types in ABAP Dictionary are used to define the elementary parts of all data types, including reference types in ABAP Dictionary. At the same time, this is also the only possible use of these predefined types:

A data element for an elementary data type has either a directly specified predefined type or a type specified using a domain. In references to data elements in an ABAP program, this type is mapped to predefined ABAP type in accordance with the last column of the tables of predefined types.
The elementary components of a structure have either a directly specified predefined type or a type specified using a data element. In references to structures in an ABAP program, the structures are mapped to a structured type, where the elementary components are mapped to predefined ABAP types in accordance with the last column of the tables of predefined types. The same applies to the table fields of database tables and view fields of classic views.
The row types of a table type are defined using existing data types from ABAP Dictionary, whose elementary components have a predefined type (as shown above). When a reference is made to a table type in an ABAP program, the type is mapped to a matching ABAP type. Here, the elementary components are mapped to predefined ABAP types in accordance with the tables of predefined types.
  • Reference types
Data elements, components of structures, or row types of table types can be reference types. Reference types for data reference variables with an elementary static data type are defined by specifying a predefined type directly or by using a data element.
The data type of all elementary components in a CDS view, such as view fields, literals, parameters, and other operands is based on the predefined data types in ABAP Dictionary.

Unlike when using these data types, references to the predefined data types in ABAP Dictionary are not possible in ABAP programs. As well as defining data types, the predefined types from ABAP Dictionary must be respected in Open SQL statements and when working with dynpros:

  • Open SQL statements work with database tables defined in ABAP Dictionary whose columns have external data types to which the actual platform-dependent types of the databases are mapped.
  • Screen fields are declared in Screen Painter, also with reference to external data types. In dynpro fields, the special semantic attributes of their data type are usually significant and are evaluated for input masks and for checking input.

Other versions: 7.31 | 7.40 | 7.54


Note

In ABAP development, only mappings from the predefined dictionary types to the predefined ABAP types are relevant. In database accesses using Open SQL, the actual database type, such as NVARCHAR, is replaced by the dictionary type, in this case CHAR.


Example

The following type reference in an ABAP program does not use the predefined type INT2 directly. Instead, it used the identically named data element INT2 whose type is itself defined using the identically named domain INT2. Here, the predefined type INT2 is specified.

DATA num TYPE int2.