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

Former Member
0 Likes
831

I need to check the Dollar value in Rupees..

Is there any FM in ABAP ?

I need to check the Dollar value in Rupees..

Is there any FM in ABAP ?

6 REPLIES 6
Read only

Former Member
0 Likes
790

Use the fm: CONVERT_CURRENCY_BY_RATE

Regards,

Ravi

Read only

Former Member
0 Likes
790

I have given the parameters

FROM_AMOUNT

FROM_CURRENCY

TO_CURRENCY

But its asking for the parameter ' Rate ' to fill.

if i dont know the exchange rate how can i proceed ?

Read only

0 Likes
790

Rate is the factor like for you it will be

1/ 45 Because 1 usd = 45 inr.

so rate = 0.022

also fill the from factor and to factor to 1.

Regards,

Ravi

Read only

RaymondGiuseppi
Active Contributor
0 Likes
790

Use FM CALCULATE_EXCHANGE_RATE to get the exchange rate,

(and CONVERT_CURRENCY_BY_RATE to convert amount)

Regards

Read only

Former Member
0 Likes
790
or u can get the exchange rate and multiply by original amount

Give Rate Type as M and date as Sy-datum


CALL FUNCTION 'BAPI_EXCHANGERATE_GETDETAIL'
    EXPORTING
      RATE_TYPE  = 'M'
      FROM_CURR  = FROM_CURR
      TO_CURRNCY = TO_CURR
      DATE       = SY-DATUM
    IMPORTING
      EXCH_RATE  = ST_XCHGRATE
      RETURN     = ST_RETURN.
Read only

Former Member
0 Likes
790

Hi John,

Try to use the below code.

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

client = sy-mandt

date = sy-datum

foreign_currency = vend_curr

local_amount = loc_amt

local_currency = loc_curr

type_of_rate = 'M'

IMPORTING

foreign_amount = v_amount1

EXCEPTIONS

no_rate_found = 1

overflow = 2

no_factors_found = 3

no_spread_found = 4

derived_2_times = 5

OTHERS = 6.

Assign the varriables as per the requirement.

Pls reward if found useful.

Thanks

Shyam