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

FI_CURRENCIES_CONVERT

Former Member
0 Likes
985

Hi,

I am using this FM for currency conversion.

I need to convert from USD to EUR.

However only EUR to USD is going to be maintained in the system.

How do I get the other way round calculations done?

Thanks.

Shreyas

Help will be awarded.

7 REPLIES 7
Read only

Former Member
0 Likes
903

Please use the following FM

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

Read only

0 Likes
903

hi,

try to maintain the foll. entry with ob08:

ME USD EUR 09.08.2006 /1,28790

Andreas

Read only

Former Member
0 Likes
903

Hai Shreyas

Use the following F.M's

CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.

CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency

Check the following Code

PARAMETERS: P_UKURS LIKE TCURR-UKURS.

DATA: BEGIN OF GI_TAB OCCURS 0,

KONWA LIKE KONP-KONWA,

STPRS LIKE MBEW-STPRS,

WAERS LIKE T001-WAERS,

END OF GI_TAB.

DATA: L_STPRS LIKE MBEW-STPRS,

L_RATE LIKE TCURR-UKURS.

IF P_UKURS IS INITIAL.

CLEAR L_RATE.

ELSE.

L_RATE = P_UKURS / 100.

ENDIF.

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

DATE = SY-DATUM

FOREIGN_CURRENCY = 'USD'

LOCAL_AMOUNT = GI_TAB-STPRS

LOCAL_CURRENCY = 'EUR'

RATE = L_RATE

IMPORTING

FOREIGN_AMOUNT = L_STPRS

EXCEPTIONS

NO_RATE_FOUND = 1

OVERFLOW = 2

NO_FACTORS_FOUND = 3

NO_SPREAD_FOUND = 4

DERIVED_2_TIMES = 5

OTHERS = 6.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

DATE = SY-DATUM

FOREIGN_AMOUNT = L_BELOEB

FOREIGN_CURRENCY = 'EUR'

LOCAL_CURRENCY = 'USD'

RATE = L_RATE

  • TYPE_OF_RATE = 'M'

IMPORTING

EXCHANGE_RATE = L_RATE

  • FOREIGN_FACTOR =

LOCAL_AMOUNT = L_BELOEB

  • 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.

Thanks & regards

Sreenivasulu P

Message was edited by: Sreenivasulu Ponnadi

Read only

0 Likes
903

Hi All,

I am getting an error RAISE_EXCEPTION condition "NO_RATE_FOUND" in transaction fbz4. abap programe is "SAPLCURR_CONVERSIONS"

please help me.

thanks in advance.

srinivas

Message was edited by: Srinivas

Read only

0 Likes
903

You have to maintain valid curreny conversion rate into your system.

regards,

Naimesh

Read only

Former Member
0 Likes
903

Hi

You should insert the rate in changes table: trx OB08

Max

Read only

Former Member
0 Likes
903

See if the exchange rate is maintained in TCURR table.

Regards,

Shreyas