Skip to content

ABAP Keyword Documentation →  ABAP - Dictionary →  Built-In Data Types in ABAP Dictionary →  Attributes of the Predefined Dictionary Types →  General Dictionary Types 

Integers, Packed Numbers, Binary Floating Point Numbers

The following types are used for general descriptions of the numeric types (except for decimal floating point numbers):

These types describe general 1-byte, 2-byte, 4-byte, and 8-byte integers. The ABAP types b and s, assigned to the types INT1 and INT2, cannot be specified either statically or dynamically in ABAP statements. These types only occur in ABAP programs, by reference to the types INT1 and INT2 from ABAP Dictionary.
This type describes general packed numbers in BCD format. When used, a length and the number of decimal places must be added to the type. The number of decimal places must be less than or equal to the length and cannot exceed 14.
This type describes general binary floating point numbers. Table fields of this type cannot be used as key fields of database tables.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • An odd number of places should be used in the definition of data types based on the built-in type DEC. 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 a data type DEC has an even number of characters, however, the length of the associated ABAP type p is rounded up and hence contains the next highest odd number of places. This can cause overflows, for example, and then exceptions when writing to database tables. The same applies to the built-in types CURR, DF34_DEC, DF16_DEC, and QUAN, which are handled technically like the type DEC.

  • If the built-in types INT1, INT2, INT4, and INT8 are used to specify types, the number of places must usually be specified as 2, 5, 10, and 19. If the type FLTP is used, 16 places and the same number of decimal places must be specified. The specified number of places is generally ignored by the data types. By default, they describe platform-specific integers or binary floating point numbers and occupy 1, 2, 4, or 8 bytes.

  • In the case of integer types, the specified places express the possible decimal places without sign.

  • In the case of binary floating point numbers, 16 expresses the approximate precision of the IEEE-754 (double precision) standard.
The specified places are saved in the metadata of a self-defined type and are evaluated, if necessary, by special frameworks.

  • The output formats for fields on dynpros and Web Dynpros and in the statements WRITE or WRITE TO can be predefined for the numeric types specific to each user in the user master record. The output length required for formatted output is usually greater than the number of places in ABAP Dictionary. If the output length is too short, any formatting characters are suppressed.

  • If a dynpro field has one of the built-in numeric types, the output of a sign must be defined in a domain so that negative values can be represented.