‎2013 Nov 13 7:11 AM
hello experts,
I am using BAPI_ACC_DOCUMENT_POST in a z program to post general ledger account document by uploading an excel file. The problem is, if i give the same input in FB50,document is created and the exchange rate is taken based on posting date (from TCURR). But in, the bapi it is taking based on Document date..what am i doing wrong?
‎2013 Nov 14 11:17 AM
Exchange rate will be calculated based on the translation date. By default system will calculate the translation date as positing date.
I think in this case you have to pass the posting date and check the results with OC41 txn.
g_accit-wwert = gs_bapi_accit-trans_date
gs_accit-wwert is initial and
not gs_bapi_acchd-trans_date is initial.
gs_accit-wwert = gs_bapi_acchd-trans_date.
endif.
‎2013 Nov 13 7:19 AM
What are you passing in posting date and CURRENCYAMOUNT? What data are you passing to the bAPI?
‎2013 Nov 13 7:46 AM
hi nabheet ,
posting date as 10/31/2012 and doc date as 10/1/2013.
in currency amount : curr_type = 00 , currency = ARS and the amount.
document currency is ARS and group currency is USD.
‎2013 Nov 13 7:55 AM
Hi
Can you please put a break point in subroutine
fill_acccr_from_bapi_acccr. Inside it is determining exchange rate in sub routine.
Debug and check how it is determining.
Nabheet
‎2013 Nov 14 9:44 AM
plz tell me what shoud i pass as translation date in the header? for now the program is passing sy-datum. I think this is causing the problem. Should i leave it blank?
‎2013 Nov 14 9:49 AM
You can try two things..
First is try with Blank.. and check..
Or you can pass the posting date...Check what is the translation date SAP is defauloting in the tcode.
‎2013 Nov 14 11:17 AM
Exchange rate will be calculated based on the translation date. By default system will calculate the translation date as positing date.
I think in this case you have to pass the posting date and check the results with OC41 txn.
g_accit-wwert = gs_bapi_accit-trans_date
gs_accit-wwert is initial and
not gs_bapi_acchd-trans_date is initial.
gs_accit-wwert = gs_bapi_acchd-trans_date.
endif.