on 05-07-2018 10:59 AM
Hello guys,
due to problem of rounding I defined for some currency field in ALV grid data element with 31 digits, 14 of them decimals. The calculation works fine but the alv does not display the value correct. Which parameter do I have to set to change this?
Left you see the right value, right the 31 digits value. If I debug the report, I see that the value is stored correctly, so it actually looks like a display problem of the grid?
Regards
Michael
Hi Michael,
"Field CURRENCY means the real currency value e.g. EUR. Sure you did not mean CFIELDNAME?
In field catalog, we will mention the reference field name only, just map the Currency Field name in CFIELDNAME attribute as like below.
wa_fcat-CFIELDNAME = 'WAERS'.
If you are using SALV class to display ALV, use the method SET_CURRENCY_COLUMN method.
Regards
Rajkumar Narasimman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael/Rajkumar,
I have also faced a similar issue and linking currency value with currency Key field doesnt help as it assumes the currency value field has 2 decimals. May be you will ahve to change the fieldcatalog settings of the ALV to be able to display the total length of 31 chars along with 14 decimal places just like an packed decimal number.
Regards,
Aditya
Which option should I have to set in fieldcatalog settings? Only tried with decimals_o to set on 2 decimal digits but that has no effect.
@Rajkumar
Yes I debuged it and the field looks right like the left side on my screenshot in first posting. But in grid it looks like the right side.
Regards
Michael
Hi Michael,
In order to display Currency in correct format, you need to set Currency key field in the field catalog of Quantity field. Something like WA_FIELDCAT-CURRENCY. Now fill currency key value with your defined currency Key which has 31 digit value. ALV should be able to convert it in display.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.