Application Development 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: 

Currency Issue for INR in FM - CONVERT_TO_LOCAL_CURRENCY

dhinesh_thirugnanam
Active Participant
0 Kudos

Hi All,

I am using this FM -  CONVERT_TO_LOCAL_CURRENCY to obtain value in USD by entering the following details.User who is creating the shopping cart is from India,his attribute is INR by default.The person is creating Shopping cart for a amount of 1000 USD.

CLIENT                                      100

DATE                                        06/11/2015

FOREIGN_AMOUNT                  64750.00

FOREIGN_CURRENCY              INR

LOCAL_CURRENCY                  USD

RATE                                         0

TYPE_OF_RATE                        M

READ_TCURR                          X

I should be getting a Value as 1000 USD but instead I am getting it as 1012.69.Please suggest me what is the issue.For other countries it is working fine.

6 REPLIES 6

Former Member
0 Kudos

Hi,

Did you try passing TYPE_OF_RATE

Type of rate M=Average rate G=Bank buying rate B=bank sellin rate.

Not sure how you determined the output is wrong.

R

0 Kudos

Hi Roy,

When you create a sample program using the FM there is no need to enter M.by default it is taking M value I guess.

Based on my screenshot below for this user is from China,this person is creating Shopping cart for 1000 USD but his attribute has been maintained as CNY currency.After the currency conversion the values are same.Only for INR it is displaying differently.

0 Kudos

Hi again,

I know it is taking M by default. I am not that bad that I won't recognize that .

What I told you to try passing different values. Also try to analyze the other FM inside the Function group like CURRENCY_BUFFER_REFRESH, if that helps.

R

0 Kudos

Hi Roy,

Sorry I didn't mean it in the wrong way..I tried other option also it is the same result.Because as you see my 1st screenshot it is for INR which show different values...Same thing for the 2nd screenshot it is for CNY which shows correct USD values.

0 Kudos

Hi Again,

No worries, It happens. .

I checked your screenshot again and it is showing 1000 USD, but here you are trying to convert 64750.00 which may not be 1000 USD on the instance you are running the program. That is why asked. The screen may be showing 1000 USD as it is getting "1000"  from database or the conversion rate rate CNY and USD are pointing it 1000 USD.


But in the FM your input is 64750.00 INR which is exactly opposite to your screenshot.


Here you are not trying to convert 1000 USD or maybe XXXXX CNY , you are trying to convert 64750.00 INR.


The conversion rate may be an older one.


Check the tables TCUR* ( Mainly TCURV and TCURF ) to check the exchange rate. Or see how the currency exchange rates are updated in your system and try to check if that program/interface has worked properly or not.


R

vijayanandpaul_puvvula3
Active Participant
0 Kudos

Hello Dhinesh,

Try using the BAPI 'BAPI_EXCHANGERATE_GETDETAIL'. It gives correct details.

    CALL FUNCTION 'BAPI_EXCHANGERATE_GETDETAIL'

      EXPORTING

        rate_type  = 'M'

        from_curr  = 'INR'

        to_currncy = 'USD'

        date       = syst-datum

      IMPORTING

        exch_rate  = gs_exchrate

        return     = gs_return.

You should be aware that there could be an interface that updates the Exchange rates which you may have to run manually to update it in stadard SAP tables to get the correct exchange rates. If not, you have to manually give the latest exchange rates in transaction OC41.

Hope this helps.

Regards,

VIjay.