Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Vendor invoice creation using BAPI BAPI_ACC_DOCUMENT_POST

Former Member
0 Likes
2,833

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

1 REPLY 1
Read only

Former Member
0 Likes
1,082

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.