Skip to Content
0
Former Member
Oct 01, 2012 at 12:58 PM

FM CONVERT_TO_LOCAL_CURRENCY

34 Views

Hi all.

I'm using FM CONVERT_TO_LOCAL_CURRENCY in a program, but it doesn't work. My code is:

DATA: aux(200).


CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

EXPORTING

* CLIENT = SY-MANDT

date = sy-datum

foreign_amount = p_zovh_overhead

foreign_currency = zovh-twaer

local_currency = 'EUR'

RATE = 0

TYPE_OF_RATE = 'M'

READ_TCURR = 'X'

IMPORTING

* EXCHANGE_RATE =

* FOREIGN_FACTOR =

LOCAL_AMOUNT = AUX

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

In variable AUX any value is get. I have tested this FM in sm37 and it doesn't work.

Can you help me? Thanks a lot.

Marta.