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

currency conversion

Former Member
0 Likes
951

Hi all,

I need to convert the currency using exchange rate which i m taking from vbrp-kurrf filed. Pls suggest me if any function module is available for conversion.

I hv tried FM 'CONVERT_TO_LOCAL_CURRENCY' but i think it doen't convert currency according to exchange rate which we supplying.

Shital.

1 ACCEPTED SOLUTION
Read only

0 Likes
879

Hi Shital,

FM 'CONVERT_TO_LOCAL_CURRENCY' will convert the currency according to exchange rate we provide. But u need to pas the correct import parameters for this functionality.

along with the rate, u need to send the Type of rate M=Average rate

G=Bank buying rate

B=bank selling rate

Please check if u r passing this also.

Regards,

Sree.

Hi all,

I need to convert the currency using exchange rate which i m taking from vbrp-kurrf filed. Pls suggest me if any function module is available for conversion.

I hv tried FM 'CONVERT_TO_LOCAL_CURRENCY' but i think it doen't convert currency according to exchange rate which we supplying.

Shital.

5 REPLIES 5
Read only

Former Member
0 Likes
879

HI

Use this FM

CONVERT_CURRENCY_BY_RATE

to get the factor make use of TCURR table

Regards

Shiva

Read only

0 Likes
879

I am trying the same FM but since i m exporting FROM_FACTOR & TO_FACTOR from table TCURR.the value for these field is 0. so it is going in dump.

SELECT SINGLE * FROM tcurr WHERE

fcurr = g_r_vbrk-waerk

AND tcurr = t001-waers.

CALL FUNCTION 'CONVERT_CURRENCY_BY_RATE'

EXPORTING

from_amount = l_f_foreign

from_currency = g_r_vbrk-waerk

from_factor = tcurr-ffact

rate = g_f_kurrf

to_currency = t001-waers

to_factor = tcurr-tfact

IMPORTING

to_amount = l_f_local

EXCEPTIONS

no_rate_found = 1

OTHERS = 2.

Read only

Former Member
0 Likes
879

Hi,

Check out this thread.

Reward if helpful.

Regards,

Ramya

.

Read only

0 Likes
880

Hi Shital,

FM 'CONVERT_TO_LOCAL_CURRENCY' will convert the currency according to exchange rate we provide. But u need to pas the correct import parameters for this functionality.

along with the rate, u need to send the Type of rate M=Average rate

G=Bank buying rate

B=bank selling rate

Please check if u r passing this also.

Regards,

Sree.

Read only

0 Likes
879

Hi,

I am importing the type_of_rate as 'M' and READ_TCURR = ' '.

But the o/p for both the cases is same.

1> without exporting rate

2> with exporting rate