Hi Mansi,
We have a custom program which post's the document to fb01 , we will get the data in flat file ..earlier it is working fine for all scenarious ( Even intercompany postings) earlier they have not provideed the exchange rate in file..but now they are providing the exchange rate in file ( There own exchange rate ..not as maintained in tcurr table )...so when i run the program it is giving the error
Minor difference * USD 30 cannot be allocated across company codes
from FM
CALLFUNCTION'BAPI_ACC_DOCUMENT_CHECK'
EXPORTING
documentheader = gwa_header
TABLES
accountgl = gt_accountgl
accountreceivable = gt_accountreceivable
accountpayable = gt_accountpayable
accounttax = gt_accounttax
currencyamount = gt_currency
criteria = gt_criteria
return = lt_check.
we are populating the currency structure below
gwa_currency-itemno_acc = gv_itemno.
gwa_currency-currency = gwa_prev-waers.
IF gwa_prev-shkzg NE gc_succ.
gwa_prev-wrbtr = gwa_prev-wrbtr * -1.
ENDIF.
gwa_currency-amt_doccur = gwa_prev-wrbtr.
IF gwa_prev-kursf IS NOT INITIAL.
gwa_currency-exch_rate = gwa_prev-kursf
ENDIF
APPEND gwa_currency TO gt_currency.
CLEAR gwa_currency
After this we are using
BAPI_ACC_DOCUMENT_POST.
We are getting error message from BAPI_ACC_DOCUMENT_CHECK.
Please help how to avoid this error and post the document...it is working fine when we do the same using fb01 manually it is getting posted...
Regards
Ajay.k