Show TOC

Data Types and Data ObjectsLocate this document in the navigation structure

ABAP statements handle data objects. These data objects consume memory and have a data type. A data type exists either as a property of a data object or as a standalone template for multiple data objects. Standalone data types are defined (either in the local program or globally) in ABAP Dictionary or in local classes and interfaces Database tables in the central SAP system database are defined only in ABAP Dictionary. Their structures can be used as a data type.

Elementary Data Types

Elementary data types and data objects are defined with reference to the following predefined ABAP types:

  • c- Text fields with a fixed number of characters.

  • d- Date fields with length 8 containing a date in YYYYMMDD format. Calculations interpret a date as the number of days since 01.01.0001.

  • decfloat16, decfloat34- Decimal floating point numbers as specified by IEEE-754-2008.

  • f- Binary floating point numbers as specified by IEEE-754.

  • i- Integer numbers with a length of 4 or 8 bytes.

  • n- Numeric text fields with a fixed number of digits.

  • p- Packed numbers in BCD (Binary Coded Decimals) format.

  • string- Text strings with any number of characters.

  • t- Time fields with length 6 containing a time in HHMMSS format. Calculations interpret a time as the number of seconds since midnight.

  • x- Byte fields with a fixed number of bytes.

  • xstring- Byte strings with any number of bytes.

Reference Types

The data objects associated with reference types are reference variables and contain references (or pointers) to other data objects (data references) or to instances of classes (object references).

Composite Types

Composite types are constructed from a mixture of other types.

  • Structures consist of a fixed number of components with any type. They can be edited either as an entire structure or by component.

  • Internal tables consist of any number of rows with any type. They can be edited as a entire table, by row, or by component.

Generic Types

Generic types, whose properties are not defined in full, can be used for the typing of the interface parameters of procedures and field symbols.