‎2010 May 17 12:15 PM
Hello Folks,
I'm mapping BAPI_INCOMINGINVOICE_CREATE against purchase order without success. I'm receiving the following message as you can see bellow:
E M8 186 Balance is not equal to zero: 6.097,56 BRL
If someone could help me with any tip let me know.
Best Regards
Wilson Saadeh
‎2010 May 17 12:22 PM
you can try to map it manually in the appropiate tcode. if it is correct you should get the same error code
then you must either fix the purchase order or customizing
kind regards
arthur
‎2010 May 17 12:22 PM
you can try to map it manually in the appropiate tcode. if it is correct you should get the same error code
then you must either fix the purchase order or customizing
kind regards
arthur
‎2010 May 17 12:25 PM
I'm Passing the following parameters:
headerdata-invoice_ind = 'X'.
headerdata-doc_type = 'RE'.
headerdata-doc_date = j_1bdydoc-docdat.
headerdata-pstng_date = j_1bdydoc-pstdat.
headerdata-ref_doc_no = '5000005361'.
headerdata-comp_code = j_1bdydoc-bukrs.
headerdata-diff_inv = j_1bdydoc-parid.
headerdata-currency = j_1bdydoc-waerk.
headerdata-gross_amount = '9999.99'.
headerdata-pmnttrms = j_1bdydoc-zterm.
headerdata-bline_date = j_1bdydoc-pstdat.
headerdata-iv_category = ' '.
headerdata-item_text = 'teste '.
headerdata-business_place = 'XX01'.
headerdata-calc_tax_ind = 'X'.
itemdata-invoice_doc_item = itemdata-invoice_doc_item + '1'.
itemdata-po_number = ymsel_best-ebeln.
itemdata-po_item = ymsel_best-ebelp.
itemdata-ref_doc = ekbe-belnr.
itemdata-ref_doc_year = ekbe-gjahr.
itemdata-ref_doc_it = ekbe-buzei.
itemdata-de_cre_ind = 'X'.
itemdata-tax_code = ekpo-mwskz.
itemdata-taxjurcode = ekpo-txjcd.
itemdata-item_amount = ekpo-netwr.
itemdata-quantity = ekpo-ntgew.
itemdata-po_unit = ekpo-meins.
itemdata-po_unit_iso = ekpo-meins.
itemdata-po_pr_qnt = ekpo-menge.
itemdata-po_pr_uom = ekpo-bprme.
itemdata-final_inv = ' '.
call function 'BAPI_INCOMINGINVOICE_CREATE'
exporting
headerdata = headerdata
" addressdata = addressdata
importing
invoicedocnumber = w_invoice
fiscalyear = w_year
tables
itemdata = itemdata
" accountingdata = accountingdata
" glaccountdata = glaccountdata
" materialdata = materialdata
" taxdata = taxdata
" withtaxdata = withtaxdata
" vendoritemsplitdata = vendoritemsplitdata
return = return.
Best Regards,
Wilson Saadeh Silva
Edited by: Wilson Saadeh Silva on May 17, 2010 1:25 PM
‎2010 May 17 12:39 PM
Arthur,
I've already done that at Miro but did'nt receive the same message. I've been trying different combinations of parameters without success. If you can help with any other tip let me know. I appreciate your attention.
Best Regards,
Wilson Saadeh Silva
‎2010 May 17 12:51 PM
BAPI's normally have the behaviour to be more strict about customizing rules and other rules than the original transaction.
I have also a few of those cases where the original tcode like mm01 finds it ok to save a material while the bapi generates errors with the same data.
have you tried to debug where the error message is originated ?
kind regards
arthur
‎2010 May 17 1:33 PM
Very handy is this blog which is also a workshop at sap teched and helps a lot to find the origin of messages
/people/olga.dolinskaja/blog/2009/12/11/abap-runtime-analysis-se30--how-to-analyze-abap-program-flow
kind regards
arthur
‎2010 May 17 2:20 PM
Arthur,
Thank you for your help. Finally I solved my problem was a flag that was passing filled with X as you can see bellow. I discovered this during the debug time.
itemdata-de_cre_ind = 'X'.
Kind Regards,
Wilson Saadeh Silva