
Quantity fields (i.e. fields of Dictionary type QUAN) generally have 3 places after the decimal point, but this depends on the assigned unit. Item specifications with the unit STK should have 0 decimal places, because units are normally in integers. This is supported for screens and lists as of Release 3.0.
Previously, the ABAP/4 Dictionary always had to contain a reference
field of the type UNIT. This reference is now taken over by the Screen Painter and is taken intoaccount at runtime by the
screen processor. If a unit from table T006 (maintenance transaction CUNI) is
found in a UNIT field, the respective QUAN field is output with as many
places after the decimal point as required according to table T006.
However, no more decimals are output than the QUAN field has according
to the ABAP/4 Dictionary. Conversely, no significant decimal places are
suppressed, so if a place after the decimal point is to be suppressed
and has a value not equal to zero, the quantity specification is output
with its defined number of decimal places. The same applies if there is no unit from the table T006 in the UNIT field.
The WRITE statement (for lists) does not automatically take the reference of a QUAN field to a UNIT field into account. Instead, you can supplement the WRITE statement using the addition UNIT; after UNIT, you specify a field with a unit, or specify the unit directly as a literal (similar to the CURRENCY addition for currency fields). WRITE with the addition UNIT makes up a quantity specification as explained above.
If a quantity specification is not display as expected, the UNIT field is probably incorrect or the unit is incorrectly defined in table T006 (maintenance transaction CUNI).