‎2010 Jun 01 9:42 AM
Hi,
I am trying to create vendor invoice(FB60) using BAPI_ACC_DOCUMENT_POST.
Could anyone please let me know what all mandatory fields we have to pass in vendor item and header to create this ?
Regards,
Anubhuti Pandey
‎2010 Jun 01 11:01 AM
Hi,
Please call the FM BAPI_ACC_DOCUMENT_POST and try with the following parameters:
Function module to post the accounting document
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
" EXPORTING
documentheader = w_documentheader
" TABLES
accountgl = i_accountgl
accountreceivable = i_accountreceivable
accountpayable = i_accountpayable
currencyamount = i_currencyamount
return = i_return
contractitem = i_contractitem.
The required fields in the header document:
w_documentheader-bus_act
w_documentheader-username = sy-uname. "Username
w_documentheader-header_txt
w_documentheader-comp_code
w_documentheader-doc_date
w_documentheader-pstng_date = sy-datum.
w_documentheader-trans_date " Transaction date value as per document date
w_documentheader-fisc_year = sy-datum(4).
w_documentheader-doc_type
Pass the necessary information in the account GL and accounts payable.
I hope this helps you in some way.