‎2018 Oct 11 3:24 PM
Hi,
I am getting error as 'Account assignment for entry sheet missing' in above MIRO bapi for service purchase order.
I have written the code as below in my program.
*** For header structure
gw_header-invoice_ind = gv_x.
gw_header-doc_type = gw_data-blart.
gw_header-doc_date = gw_data-bldat.
gw_header-pstng_date = gw_data-budat.
gw_header-ref_doc_no = gw_data-xblnr.
gw_header-comp_code = gw_data-bukrs.
gw_header-gross_amount = gw_data-rmwwr.
gw_header-calc_tax_ind = gw_data-xmwst.
gw_header-del_costs_taxc = gw_data-mwskz.
gw_header-business_place = gw_data-bupla.
gw_header-currency = gw_data-waers.
gw_header-currency_iso = gw_data-waers.
gw_header-item_text = gw_data-sgtxt.
gw_header-gst_part = gw_data-gst_part.
gw_header-plc_sup = gw_data-plc_sup.
*** For Item table
gw_item-invoice_doc_item = 000001.
gw_item-po_number = gw_data-ebeln.
gw_item-po_item = gw_data-ebelp.
gw_item-ref_doc = gw_data-lfbnr.
gw_item-ref_doc_year = gw_data-lfgja.
gw_item-ref_doc_it = gw_data-lfpos.
gw_item-tax_code = gw_data-mwskz.
gw_item-item_amount = gw_data-wrbtr.
gw_item-quantity = gw_data-menge.
gw_item-po_unit = gw_data-bstme.
gw_item-po_unit_iso = gw_data-bstme.
gw_item-hsn_sac = gw_data-hsn_sac.
gw_item-po_pr_uom = gw_data-bprme.
APPEND gw_item TO gt_item.
clear gw_item.
*** Call bapi with structure and item table details
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
EXPORTING
headerdata = gw_header
IMPORTING
invoicedocnumber = gv_invno
fiscalyear = gv_fyear
TABLES
itemdata = gt_item
return = gt_return.
Please suggest how to resolve this problem.
Regards
Amol Khochare
‎2018 Oct 12 2:47 PM
Here are some suggestions - not really an answer:
1. Can you do it manually using just the information you have provided to the BAPI? You may be missing something.
2. Did you try running the BAPI in SE37? It might give you some more information.
Try a search on sap BAPI_INCOMINGINVOICE_CREATE account assignment. There is a lot out there. I really didn't read it all to see if it would help in your case.
Finally: Thank you for providing the code it will make it easier for someone else to answer.