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

convert currency

Former Member
0 Likes
1,465

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
Read only

Former Member
0 Likes
1,317

hi,

use FI_CURRENCIES_CONVERT,function module..

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,317

Hi,

See FM : CONVERT_CURRENCY_BY_RATE

Rgds,

Sandeep

Read only

Former Member
0 Likes
1,317

use CONVERT_TO_LOCAL_CURRENCY

Regards,

Ajay

Read only

Former Member
0 Likes
1,317

Hi

Good

Try with FM 'HR_ECM_CONVERT_CURRENCY'.

Thanks

mrutyun^

Read only

Former Member
0 Likes
1,317

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.

Read only

Former Member
0 Likes
1,317

Hi,

You can use the floowing function module for the requiremnet

CONVERT_TO_FOREIGN_CURRENCY

Thanks & regards

Read only

Former Member
0 Likes
1,317

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.

Read only

Former Member
0 Likes
1,317

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.

Read only

Former Member
0 Likes
1,317

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