The following table shows the value ranges and initial values of the predefined ABAP types. For the data types n, d, and t, the valid values are a subset of their value range. Normal functioning of ABAP statements that work with data objects of this type is only guaranteed for operands with valid values.
When a data object is created, the start value is set to the initial value, if no other value is specified. In the table, it is evident that the initial value of the predefined ABAP type d is not a valid date. In the input and output fields of screens, an initial date field is displayed as empty.
Type | Value Area | Initial Value |
b | 0 to 255 | 0 |
c | Any alphanumeric character | " " for every position |
d | 8 user-defined alphanumeric characters; Only values in the format YYYYMMDD that are permitted as date entries according to the calendar rules are valid: YYYY (year): 0001 to 9999, MM(month): 01 to 12, DD (day): 01 to 31 | "00000000" |
f | Floating point numbers are displayed internally with 16 decimal places according to the IEEE-754 standard (double precision). Valid values are -1,7976931348623157EE+308 to -2,2250738585072014EE-308 for the negative area, the value zero, and +2,2250738585072014EE-308 to +1,7976931348623157EE+308 for the positive area. Both validity areas are extended in the direction of zero through denormalized numbers after IEEE-754. | 0 |
i | -2.147.483.648 to +2.147.483.647 | 0 |
n | Any alphanumeric characters, however, valid values are only the digits 0 to 9 | "0" for every position. |
p | The valid length for packed numbers is between 1 and 16 bytes; two decimal places are packed into one byte, whereby the last byte only contains one place and the plus/minus sign; after the decimal separator, up to 14 decimal places are permitted. Depending on the field length len and the number of decimal places dec, the following applies for the value area: (-10^(2len -1) +1) / (10^(+dec)) to (+10^(2len -1) -1) /(10^(+dec)) in steps of 10^(-dec). Values in between this range are rounded off. | 0 |
string | as for type c | empty string of length 0 |
s | -32.768 to +32.767 | 0 |
t | 6 user-defined alphanumeric characters; the only valid values are numbers that are interpreted as a time specification in the 24-hour clock format HHMMSS. SAP recommmends to exclusively use 00 to 23 hours for HH (hours) and 00 to 59 for MM (minutes) and 00 to 59 for SS (seconds). | "000000" |
x | hexadecimal characters 0-9, A-F | hexadecimal 0 |
xstring | as for type x | empty string of length 0. |
According to the formula in the table, the value area of a packed number with length 2 and two decimal places is (-10^(2x2 -1) +1) / (10^2) bis (+10^(2x2 -1) -1) / (10^2) and therefore =-9.99 to +9.99 in steps of 0.01. A value within this range, for example, 1.428, is rounded up to 1.43.