Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem between currency types

Former Member
0 Likes
795

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
696

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.

3 REPLIES 3
Read only

Former Member
0 Likes
697

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.

Read only

Former Member
0 Likes
696

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

Read only

Former Member
0 Likes
696

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