10-21-2008 7:02 AM
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?
10-21-2008 7:19 AM
10-21-2008 7:20 AM
10-21-2008 7:20 AM
10-21-2008 7:21 AM
10-21-2008 7:29 AM
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.
10-21-2008 9:35 AM
Hi,
You can use the floowing function module for the requiremnet
CONVERT_TO_FOREIGN_CURRENCY
Thanks & regards
10-21-2008 9:39 AM
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.
10-21-2008 9:40 AM
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.
10-21-2008 9:45 AM
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