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: 

convert currency

Former Member
0 Kudos

Hi friends,

I've a requirement where I want to convert 12 USD into SAR (Saudi Riyals) in SAP.

Does anybody know any standard SAP function modules which can convert amounts in one currency into another currency?

9 REPLIES 9

Former Member
0 Kudos

hi,

use FI_CURRENCIES_CONVERT,function module..

Sandeep_Kumar
Advisor
Advisor
0 Kudos

Hi,

See FM : CONVERT_CURRENCY_BY_RATE

Rgds,

Sandeep

Former Member
0 Kudos

use CONVERT_TO_LOCAL_CURRENCY

Regards,

Ajay

Former Member
0 Kudos

Hi

Good

Try with FM 'HR_ECM_CONVERT_CURRENCY'.

Thanks

mrutyun^

Former Member
0 Kudos

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

CLIENT = SY-MANDT

DATE = it_vbrp-erdat

FOREIGN_AMOUNT = it_vbrp-netwr

FOREIGN_CURRENCY = it_vbrp-waerk

LOCAL_CURRENCY = 'USD'

RATE = 0

TYPE_OF_RATE = 'M'

READ_TCURR = 'X'

IMPORTING

LOCAL_AMOUNT = gv_amount.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Former Member
0 Kudos

Hi,

You can use the floowing function module for the requiremnet

CONVERT_TO_FOREIGN_CURRENCY

Thanks & regards

Former Member
0 Kudos

Hi,

Use the below function module,

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

  • CLIENT = SY-MANDT

date =

foreign_currency =

local_amount =

local_currency =

  • RATE = 0

  • TYPE_OF_RATE = 'M'

  • READ_TCURR = 'X'

  • IMPORTING

  • EXCHANGE_RATE =

  • FOREIGN_AMOUNT =

  • FOREIGN_FACTOR =

  • LOCAL_FACTOR =

  • EXCHANGE_RATEX =

  • DERIVED_RATE_TYPE =

  • FIXED_RATE =

  • EXCEPTIONS

  • NO_RATE_FOUND = 1

  • OVERFLOW = 2

  • NO_FACTORS_FOUND = 3

  • NO_SPREAD_FOUND = 4

  • DERIVED_2_TIMES = 5

  • OTHERS = 6

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Former Member
0 Kudos

Hi ,

You can use u2018CONVERT_TO_FOREIGN_CURRENCYu2019 to covert local currency to any foreign currency

and use u2018CONVERT_TO_LOCAL_CURRENCYu2019 to covert foreign currency to local currency.

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

CLIENT = SY-MANDT

date =

foreign_currency =

local_amount =

local_currency =

  • RATE = 0

TYPE_OF_RATE = 'M'

READ_TCURR = 'X'

IMPORTING

  • EXCHANGE_RATE =

FOREIGN_AMOUNT = u2018converted amountu2019

  • FOREIGN_FACTOR =

  • LOCAL_FACTOR =

  • EXCHANGE_RATEX =

  • DERIVED_RATE_TYPE =

  • FIXED_RATE =

These function module has exchange rate date as exporting parameter.

Date will be checked against u2018OB08 u2018table to fetch exchange rate for that day.

thnks:-) pls give points if it help you anyway...thnks in advance.

Former Member
0 Kudos

Try this,

Use FM READ_EXCHANGE_RATE get the exchange rate between two currencies .Then use

CONVERT_TO_LOCAL_CURRENCY - to convert the amount in terms of SAR