SAP Tutorials Blog




 data i_bapivbrk like bapivbrk occurs with header line.

  data i_bapiret1 like bapiret1 occurs with header line.
  data i_bapivbrksuccess like bapivbrksuccess occurs 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 BSc
SAP Department Deputy Manager
Contact : serkurumsal@yandex.com