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):
- INT1, INT2, INT4, INT8 for integer numbers
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.
- DEC for packed numbers
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 typep
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 output formats for fields on dynpros and Web Dynpros and in the statements
WRITE
orWRITE 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.