Get Example source ABAP code based on a different SAP table
• b ABAP_TYPE • decfloat16 ABAP_TYPE • decfloat34 ABAP_TYPE • f ABAP_TYPE • i ABAP_TYPE • int8 ABAP_TYPE • p ABAP_TYPE • s ABAP_TYPE
Built-In Numeric Types The data objects of the numeric data types> are used to store numeric values.
PropertiesType>Length>Standard Length> Meaning> Data Object> b>1 byte Internal 1-byte integer type>1 byte integer> s>2 byte Internal 2-byte integer type > 2 byte integer> i>4 byte 4-byte integer type> 4 byte integer> int8>8 byte 8-byte integer type >8 byte integer> p>1 to 16 bytes8 byte Packed number type>Packed number> decfloat16>8 byte Decimal floating point number type> with 16 places Decimal floating point number> with 16 places decfloat34>16 byte Decimal floating point number type> with 34 places Decimal floating point number> with 34 places f>8 byte Binary floating point number type> with 17 places Binary floating point number> with 17 places
Value Ranges and Initial ValuesType>Value Range>Initial Value> b>0 to 2550 s>-32,768 to +32,7670 i>-2,147,483,648 to +2,147,483,6470 int8>-9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 0 p>The valid length for packed numbers is between 1 and 16 bytes. Two places are packed into one byte, where the last byte contains only one place and the sign, which is the number of places or places calculated from 2 * len1>. After the decimal separator, up to 14 decimal places> are allowed (the number of decimal places should not exceed the number of places). Depending on the field length len> and the number of decimal places dec>, the value range is: (-10^(2len-1) +1) / (10^(+dec))> to (+10^(2len-1) -1) /(10^(+dec))> in increments of 10^(-dec)>. Any intermediate values are rounded decimally. Invalid content produces undefined behavior.0 decfloat16>Decimal floating point numbers of this type are represented internally with 16 places in accordance with the IEEE-754-2008 standard. Valid values are numbers between <(>1E385(1E-16 - 1)<)> and <(>-1E-383<)> for the negative range, 0 and <(>+1E-383<)> to <(>1E385(1 - 1E-16)<)> for the positive range. Values between the ranges form the subnormal range and are rounded. Outside of the subnormal range, each 16-digit decimal number can be represented exactly with a decimal floating point number of this type.0 decfloat34>Decimal floating point numbers of this type are represented internally with 34 places in accordance with the IEEE-754-2008 standard. Valid values are numbers between <(>1E6145(1E-34 - 1)<)> and <(>-1E-6143<)> for the negative range, 0 to <(>+1E-6143<)> and <(>1E6145(1 - 1E-34)<)> for the positive range. Values between the ranges form the subnormal range and are rounded. Outside of the subnormal range, each 34-digit decimal number can be represented exactly using a decimal floating point number.0 f>Binary floating point numbers are represented internally according to the IEEE-754 standard (double precision). In ABAP, 17 places are represented (one integer digit and 16 decimal places). Valid values are numbers between -1.7976931348623157E+308 and -2.2250738585072014E-308 for the negative range and between +2.2250738585072014E-308 and +1.7976931348623157E+308 for the positive range, plus 0. Both validity intervals are extended to the value zero by subnormal numbers according to IEEE-754. Not every 16-digit number can be represented exactly by a binary floating point number.0
ABAP_PGL Selection of the numeric type> ABAP_PGL_END