Home SAP ABAP AUTO invoice create using BAPI with the reference of sales order
SAP ABAP AUTO invoice create using BAPI with the reference of sales order
data : i_bapivbrk like bapivbrk occurs 0 with header line .
data i_bapiret1 like bapiret1 occurs 0 with header line .
data : i_bapivbrksuccess like bapivbrksuccess occurs 0 with header line .
i_bapivbrk- doc_number = zsalesdocument.
i_bapivbrk- ref_doc = zsalesdocument.
i_bapivbrk- ref_doc_ca = 'C' .
append i_bapivbrk.
call function 'BAPI_BILLINGDOC_CREATEMULTIPLE'
tables
billingdatain = i_bapivbrk
return = i_bapiret1
success = i_bapivbrksuccess.
invoice_no = i_bapivbrksuccess- bill_doc.
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X' .
Serkan AKKAVAK Computer Engineer ABAP Developer & SAP S/4 HANA Logistics Consultant Contact : serkurumsal@yandex.com
Social Plugin