Since transaction MRHR is obsolete in ERP2005, we have to upgrade our programs which used this transaction. The new SAP transaction which must be used is MIRO, but it is not possible to use MIRO in BDC's. So we have to use BAPI_INCOMINGINVOICE_CREATE for invoice verification. However, it is unclear from the BAPI documentation as to how exactly to populate it for IS-OIL use. At the moment, I am trying to post an inbound invoice for the cost of the product on an ND Purchase Order. I have updated the HeaderData import parameter with the Invoice Indicator, Document Date, Posting Date, Company Code, Currency and Gross Amount fields.
I have updated the Oildata import parameter with Filter type Z1, for Goods and Services.
I have updated the ItemData import table with Invoice Item, PO Number, PO Item, Ref_Doc, Ref_Item, Tax Code and Item Amount fields.
I have also updated the TaxData import Table with Tax Code 'P0', indicating no Tax applicable.
When I test the BAPI with the above data, I get error M8-186 - Balance is not equal to zero.
Has anyone got any ideas on how to solve this problem.