|
SAP ABAP:
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.
所以6表示的应该小数点前后各6,故是 6 * 2 ,但是要扣除一个字符位 ,所以为 (-10^(2len -1) +1) / (10^(+dec)) = -10000
到 (+10^(2len -1) -1) /(10^(+dec)) = 10000
所以值得范围应该是 1000 到 -1000 ,小数位你写再多,最后也是只留7位的。
|