2023 Nov 01 5:39 AM
As I understand, any amount-like field can refer to a currency key field to make the format or amount appropriate according to the currency. This can apply in CDS View, Data Dictionary (Tables, Structure, etc), ALV Report, etc
For example in ALV such as this, the AMOUNT_ESTIMATE field refers to WAERS field for currency.
lo_col ?= lo_cols->get_column( 'AMOUNT_ESTIMATE' ).
lo_col->set_currency_column( 'WAERS' ).
Is there a way to apply this similar approach to fields that are going to be exported to Spreadsheet with ABAP2XLSX?
Thanks for the help.
2023 Nov 01 10:18 AM
You mean that the currency amounts are handled a special way in ABAP, a number which you see in the debugger is displayed elsewhere differently based on the currency code (number of decimals in table TCURX-CURRDEC / Transaction OY04), for instance:
2023 Nov 01 10:21 AM
This point is currently discussed here: Currency amount to external format using zcl_excel_worksheet->bind_table don't work for 1 HUF · Issu....
There's also a discussion in the point 4 here, concerning doing a fix in ZCL_EXCEL_CONVERTER* classes (for ALV).
You're welcome in participating.
2023 Nov 01 2:03 PM
Yes, the issue would be similar to that. Thanks for the info, I'll look into that.