ABAP Keyword Documentation → ABAP Dictionary → Predefined 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):
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, in relation to the types INT1 and INT2 from ABAP Dictionary.
- DEC for packed numbers
Other versions:
7.31 | 7.40 | 7.54
Notes
- An uneven number of places should be used in the definition of data types based on the predefined 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 uneven number of places. This can cause, for example, overflows and then exceptions when writing to database tables. The same applies to the predefined types CURR, DF34_DEC, DF16_DEC, and QUAN, which are handled technically like the type DEC.
- 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 predefined numeric types, the output of a sign must be defined in a domain so that negative values can be represented.