2008 May 06 7:44 AM
Hi, What are the mandatory fields in BAPI_INCOMINGINVOICE_PARK. I am getting the following error "Account assignment for entry sheet missing". Plz help me out of this.
Hi,
You can go to SE37 and give the name of the BAPI. In tables and import tab you will find you will find a particylar column called option.
Selecting here causes the parameter to be flagged as optional. This means that the caller does not have to supply a value. Parameters with a default value are automatically optional.
also for your bapi -
Mandatory import - HEADERDATA,
table - ITEMDATA, RETURN.
Regards,
Arnab
2008 May 06 7:48 AM
hi,
Refer to the below sample code
DATA: l_headerdata LIKE bapi_incinv_create_header,
l_invoicedocnumber LIKE bapi_incinv_fld-inv_doc_no,
l_fiscalyear LIKE bapi_incinv_fld-fisc_year,
i_itemdata LIKE bapi_incinv_create_item OCCURS 0 WITH HEADER LINE,
i_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: l_additionalheaderdata LIKE bapi_incinv_save_header_backgr,
l_refdoccategory LIKE bapi_incinv_fld-ref_doc_category.
LOOP AT i_list_cab WHERE check = 'X'.
CLEAR l_headerdata.
l_headerdata-doc_type = 'RS'.
l_headerdata-invoice_ind = ''.
l_headerdata-doc_date = i_list_cab-bldat.
l_headerdata-pstng_date = i_list_cab-budat.
l_headerdata-ref_doc_no = i_list_cab-xblnr.
l_headerdata-comp_code = 'YW01'.
l_headerdata-currency = i_list_cab-waers.
l_headerdata-exch_rate = i_list_cab-kursf.
l_headerdata-gross_amount = i_list_cab-rmwwr.
l_headerdata-bline_date = i_list_cab-zfbdt.
l_headerdata-del_costs_taxc = i_list_cab-mwskz.
l_headerdata-diff_inv = i_list_cab-lifnr.
l_headerdata-alloc_nmbr = i_list_cab-id_archivo.
l_headerdata-dsct_amount = 0.
l_headerdata-calc_tax_ind = 'X'.
l_headerdata-del_costs_taxc = i_list_cab-mwskz.
LOOP AT i_list_pos WHERE xblnr = i_list_cab-xblnr.
i_itemdata-invoice_doc_item = i_list_pos-buzei.
i_itemdata-po_number = i_list_pos-ebeln.
i_itemdata-po_item = i_list_pos-ebelp.
i_itemdata-tax_code = i_list_cab-mwskz.
i_itemdata-item_amount = i_list_pos-wrbtr.
i_itemdata-quantity = i_list_pos-menge.
i_itemdata-po_unit = i_list_pos-meins.
SELECT SINGLE bprme FROM ekpo
INTO i_itemdata-po_pr_uom
WHERE ebeln = i_list_pos-ebeln
AND ebelp = i_list_pos-ebelp.
APPEND i_itemdata.
ENDLOOP.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
EXPORTING
headerdata = l_headerdata
* ADDRESSDATA =
IMPORTING
invoicedocnumber = l_invoicedocnumber
fiscalyear = l_fiscalyear
TABLES
itemdata = i_itemdata
* ACCOUNTINGDATA =
* GLACCOUNTDATA =
* MATERIALDATA =
* TAXDATA =
* WITHTAXDATA =
* VENDORITEMSPLITDATA =
return = i_return.
**** PERFORM generar_doc_prelim_mm.
IF NOT l_invoicedocnumber IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
WRITE: / l_invoicedocnumber.
ENDIF.
2008 May 06 8:28 AM
Hi Santosh
Thanks for yer reply. it was very helpful. But Still am gettin the same error. Anywayz I will resolve it. Unfortunately I forget mark this thread as question. So I cudn't reward. I am sorry abt that.
Thanks
Shameem.
2008 May 06 7:49 AM
2008 May 06 7:51 AM
Hi,
You can go to SE37 and give the name of the BAPI. In tables and import tab you will find you will find a particylar column called option.
Selecting here causes the parameter to be flagged as optional. This means that the caller does not have to supply a value. Parameters with a default value are automatically optional.
also for your bapi -
Mandatory import - HEADERDATA,
table - ITEMDATA, RETURN.
Regards,
Arnab
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |