‎2006 Nov 14 2:26 PM
i have a requirement of formating currency field to europe currency field, but i have no idea about the format, i know it is project specific, but it will be greatful if any one can help, where can i find it, is there any table regarding that.
‎2006 Nov 14 2:29 PM
Hi
See the Table TCURT for currency types
There u can see the currency type for european countryies which u have to make reference while declaring the field.
Regs
Manas Ranjan Panda
‎2006 Nov 14 2:30 PM
hi,
check this it may help you......
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.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.
hope this helps you.
regards,
Anver
if hlped pls mark points
‎2006 Nov 14 2:38 PM
hi venkat ,
CHECK THIS CODE ..
DATA: num1 TYPE p DECIMALS 4 VALUE '12.3456',
num2 TYPE p DECIMALS 0 VALUE '123456'.
SET COUNTRY 'US'.
WRITE: 'USD', num1 CURRENCY 'USD', num2 CURRENCY 'USD',
/ 'BEF', num1 CURRENCY 'BEF', num2 CURRENCY 'BEF',
/ 'KUD', num1 CURRENCY 'KUD', num2 CURRENCY 'KUD'.u can proceed like this ..
set the country for Europe ,,
regards,
VIjay
‎2006 Nov 14 2:50 PM
if the currency field is t be coverted to euro only then
u can go for fm
CURRENCY_CONVERT_TO_EURO
pass the currency key of say italy ITL of table TCURX-CURRKEY
hope this helps ,
regards,
VIjay