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

Wrong local currency coversion

ratana_pouy
Participant
0 Likes
1,125

Dear All,

In SQ02, i am using a function to convert other currency to local currency. when i generate the report, converted amount doesn't match with fbl1n.

i already check amount document currency+Exchange rate with query are the same.

FBL1N:

Amount in document currency [THB]=52,747.84

Ex.Rate=/34.94160

Local Amount currency [USD] = 1,509.60

but;

Query:

Amount in document currency [THB]=52,747.84

Ex.Rate=/34.94160

Local Amount currency [USD] = 1,481.28

Between FBL1N & Query is different 28.32, why???

please help....

Here's ABAP Code in Query:

DATA: v_da TYPE RBKP-BUDAT,

      v_fa TYPE RSEG-WRBTR,

      v_fc TYPE RBKP-WAERS,

      rate TYPE RBKP-KURSF.

CLEAR: v_fa, v_fc, AMOUNTLC.

v_da = RBKP-BUDAT. "Date

v_fa = RSEG-WRBTR. "amount in document

v_fc = RBKP-WAERS. "document currency

if RSEG-SHKZG = 'H'.

AMOUNTLC = AMOUNTLC * -1.

endif.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

    EXPORTING

      date             = v_da

      foreign_amount   = v_fa

      foreign_currency = v_fc

      local_currency   = 'USD' "system local currency

     RATE             = rate "Rate field

   TYPE_OF_RATE     = 'M' "type of Rate:tcode OB08

    IMPORTING

      local_amount     = AMOUNTLC. "new field

Dear All,

In SQ02, i am using a function to convert other currency to local currency. when i generate the report, converted amount doesn't match with fbl1n.

i already check amount document currency+Exchange rate with query are the same.

FBL1N:

Amount in document currency [THB]=52,747.84

Ex.Rate=/34.94160

Local Amount currency [USD] = 1,509.60

but;

Query:

Amount in document currency [THB]=52,747.84

Ex.Rate=/34.94160

Local Amount currency [USD] = 1,481.28

Between FBL1N & Query is different 28.32, why???

please help....

Here's ABAP Code in Query:

DATA: v_da TYPE RBKP-BUDAT,

      v_fa TYPE RSEG-WRBTR,

      v_fc TYPE RBKP-WAERS,

      rate TYPE RBKP-KURSF.

CLEAR: v_fa, v_fc, AMOUNTLC.

v_da = RBKP-BUDAT. "Date

v_fa = RSEG-WRBTR. "amount in document

v_fc = RBKP-WAERS. "document currency

if RSEG-SHKZG = 'H'.

AMOUNTLC = AMOUNTLC * -1.

endif.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

    EXPORTING

      date             = v_da

      foreign_amount   = v_fa

      foreign_currency = v_fc

      local_currency   = 'USD' "system local currency

     RATE             = rate "Rate field

   TYPE_OF_RATE     = 'M' "type of Rate:tcode OB08

    IMPORTING

      local_amount     = AMOUNTLC. "new field

2 REPLIES 2
Read only

former_member218424
Participant
0 Likes
799

hi,

check if the values are maintained in tcurr table.. kurst = 1001 (Current exchange rate)

Read only

Former Member
0 Likes
799

Hi,

I Think system is picking Ex.Rate = /35.6096, So check whether this value is maintained in your table or valid for the date.

Regards,

Venu