Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Predefined types, data objects, and functions →  Predefined Data Types →  Predefined Types in ABAP Dictionary 

Use of Predefined Data Types from ABAP Dictionary

The following table shows the data types from ABAP Dictionary which are built from its predefined types and can be addressed in an ABAP program. The elementary components of these data types are converted into predefined ABAP data types in accordance with the last column of the table of predefined dictionary types; the number of digits m is converted into lengths.

Data Types in ABAP Dictionary Data Types in ABAP
Data Element Elementary data type, reference type
Structure, database table, view Structured data type
Table type Table type

As well as defining data types, the predefined types from ABAP Dictionary must be respected in Open SQL statements and when working with screens:

  • Open SQL statements work with database tables which are defined in ABAP Dictionary and whose columns have external data types.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • When using data types from ABAP Dictionary which are based on the predefined types RAWSTRING, STRING, and SSTRING, you have to consider in ABAP programs that the maximum lengths defined in ABAP Dictionary have no effect on the assigned ABAP types string and xstring. As a result, writing a string that is too long to a database can raise an exception. If required, you therefore have to apply a length restriction for strings in ABAP programs, for which the predefined function dbmaxlen can be used.

  • When using the predefined type CHAR for database fields, remember that its maximum length is limited to 1333. Data elements of the type CHAR whose length is greater than 1333 cannot be used as types of database fields.

  • When using the predefined types RAWSTRING, STRING, and SSTRING for database fields, the maximum lengths can be interpreted as notes to the database system. While LOBs of types RAWSTRING and STRING are also usually handled as deep data objects in the database, database fields of type SSTRING are usually stored flat. The actual handling, however, depends on the individual database system and is not important for ABAP programs.

  • For the definition of a data type that is based on the predefined types CURR, DEC, DF34_DEC, DF16_DEC and QUAN, an odd number of digits must be used. These values are stored in BCD format, for which in ABAP (data type p), only an odd number of digits is possible, since a half byte is used for the sign. If you specify an even number of digits, the assigned ABAP type has the next biggest odd number of digits and as a result, may lead to an overflow and an exception when writing to the database.

  • A component of structures or database tables that has the data type LANG, can be identified as text language. Text language is used to convert character-like components of the structure when importing data from data clusters and for binary RFC protocols for passing TABLES parameters between MDMP systems and Unicode systems.

  • For information on how to use currency fields of type CURR, see Currency Fields.

  • For information on how to use quantity fields of type QUAN, see Quantity Fields.

Continue

Decimal Floating Point Numbers in ABAP Dictionary

Currency Fields

Quantity Fields