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

currency query

Former Member
0 Likes
356

i am using this function module for the currency conversion.

please tell is the fields correct that i am passing through it and how will be the date and currency field declaration.

please elaborate,

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

CLIENT = SY-MANDT

date = b_date

foreign_currency = 'USD'

local_amount = g_usd1

local_currency = 'BRL'

  • RATE = '0.57208'

  • type of rate = 'M'

IMPORTING

  • EXCHANGE_RATE =

FOREIGN_AMOUNT = g_usd

  • 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

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

1 ACCEPTED SOLUTION
Read only

arjun_thakur
Active Contributor
0 Likes
334

hi tanisha,

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

DATE = BKPF-WWERT

FOREIGN_CURRENCY = BKPF-WAERS

LOCAL_CURRENCY = T001-WAERS

LOCAL_AMOUNT = BSEG-DMBTR

RATE = BKPF-KURSF

TYPE_OF_RATE = 'M'

IMPORTING

EXCHANGE_RATE = KURS

FOREIGN_AMOUNT = BSEG-WRBTR

FOREIGN_FACTOR = FAKTOR-F

LOCAL_FACTOR = FAKTOR-L

EXCEPTIONS

NO_RATE_FOUND = 4

NO_FACTORS_FOUND = 8.

regards

arjun

1 REPLY 1
Read only

arjun_thakur
Active Contributor
0 Likes
335

hi tanisha,

CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

EXPORTING

DATE = BKPF-WWERT

FOREIGN_CURRENCY = BKPF-WAERS

LOCAL_CURRENCY = T001-WAERS

LOCAL_AMOUNT = BSEG-DMBTR

RATE = BKPF-KURSF

TYPE_OF_RATE = 'M'

IMPORTING

EXCHANGE_RATE = KURS

FOREIGN_AMOUNT = BSEG-WRBTR

FOREIGN_FACTOR = FAKTOR-F

LOCAL_FACTOR = FAKTOR-L

EXCEPTIONS

NO_RATE_FOUND = 4

NO_FACTORS_FOUND = 8.

regards

arjun