Search code examples
abapsap-data-dictionary

Do QUAN fields in SAP allow storing blank/null values?


Does a QUAN field allow null/blank values to be stored? Or must a number be stored in it at all times?

Not asking whether the default value can be displayed as blank, but whether a blank/null value can be stored in a QUAN field in a way that can be distinguished from the default value, e.g. if the default value is zero. It's stored in BCD, so it hypothetically could encode non-numeric values if SAP allows it.


Solution

  • There are two completely different BCD, so maybe you are confusing them:

    • BCD format used by SAP internally for ABAP packed variables (of type P), and which corresponds to ABAP Dictionary types QUAN, CURR or DEC
    • character-encoding BCD format.

    So, the answer is no, BCD-packed fields may encode only digits 0 to 9 and sign (and the position of the decimal point is defined by its associated type).

    References: