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

Need Currency Conversion

Former Member
0 Likes
1,057

Hi All,

Could you please let me know any function module for Currency conversion.

Amount in one currency should be convereted to EUROs.

I have used the following FMs CONVERT_TO_LOCAL_CURRENCY, CONVERT_TO_FOREIGN_CURRENCY.

But its not returning any value.

Table TCURR is maintained for the given values.

Please help.

Thanks,

Sarika.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
986

Hi

To get the current exchange rate, use the FM

BAPI_EXCHANGERATE_GETDETAIL.

It enables conversion from 1 currency to another based on exchange rate prevailing on a particular date.

The result of the FM is the value of exchange rate, which multiplied with "from" currency will give you the amount in "to" currency.

Cheers

Ravish

8 REPLIES 8
Read only

Former Member
0 Likes
986

Hi Sarika,

Will you tell me that you have to make the conversion into euro from which currency.

Read only

0 Likes
986

Form any local currency, which will be maintained in infotype 0008 Basic pay.

Read only

0 Likes
986

HI,

try to use this fm

'HR_ECM_CONVERT_CURRENCY'

hope this will work.

Read only

Former Member
0 Likes
986

Hi

The fms CONVERT_TO_LOCAL_CURRENCY and CONVERT_TO_FOREIGN_CURRENCY are right, but u can't test it in trx SE37.

If you want to see the result u should create a little program.

Max

Read only

Former Member
0 Likes
986

check if u r passing correct parameters to the FM or not, coz thse FM's are meant to solve ur kind of requirement only.

Read only

Former Member
0 Likes
986

Hi Sarika,

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

CLIENT = SY-MANDT

date = sy-datum

foreign_amount = 'Amt to be converted'

foreign_currency = 'Source currency'

local_currency = 'Target currency EURO here'

IMPORTING

LOCAL_AMOUNT = 'target amount (u ll get this)'

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.

If you directly execute in SE37, idont think you will get the output.

Run this in a report program by passing all relevant values.

Hope this helps you.

Regards,

Anand.

Read only

0 Likes
986

Thank alot.

It has solved my problem.

Read only

Former Member
0 Likes
987

Hi

To get the current exchange rate, use the FM

BAPI_EXCHANGERATE_GETDETAIL.

It enables conversion from 1 currency to another based on exchange rate prevailing on a particular date.

The result of the FM is the value of exchange rate, which multiplied with "from" currency will give you the amount in "to" currency.

Cheers

Ravish