‎2007 Apr 05 12:00 AM
Hello,
I'm doing operation between two currency fields, I'm converting USD to COP.
For example 2 (USD) * 2200 (COP) = 4400 (COP).
The system stores the result as USD format, It stores the result 4400 as USD.
When I format the field in alv report, the format is worse because I format this field as COP
Thanks
Best Regads.
‎2007 Apr 05 12:09 AM
You cannot do operations like that on currencies. You have to use the currency conversion function modules CONVERT_TO_FOREIGN_CURRENCY
CONVERT_TO_LOCAL_CURRENCY .
Also the result should be stored along with the currency key. Only then it makes sense. If you do not store the currency key along with the amount, it will not work.
‎2007 Apr 05 12:09 AM
You cannot do operations like that on currencies. You have to use the currency conversion function modules CONVERT_TO_FOREIGN_CURRENCY
CONVERT_TO_LOCAL_CURRENCY .
Also the result should be stored along with the currency key. Only then it makes sense. If you do not store the currency key along with the amount, it will not work.
‎2007 Apr 05 12:09 AM
Hi,
Not sure what is your requirement..
1) If you want to convert from one currency to another currency use the FM CONVERT_TO_FOREIGN_CURRENCY
2) If the decimals is the issue use the FM CURRENCY_CONVERTING_FACTOR to get the factor..Then multiply by the factor..
Thanks,
Naren
‎2007 Apr 05 12:21 AM
Hi,
in the ALV field catalog internal table do the following..
For the amount column populate the currency fieldname "cfieldname"
DATA: S_FIELDCATALOG TYPE slis_fieldcat_alv.
S_FIELDCATALOG-FIELDNAME = 'AMOUNT COLUMN NAME'.
S_FIELDCATALOG-CFIELDNAME = 'CURRENCY COLUMN NAME'
The currency column name should be available in the output internal table..
Thanks,
Naren