Eventually I came across surprising fact that internal ABAP Dictionary types for currency and quantity (data elements based on them) implicitly save sign information no matter what setting have been set in data element domain.
Even with the above domain the data element preserves sign in ALV. Can we prevent ALV (or ABAP) from such behavior?
I thoroughly read documentation about both CURR and QUAN but found no single word about sign. Can somebody explain this?
The only solution I ended with was to use DEC type and data-elements based on DEC.
ADDITION: simple test to check the described issue
1. Create three variables of types BNOMS
(domain BWHR
), MATQUAN
(domain MENG10
) and MENGEP
(domain MENGEP
). All these types are standard DDIC types with unchecked sign field in domain.
2. Assign a negative value to them
3. Output them to ALV
As BNOMS
and MATQUAN
types are CURR and QUAN types, they will output the sign anyways whereas MENGEP
will not, as it has DEC type.
In the run-time all they preserve sign however in ALV DEC-type domain restrictions are respected, so I tend to think it's more ALV-related issue.