Hi,
I have come across a requirement where data in a standard table is to be displayed as ALV output taking into consideration of their respective currencies. I have created the field catalog where the entry for amount field has the field name of currency present in the internal table. The code looks like,
x_fieldcat-tabname = 'T_OUTPUT'.
x_fieldcat-fieldname = 'GROSS_AMOUNT'.
x_fieldcat-cfieldname = 'CURRENCY'. "currency is a field in T_OUTPUT holding currency values like USD, JPY etc
APPEND x_fieldcat TO t_fieldcat.
But, since the gross_amount has amount value with four decimal places, the values are appearing wrong (values appear to be multiplied by 100 for all currencies).
Really appreciate the help.
~Athreya