2016 Jun 03 5:44 AM
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
2016 Jun 03 6:09 AM
hi,
check if the values are maintained in tcurr table.. kurst = 1001 (Current exchange rate)
2016 Jun 03 10:52 AM
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