SAP DDIC BUILTIN TYPE USAGE



Get Example source ABAP code based on a different SAP table
  



ABAP_DDIC - Use of the Built-In Dictionary Types
The built-in types in ABAP Dictionary are used for the definition of the elementary parts of all data types, including reference types in ABAP Dictionary, and for specifying some types in ABAP SQL and ABAP CDS. The built-in types in ABAP Dictionary can be specified in the places specified below. No other places are possible.
Data elements A data element for an elementary data type has either a directly specified built-in type or a type specified using a domain. If a data element is used for typing in an ABAP program, the data element's dictionary type is mapped to a built-in ABAP type in accordance with the last column of the tables of built-in types.
DDIC structures, DDIC database tables,
BEGIN_SECTION VERSION 5 OUT and DDIC views
END_SECTION VERSION 5 OUT The elementary components of a DDIC structure have either a directly specified built-in 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 built-in ABAP types in accordance with the last column of the tables of built-in types. The same applies to the table fields of DDIC database tables
BEGIN_SECTION VERSION 5 OUT and view fields of DDIC views
END_SECTION VERSION 5 OUT .
DDIC table types The line types of a table type are defined using existing data types from ABAP Dictionary, whose elementary components have a built-in type as explained 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 built-in ABAP types in accordance with the tables of built-in types .
Reference types Data elements, components of structures, or line types of table types can all be reference types. Reference types for data reference variables with an elementary static data type are defined by specifying a built-in type directly or by using a data element.
Types specified in SQL
Typing of elements and input parameters of CDS entities in ABAP CDS.
Cast expression cast in the CDS DDL in ABAP CDS.
Typed literals in ABAP CDS.
SQL expression CAST in AB_SQL .
Typed literals in AB_SQL .
The data type of all elementary components in a CDS entity, such as view fields, literals, parameters, and other operands is based indirectly on the built-in data types in ABAP Dictionary.
In ABAP programs, TYPE references to the built-in data types in ABAP Dictionary are possible only by using the DDIC data types above. No other TYPE reference to a built-in DDIC type is supported from an ABAP program. Alongside their role in defining data types, these built-in types in ABAP Dictionary must also be considered in AB-SQL statements
BEGIN_SECTION VERSION 5 OUT and when working with dynpros
END_SECTION VERSION 5 OUT :
AB-SQL statements work with DDIC database tables whose columns have external data types to which the actual platform-dependent types of the databases are mapped.
BEGIN_SECTION VERSION 5 OUT
In Screen Painter, dynpro fields are also declared with reference to external data types. In a dynpro field, the special semantic properties of its data type are usually significant and are evaluated for input masks and for checking input.
END_SECTION VERSION 5 OUT



Latest notes:

In ABAP CDS, a built-in dictionary type type is specified by ABAP.type, which is in fact a bit misleading.
In ABAP development, only mappings from the built-in dictionary types to the built-in ABAP types are relevant. In database accesses using AB_SQL , the actual database type, such as NVARCHAR, is hidden by the dictionary type (in this case CHAR).
When referring to built-in dictionary types in ABAP programs, the initial value of elementary data types is not the initial value assigned to the built-in dictionary types but the initial value of the mapped built-in ABAP types .
For some built-in dictionary types, there are predefined data elements of the same name for common usage.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_VX5
The following type reference in an ABAP program does not use the built-in type INT2 directly. Instead, it used the identically named data element INT2 whose type is itself defined using the identically named domain INT2. The domain finally uses the built-in type INT2:
ABEXA 00992
ABAP_EXAMPLE_END