‎2007 Feb 06 1:42 PM
Dear friends
Can any one show me what is the use of below function and which parameters should pass
CONVERT_TO_LOCAL_CURRENCY
Thanks
karthik
‎2007 Feb 06 1:44 PM
Hi,
u can Translate foreign currency amount to local currency.
u have to pass the values for:
DATE
FOREIGN_AMOUNT
FOREIGN_CURRENCY
LOCAL_CURRENCY
regards,
madhu
‎2007 Feb 06 1:44 PM
Check this example:
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING DATE = BKPF-WWERT
FOREIGN_CURRENCY = BKPF-WAERS
LOCAL_CURRENCY = T001-WAERS
FOREIGN_AMOUNT = BSEG-WRBTR
RATE = BKPF-KURSF
TYPE_OF_RATE = 'M'
IMPORTING EXCHANGE_RATE = KURS
LOCAL_AMOUNT = BSEG-DMBTR
FOREIGN_FACTOR = FAKTOR-F
LOCAL_FACTOR = FAKTOR-L
FIXED_RATE = FIXKURS
EXCEPTIONS NO_RATE_FOUND = 4
NO_FACTORS_FOUND = 8.
Regards,
Ravi
‎2007 Feb 06 1:45 PM
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
* CLIENT = 001
DATE = sy-datum
FOREIGN_CURRENCY = wa1-WAERS " here you need to declare your foreign currency i.e USD
LOCAL_CURRENCY = TCURR-FCURR
FOREIGN_AMOUNT = wa1-DMBTR " here you need to declare your amount field.
* RATE = tcurr-ukurs
TYPE_OF_RATE = 'M' " check this also the average rate
* READ_TCURR = 'X'
IMPORTING
EXCHANGE_RATE = tcurr-UKURS
* FOREIGN_FACTOR =
LOCAL_AMOUNT = wa1-TOTAL " this is the field where the converted amt has to be displayed.
* LOCAL_FACTOR =
* EXCHANGE_RATEX =
* FIXED_RATE =
* DERIVED_RATE_TYPE =
* 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.
‎2007 Feb 06 1:45 PM
Hi Karthik,
Translate foreign currency amount to local currency
An amount in local currency is calculated from a specified foreign
currency amount. For this, you may either specify the translation rate
manually (Parameter RATE) or have the system determine it from table
TCURR on the basis of the rate type, date and currency key. Because the
ratios for the units of the currencies involved in the translation are
significant for this translation, table TCURF is always read by the
program, and there must be a valid entry there for the data specified.
IF exchange rate fixing is defined for the exchange rate type
TYPE_OF_RATE or an alternative exchange rate is defined for the currency
pair, this information is transferred to the calling program.
When table TCURR is read, the foreign currency key is always taken as
the first part of the key and the local currency as the second part.
For More Information you can click on the FM document in SE37
‎2007 Feb 06 1:45 PM
HI,
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
CLIENT = SY-MANDT
date = sy-datum
foreign_amount = amount " changed here
foreign_currency = 'CAD'
local_currency = 'USD'
RATE = 0
TYPE_OF_RATE = 'M'
READ_TCURR = 'X'
IMPORTING
EXCHANGE_RATE =
FOREIGN_FACTOR =
LOCAL_AMOUNT = Local
Regards
Sudheer
‎2007 Feb 06 1:48 PM
hi,
u use it to convert foreign currency(usd) to local currency (inr).
pass date , foreign amount = specify here the amount in say usd (dollars)
under foreign currency - usd
local currency - inr
and in exporting parameter u get the local amount