SAP Function BAPI_INCOMINGINVOICE_CREATE - Invoice Verification: Post Invoice

Parameter Reference Type Length Default Optional Text
ADDRESSDATA BAPI_INCINV_CREATE_ADDRESSDATA u 516 X Transfer Structure: Address Data Incoming Invoice (Create)
HEADERDATA BAPI_INCINV_CREATE_HEADER u 489 Header Data in Incoming Invoice (Create)

Parameter Reference Type Length Text
FISCALYEAR BAPI_INCINV_FLD-FISC_YEAR N 4 Fiscal Year
INVOICEDOCNUMBER BAPI_INCINV_FLD-INV_DOC_NO C 10 Document Number of an Invoice Document

Parameter Reference Length Optional Text
ACCOUNTINGDATA BAPI_INCINV_CREATE_ACCOUNT 330 X Account Assignment Data in Incoming Invoice
EXTENSIONIN BAPIPAREX 990 X Enhancement Fields (Import Parameter)
GLACCOUNTDATA BAPI_INCINV_CREATE_GL_ACCOUNT 404 X G/L Account Data at Invoice Receipt
ITEMDATA BAPI_INCINV_CREATE_ITEM 216 Item Data in Incoming Invoice
MATERIALDATA BAPI_INCINV_CREATE_MATERIAL 163 X Material Account Data in Incoming Invoice
RETURN BAPIRET2 548 Return Messages
TAXDATA BAPI_INCINV_CREATE_TAX 66 X Tax Code in Incoming Invoice
VENDORITEMSPLITDATA BAPI_INCINV_CREATE_VENDORSPLIT 27 X Vendor Split in Incoming Invoice
WITHTAXDATA BAPI_INCINV_CREATE_WITHTAX 46 X Withholding Tax Data in Incoming Invoice

Functionality
You can use this method to create and postincoming invoices.
When passing on the header data, you use the INVOIC_IND field todetermine whether the system posts acredit memo or aninvoice. If you leave thefield initial, the system posts a credit memo. If you enter anX, the system posts an invoice.
If you want to enter an invoice for a returns order, you must leave theINVOICE_IND field initial.
As in the online transaction, the system updates the purchase orderhistory and stock valuation data in Materials Management. The systemcreates accounting documents in Accounting.
You can use this method to:

  • Enter and post invoices with multiple account assignment

  • Change the account assignment of invoices, add account assignments, and
  • post the invoices
    • Enter invoices for blanket purchase orders

    • Enter and post invoices for purchase orders containing planned delivery
    • costs
      • Enter and post invoices containing unplanned delivery costs

      • Enter and post subsequent debits/credits

      • Use document types with external number assignment

      • Enter and post invoices with withholding tax

      • Enter and post invoice with more than one vendor line and different
      • payment methods and terms of payment
        • Enter and post invoices for returns orders

        • Enter and post invoices for transportation service providers

        • Enter and post invoices for external service orders

        • Post to G/L accounts

        • Post to material accounts

        • Enter and post invoices for a
        • one-time vendor
          • Enter and post invoices with a different payee

          • Restrictions
            The following fields in Financial Accounting are not passed on:
            • ISR number (ISR = inpayment slip with reference number)

            • Bank details

            • Payment reference

            • House bank ID
            • Notes
              The following authorization object is checked using activity 01:

              • M_RECH_WRK: Authorization to create invoices in
              • certain plants
                Transfer
                You use the structureHeaderData to pass onthe header data of the incoming invoice.
                You pass on the address data of a one-time vendor or a different invoicepayee with the structureAddressData.
                Tables ItemData and AccountingData contain the invoiceitem data. The table TaxData contains the tax information for theinvoice.
                The tables ItemData andAccountingData
                contain the item data of the incoming invoice. TheTaxData table containsthe tax information on the invoice.
                The tableGlAccountDatacontains data for posting to a G/L account and theMaterialData tablecontains data for posting to a material account.
                You can use the tableWithTaxData to passon withholding tax information.
                Via the tableVendor
                ItemSplitData, you can distribute the gross amount among severalcreditor lines with different payment methods and terms of payment.
                Return
                The document number of the invoice document and the fiscal year arereturned by the system as key fields of the incoming invoice.
                Return messages
                INCLUDE BAPI_RET OBJECT DOKU ID TX LANGUAGE EN

                Further information
                INCLUDE BAPI_INVENTUR_WEITERINF OBJECT DOKU ID TX LANGUAGE EN

                Example: Incoming Invoice
                This example shows the header data that you need to enter in tableHeaderdata and the item data that you need to enter in tableItemdata to post an invoice.
                Purchase order: 10 pc of material A @ $10/pc
                Goods receipt: 10 pc of material A
                You receive an invoice against this purchase order referencing PO number4500007491, PO item 10, for a quantity of 10 pc of material A and anamount of $116, including 16% VAT. Enter the following data:
                HeaderData table

                • INVOICE_IND (Post invoice/credit memo): X

                • DOC_DATE (Document date): 05.20.2000

                • PSTNG_DATE (Posting date): 05.23.2000

                • COMP_CODE (Company code): 1000

                • GROSS_AMOUNT (Gross amount): 116.00

                • CURRENCY (Currency key): USD

                • CALC_TAX_IND (Calculate tax): X

                • ItemData table
                  • INVOICE_DOC_ITEM (Invoice document item): 00001

                  • PO_NUMBER (Purchase order number): 4500007491

                  • PO_ITEM (Purchase order item): 00010

                  • TAX_CODE (Tax code): VN

                  • ITEM_AMOUNT (Item amount): 100

                  • QUANTITY (Quantity): 10

                  • PO_UNIT (Unit of measure): PC

                  • For more information, see the parameter documentation for tablesHeaderData andItemdata.

                    Example: Incoming invoice in foreign currency, goods-receipt-basedinvoice verification and tax information
                    This example specifies the header data that you need to enter in tableHeaderdata, the item data that you need to enter in tableItemdata and the tax information that you need to enter in tableTaxData to post an invoice in a foreign currency.
                    Purchase order: 10 pc of material A @ $10/pc
                    First goods receipt: 4 pc of material A
                    Second goods receipt: 6 pc of material A
                    You receive an invoice against this purchase order referencing PO number4500007505, PO item 10, goods receipt document 50010095, 2000, item 1.The invoice is for a quantity of 4 pc of material A, a gross amount of$46.60 and 16% tax ($6.60). Enter the following data:
                    HeaderData table

                    • INVOICE_IND (Post invoice/credit memo): X

                    • DOC_DATE (Document date): 05.20.2000

                    • PSTNG_DATE (Posting date): 05.23.2000

                    • COMP_CODE (Company code): 1000

                    • CURRENCY (Currency key): USD

                    • GROSS_AMOUNT (Gross amount): 46.60

                    • ItemData table
                      • INVOICE_DOC_ITEM (Invoice document item): 00001

                      • PO_NUMBER (Purchase order number): 4500007505

                      • PO_ITEM (Purchase order item): 00010

                      • REF_DOC (Goods receipt document): 50010095

                      • REF_DOC_YEAR (Fiscal year of current period): 2000

                      • REF_DOC_ITEM (Goods receipt document item): 1

                      • TAX_CODE (Tax code): VN

                      • ITEM_AMOUNT (Item amount): 40.00

                      • QUANTITY (Quantity): 4

                      • PO_UNIT (Unit of measure): PC

                      • TaxData table
                        • TAX_CODE (Tax code): VN

                        • TAX_AMOUNT (Tax amount in document currency): USD 6.60

                        • For more information, see the parameter documentation for tablesHeaderData,ItemData, andTaxData.

                          Example: Incoming invoice for blanket purchase order
                          This invoice shows which header data you need to enter in the tableHeaderData, which item data you need to enter in the table
                          ItemData, and which account assignment data you need to enter intable AccountingData to post an incoming invoice for a blanketpurchase order.
                          You receive an invoice in respect of the blanket purchase order4500015172, item 10 for an amount of $110 including 10% VAT. You want toapportion the invoice amount to the cost centers 1200 and 1500. Enterthe following data:
                          HeaderData table

                          • INVOICE_IND (Post invoice/credit memo): X

                          • DOC_DATE (Document date): 02.19.2001

                          • PSTING_DATE (Posting date): 02.21.2001

                          • COMP_CODE (Company code): 1000

                          • GROSS_AMOUNT (Gross amount): 110

                          • CURRENCY (Currency): USD

                          • CALC_TAX_IND (Calculate tax): X

                          • ItemData table
                            • INVOICE_DOC_ITEM (Item in the invoice document): 00001

                            • PO_NUMBER (PO number): 4500015172

                            • PO_ITEM (PO item): 00010

                            • TAX_CODE (Tax code): V1

                            • ITEM_AMOUNT (Item amount): 100

                            • AccountingData table
                              1st line: Change account assignment data
                              • INVOICE_DOC_ITEM (Document item in invoice document): 0001

                              • SERIAL_NO (Serial number for the accont assignment): 01

                              • TAX_CODE (Tax code): V1

                              • ITEM_AMOUNT (Amount in document currency): 30

                              • GL_ACCOUNT (G/L account number): 890000

                              • COSTCENTER (Cost center): 1200

                              • 2nd line: Add unplanned account assignment
                                • INVOICE_DOC_ITEM (Document item in invoice document): 0001

                                • XUNPL (Unplanned acct. assignment from IV): X

                                • TAX_CODE (Tax code): V1

                                • ITEM_AMOUNT (Amount in document currency): 70

                                • GL_ACCOUNT (G/L account number): 890000

                                • COSTCENTER (Cost center): 1500

                                • In the case of the blanket purchase order, the following fields forquantities and units of measure must not be populated in the tablesItemData and AccountingDataAccountingData:
                                  • Quantity (QUANTITY)

                                  • PO_UNIT (PO unit of measure)

                                  • PO_UNIT_ISO (PO unit of measure in ISO code)

                                  • PO_PR_QNT (Quantity in PO price unit of measure)

                                  • PO_PR_UOM (PO price unit of measure)

                                  • PO_PR_UOM_ISO (PO price unit of measure in ISO code)

                                  • More information is available in the parameter documentation for thetables HeaderData,ItemData, andAccountingData,and in the SAP Library under Logistics Invoice Verification.

                                    Example: Change account assignments and add unplanned assignments
                                    This example shows the header data that you need to enter in tableHeaderdata, the item data that you need to enter in tableItemdata, and the account assignment information that you need toenter in table AccountingData to change, add, and post accountassignments for an invoice. If you want to change or add accountassignments, there must be a non-valuated goods receipt or no goodsreceipt in the system. Goods-receipt-based invoice verification isspecified.
                                    Purchase order: 300 pc of material A @ $1.00/pc
                                    Goods receipt: 300 pc of material A
                                    This purchase order is subject to account assignment. You receive aninvoice for it, referencing the PO number 4500006846, PO item 10, goodsreceipt document 50008849, 2000, item 1. The invoice is for a quantityof 100 pieces of material A, with a gross invoice amount of USD 116.00,including 16% VAT. You want to change the planned account assignment forthe second account assignment item and add an unplanned accountassignment. Enter the following data:
                                    HeaderData table

                                    • INVOICE_IND (Post invoice/credit memo): X

                                    • DOC_DATE (Document date): 08.05.2000

                                    • PSTNG_DATE (Posting date): 08.08.2000

                                    • COMP_CODE (Company code): 1000

                                    • CURRENCY (Currency key): USD

                                    • GROSS_AMOUNT (Gross amount): 17.40

                                    • CALC_TAX_IND (Calculate tax automatically): X

                                    • PMNTTRMS (Terms of payment key): 0001

                                    • ItemData table
                                      • INVOICE_DOC_ITEM (Invoice document item): 00001

                                      • PO_NUMBER (Purchase order number): 4500006846

                                      • PO_ITEM (Purchase order item): 00010

                                      • REF_DOC (Goods receipt document): 500008849

                                      • REF_DOC_YEAR (Fiscal year of current period): 2000

                                      • REF_DOC_ITEM (Goods receipt document item): 1

                                      • TAX_CODE (Tax code): VN

                                      • ITEM_AMOUNT (Item amount): 100

                                      • QUANTITY (Quantity): 100

                                      • PO_UNIT (Unit of measure): PC

                                      • AccountingData table
                                        Line 1: Change second account assignment item
                                        • INVOICE_DOC_ITEM (Invoice document item): 0001

                                        • SERIAL_NO (Account assignment serial number): 02

                                        • TAX_CODE (Tax code): VN

                                        • ITEM_AMOUNT (Amount in document currency): 10.00

                                        • QUANTITY (Quantity): 10

                                        • PO_UNIT (Order unit): PC

                                        • GL_ACCOUNT (G/L account number): 890000

                                        • COSTCENTER (Cost center): 1200

                                        • Line 2: Add unplanned account assignment
                                          • INVOICE_DOC_ITEM (Invoice document item): 0001

                                          • XUNPL (Unplanned account assignment in Invoice Verification): X

                                          • TAX_CODE (Tax code): VN

                                          • ITEM_AMOUNT (Amount in document currency): 5.00

                                          • QUANTITY (Quantity): 5

                                          • PO_UNIT (Order unit): PC

                                          • GL_ACCOUNT (G/L account number): 890000

                                          • COSTCENTER (Cost center): 1200

                                          • More information is available in the parameter documentation for thetables HeaderData,ItemData, andAccountingDataand in the SAP Library under Logistics Invoice Verification.

                                            Example: Incoming invoice with planned delivery costs
                                            This examples shows the header data that you need to enter in tableHeaderData, the item data that you need to enter in table ItemData, and the tax information that you need to enter in tableTaxData to post an invoice containing planned delivery costs.
                                            Purchase order: 100 pc of material A @ $1.00/pc
                                            Goods receipt: 100 pc of material A
                                            You receive an invoice for this purchase order referencing PO number4500006986, PO item 10, for a quantity of 100 pieces of material A and$136.00, including 16% VAT and $20.00 planned delivery costs. Enter thefollowing data:
                                            HeaderData table

                                            • INVOICE_IND (Post invoice/credit memo): X

                                            • DOC_DATE (Document date): 08.10.2000

                                            • PSTNG_DATE (Posting date): 08.12.2000

                                            • COMP_CODE (Company code): 1000

                                            • CURRENCY (Currency key): USD

                                            • GROSS_AMOUNT (Gross amount): 136,00

                                            • ItemData table
                                              Line 1: Posting the purchase order item
                                              • INVOICE_DOC_ITEM (Invoice document item): 00001

                                              • PO_NUMBER (Purchase order number): 4500006986

                                              • PO_ITEM (Order item): 00010

                                              • TAX_CODE (Tax code): VN

                                              • ITEM_AMOUNT (Item amount): 100.00

                                              • QUANTITY (Quantity): 100

                                              • PO_UNIT (Unit of measure): PC

                                              • Line 2: Posting the planned delivery costs
                                                • INVOICE_DOC_ITEM (Invoice document item): 00002

                                                • PO_NUMBER (Order number): 4500006986

                                                • PO_ITEM (Order item): 00010

                                                • ITEM_AMOUNT (Item amount): 20.00

                                                • QUANTITY (Quantity): 100

                                                • PO_UNIT (Unit of measure): PC

                                                • COND_TYPE (Condition type): FRB1

                                                • TaxData table
                                                  • TAX_CODE (Tax code): VN

                                                  • TAX_AMOUNT (Tax amount in document currency): 16.00

                                                  • For more information, see the parameter documentation for tablesHeaderData,ItemData, andTaxData.

                                                    Example: Incoming invoice with withholding tax
                                                    This example shows which header data you can enter in the tableHeaderData, which item data you can enter in the tableItemdata, and which withholding tax information you can enter inthe table WithTaxData in order to park an incoming invoice withwithholding tax.
                                                    Purchase order: 10 pc of material A @ $10
                                                    Goods receipt: 10 pc of material A
                                                    You receive an invoice for this purchase order referencing PO number4500007505, PO item 10, GR document 50010095 2000, item 1. The invoiceis for a quantity of 10 pc and a gross amount of $100. You have to pay10% withholding tax on the gross amount. Enter the following data:
                                                    HeaderData table

                                                    • INVOICE_IND (Invoice/Credit memo): X

                                                    • DOC_DATE (Document date): 05.20.2000

                                                    • PSTNG_DATE (Posting date): 05.23.2000

                                                    • COMP_CODE (Company code): WT01

                                                    • CURRENCY (Currency key): USD

                                                    • GROSS_AMOUNT (Gross amount): $100

                                                    • ItemData table
                                                      • INVOICE_DOC_ITEM (Item from invoice document): 00001

                                                      • PO_NUMBER (PO number): 4500007505

                                                      • PO_ITEM (PO item): 00010

                                                      • REF_DOC (GR document): 50010095

                                                      • REF_DOC_YEAR (Fiscal year of the current period): 2000

                                                      • REF_DOC_ITEM (Item in a GR document): 1

                                                      • TAX_CODE (Tax code): V0

                                                      • ITEM_AMOUNT (Item amount): $100

                                                      • QUANTITY (Quantity): 10

                                                      • PO_UNIT (Unit of measure): PC

                                                      • WithTaxData table
                                                        • SPLIT_KEY (Grouping key for withholding tax split): 0001

                                                        • WI_TAX_TYPE (Code for withholding tax type): R1

                                                        • WI_TAX_CODE (Withholding tax code): 01

                                                        • WI_TAX_BASE (Withholding tax base amount): 100

                                                        • WI_TAX_AMT (Withholding tax amount in doc. currency): 10.00

                                                        • For more information, see the parameter documentation for the tablesHeaderData,ItemData, andWithTaxData.

                                                          Example: Incoming invoice with amount split
                                                          This example shows you which header data you can enter in theHeaderData table, which item data you can enter in theItemdata table, and which information you can enter in theVendorItemSplitData table to create an incoming invoice withamount split.
                                                          Purchase order: 10 pc of material A @ $10
                                                          Goods receipt: 10 pc of material A
                                                          You receive an invoice for this purchase order referencing PO number4500007505, PO item 10, GR document 50010095, item 1. The invoice is fora quantity of 10 pieces and a gross amount of $100. You want toapportion the gross amount to two creditor lines. 40% of the grossamount is to be paid immediately by check, and 60% of the gross amountis to be paid within 14 days, taking into account a 3% cash discount.Enter the following data:
                                                          HeaderData table

                                                          • INVOICE_IND (Invoice/Credit memo): X

                                                          • DOC_DATE (Document date): 05.20.2000

                                                          • PSTNG_DATE (Posting date): 05.23.2000

                                                          • COMP_CODE (Company code): 0001

                                                          • CURRENCY (Currency key): USD

                                                          • GROSS_AMOUNT (Gross amount): 100.00

                                                          • ItemData table
                                                            • INVOICE_DOC_ITEM (Item from the invoice document): 00001

                                                            • PO_NUMBER (PO number): 4500007505

                                                            • PO_ITEM (PO item): 00010

                                                            • REF_DOC (GR document): 50010095

                                                            • REF_DOC_YEAR (Fiscal year for the current period): 2000

                                                            • REF_DOC_ITEM (Item from a GR document): 1

                                                            • TAX_CODE (Tax code): V0

                                                            • ITEM_AMOUNT (Item amount): 100

                                                            • QUANTITY (Quantity): 10.00

                                                            • PO_UNIT (Unit of measure): PC

                                                            • VendorItemSplitData table
                                                              1st creditor line
                                                              • SPLIT_KEY (Grouping key for split in the vendor line): 0001

                                                              • SPLIT_AMOUNT (Gross invoice partial amount in doc. currency): 40.00

                                                              • PYMT_METH (Payment method): S

                                                              • TAX_CODE (Tax code): V0

                                                              • PMNTTRMS (Payment terms key): 0001

                                                              • 2nd creditor line
                                                                • SPLIT_KEY (Grouping key for split in the vendor line): 0002

                                                                • SPLIT_AMOUNT (Gross invoice partial amount in doc. currency): 60.00

                                                                • PYMT_METH (Payment method): U

                                                                • TAX_CODE (Tax code): V0

                                                                • PMNTTRMS (Payment terms key): 0003

                                                                • For more information, see the parameter documentation for tablesHeaderData,ItemData, andVendorItemSplitData.

                                                                  Example: Incoming Invoice with G/L and Material Account Posting
                                                                  This example shows you which data you have to provide in order to enterand post an incoming invoice (header data in table HeaderData,item data in table ItemData, G/L account information in tableGlAccountData, and material account information in tableMaterialData).
                                                                  You receive an invoice with reference to PO number 4500006846, PO item10. The invoice is for a quantity of 100 PC of material A, a grossamount of 150.80 USD incl. 16% tax. Included in this is a G/L accountposting of 10 USD to account 400000 in company code 1, and a materialaccount posting to the material MAT01n for 20 USD.
                                                                  Enter the following data:
                                                                  HeaderData table

                                                                  • INVOICE_IND (Post invoice/credit memo): X

                                                                  • DOC_DATE (Document date): 08.05.2000

                                                                  • PSTNG_DATE (Posting date): 08.08.2000

                                                                  • COMP_CODE (Company code): 1000

                                                                  • CURRENCY (Currency key): USD

                                                                  • GROSS_AMOUNT (Gross amount): 150.80

                                                                  • CALC_TAX_IND (Automatically calculate tax): X

                                                                  • PMNTTRMS (Payment terms key): 0001

                                                                  • ItemData table
                                                                    • INVOICE_DOC_ITEM (Invoice document item): 00001

                                                                    • PO_NUMBER (PO number): 4500006846

                                                                    • PO_ITEM (PO item): 00010

                                                                    • TAX_CODE (Tax code): VN

                                                                    • ITEM_AMOUNT (Item amount): 100

                                                                    • QUANTITY (Quantity): 100

                                                                    • PO_UNIT (Unit of measure): PC

                                                                    • GlAccountData table
                                                                      • INVOICE_DOC_ITEM (Document item in invoice document): 00001

                                                                      • GL_ACCOUNT (G/L account): 400000

                                                                      • ITEM_AMOUNT (Item amount): 10,00

                                                                      • DB_CR_IND (Debit/credit indicator): S

                                                                      • COMP_CODE (Company code): 0001

                                                                      • TAX_CODE (Tax code): VN

                                                                      • COSTCENTER (Cost center): 1

                                                                      • MaterialData table
                                                                        • INVOICE_DOC_ITEM (Document item in invoice document): 0001

                                                                        • MATERIAL (Material): MAT01

                                                                        • PLANT (Valuation area): 0001

                                                                        • DB_CR_INP (Debit/credit indicator): S

                                                                        • ITEM_AMOUNT (Item amount): 10.00

                                                                        • QUANTITY (MENGE_D): 1

                                                                        • PO_UNIT (PO quantity unit of measure): PC

                                                                        • TAX_CODE (Tax code): VN

                                                                        • More information is available in the parameter documentation for thetables HeaderData,ItemData,GlAccountData andMaterialData and inthe SAP Library under Logistics Invoice Verification.

                                                                          Example: Invoice for a purchase order for external services andservice-based invoice verification
                                                                          This example shows you which header data you must enter in the tableHeaderData, which item data you must enter in the tableItemData, and which account assignment data you must enter in thetable AccountingData in order to enter and post an incominginvoice.
                                                                          You receive an invoice referencing PO number 4500000191, PO item 10. Twoservices, A and B, are invoiced, each with a quantity of six serviceunits. Service A has a gross amount of 580 euros incl. 16% VAT. ServiceB has 812 euros incl. 16% VAT. Service A has an account assignment of50% to each of the two cost centers 1000 and 2000. Service B also has a50-50 account assignment, to cost centers 1000 and 3000. The serviceacceptance is performed jointly for both services in one service entrysheet, number 1000000022. You cannot change the account assignments.Enter the following data:
                                                                          HeaderData table

                                                                          • INVOICE_IND (Post invoice/credit memo): X

                                                                          • DOC_TYPE (Document type): RE

                                                                          • DOC_DATE (Document date): 01.10.2002

                                                                          • PSTNG_DATE (Posting date): 01.10.2002

                                                                          • COMP_CODE (Company code): 0001

                                                                          • CURRENCY (Currency key): USD

                                                                          • GROSS_AMOUNT (Gross amount): 1392.00

                                                                          • CALC_TAX_IND (Calculate tax automatically): X

                                                                          • PMNTTRMS (Payment terms key): 0001

                                                                          • ItemData table
                                                                            First entry for service A:
                                                                            • INVOICE_DOC_ITEM (Item in invoice document): 000001

                                                                            • PO_NUMBER (PO number): 4500000191

                                                                            • PO_ITEM (PO item): 00010

                                                                            • TAX_CODE (Tax code): V1

                                                                            • ITEM_AMOUNT (Item amount): 250.00

                                                                            • QUANTITY (Quantity): 1

                                                                            • PO_UNIT (Unit of measure): SU

                                                                            • SHEET_NO (Service entry sheet number): 1000000022

                                                                            • SHEET_ITEM (Line number): 10

                                                                            • Second entry for service A:
                                                                              • INVOICE_DOC_ITEM (Item in invoice document): 000002

                                                                              • PO_NUMBER (PO number): 4500000191

                                                                              • PO_ITEM (PO item): 00010

                                                                              • TAX_CODE (Tax code): V1

                                                                              • ITEM_AMOUNT (Item amount): 250.00

                                                                              • QUANTITY (Quantity): 3

                                                                              • PO_UNIT (Unit of measure): SU

                                                                              • SHEET_NO (Entry sheet number): 1000000022

                                                                              • SHEET_ITEM (Line number) : 10

                                                                              • First entry for service B:
                                                                                • INVOICE_DOC_ITEM (Item in invoice document): 000003

                                                                                • PO_NUMBER (PO number): 4500000191

                                                                                • PO_ITEM (PO item): 00010

                                                                                • TAX_CODE (Tax code): V1

                                                                                • ITEM_AMOUNT (Item amount): 350.00

                                                                                • QUANTITY (Quantity): 3

                                                                                • PO_UNIT (Unit of measure): SU

                                                                                • SHEET_NO (Entry sheet number): 1000000022

                                                                                • SHEET_ITEM (Line number) : 20

                                                                                • Second entry for service B:
                                                                                  • INVOICE_DOC_ITEM (Item in invoice document): 000004

                                                                                  • PO_NUMBER (PO number): 4500000191

                                                                                  • PO_ITEM (PO item): 00010

                                                                                  • TAX_CODE (Tax code): V1

                                                                                  • ITEM_AMOUNT (Item amount): 700.00

                                                                                  • QUANTITY (Quantity): 1

                                                                                  • PO_UNIT (Unit of measure): SU

                                                                                  • SHEET_NO (Service entry sheet number): 1000000022

                                                                                  • SHEET_ITEM (Line number) : 20

                                                                                  • AccountingData table
                                                                                    First account assignment for service A:
                                                                                    • INVOICE_DOC_ITEM (Document item in invoice document): 000001

                                                                                    • SERIAL_NO (Sequential number of the account assignment): 01

                                                                                    • TAX_CODE (Tax code): V1

                                                                                    • ITEM_AMOUNT (Amount in document currency): 250.00

                                                                                    • QUANTITY (Quantity): 3

                                                                                    • PO_UNIT (PO unit of measure): SU

                                                                                    • Second account assignment for service A:
                                                                                      • INVOICE_DOC_ITEM (Document item in invoice document): 000001

                                                                                      • SERIAL_NO (Sequential number of the account assignment): 02

                                                                                      • TAX_CODE (Tax code): V1

                                                                                      • ITEM_AMOUNT (Amount in document currency): 250.00

                                                                                      • QUANTITY Quantity): 3

                                                                                      • PO_UNIT (PO unit of measure): SU

                                                                                      • First account assignment for service B:
                                                                                        • INVOICE_DOC_ITEM (Document item in invoice document): 000003

                                                                                        • SERIAL_NO (Sequential number of the account assignment): 01

                                                                                        • TAX_CODE (Tax code): V1

                                                                                        • ITEM_AMOUNT (Amount in document currency): 350.00

                                                                                        • QUANTITY (Quantity): 3

                                                                                        • PO_UNIT (PO unit of measure): SU

                                                                                        • Second account assignment for service B:
                                                                                          • INVOICE_DOC_ITEM (Document item in invoice document): 000004

                                                                                          • SERIAL_NO (Sequential number of the account assignment): 03

                                                                                          • TAX_CODE (Tax code): V1

                                                                                          • ITEM_AMOUNT (Amount in document currency): 350.00

                                                                                          • QUANTITY (Quantity): 3

                                                                                          • PO_UNIT (PO unit of measure): SU

                                                                                          • More information is available in the parameter documentation for thetables HeaderData,ItemData, andAccountingData,and in the SAP Library under Logistics Invoice Verification.

                                                                                            Example: Incoming invoice for one-time vendor
                                                                                            This example shows you how to proceed in order to enter and post aninvoice for a one-time vendor.
                                                                                            You do not need to enter data in the AddressData table. If you donot enter data in the AddressData table, the address data for theone-time vendor is adopted 1:1 in the invoice from the purchase order.
                                                                                            If you use table AddressData to transfer data, the address datafor the one-time vendor is read from the purchase order into the invoiceand is then either overwritten or supplemented by the fields of tableAddressData.
                                                                                            The purchase order for the one-time vendor has the following storeddata: Name 'SAP AG', postal code '60000' and street and building number'Neurottstraße 16'. You receive an invoice with the one-time vendoraddress: Name 'SAP AG', postal code '69190', and place 'Walldorf'. Enterthe following data:
                                                                                            AddressData table
                                                                                            ACC_1_TIME (Indicator one-time vendor): X
                                                                                            NAME (Name): SAP AG
                                                                                            POSTL_CODE (Postal code): 69190
                                                                                            CITY (Place): Walldorf
                                                                                            The invoice is posted with the following one-time vendor: Name 'SAP AG'street and building number 'Neurottstraße 16', postal code '69190', city'Walldorf'.
                                                                                            For more information, see the parameter documentation for the tableAddressData.

                                                                                            Example: Incoming invoice for different payee
                                                                                            This example shows you which address data you must enter in the tableAddressData to enter and post an invoice for a different payee.
                                                                                            You receive an invoice for the different payee with name 'SAP AG',postal code '69190', place 'Walldorf', bank number '38070724' andaccount number '4711'.
                                                                                            Enter the following data:
                                                                                            AddressData table
                                                                                            ACC_1_TIME (Indicator one-time vendor): ' '
                                                                                            NAME (Name): SAP AG
                                                                                            POSTL_CODE (Postal code): 69190
                                                                                            CITY (Place): Walldorf
                                                                                            BANK_NO (Bank number): 38070724
                                                                                            BANK_ACCT (Bank account number): 4711
                                                                                            For more information, see the parameter documentation for the tableAddressData.

                                                                                            Meaning
                                                                                            INCLUDE BAPI_KEYFIELD
                                                                                            Fiscal year

                                                                                            Description
                                                                                            INCLUDE BAPI_KEYFIELD
                                                                                            Invoice document number

                                                                                            Description
                                                                                            This structure contains the address data for a one-time vendor or adifferent payee for the invoice document to be created.
                                                                                            INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX
                                                                                            The following fields can be populated:

                                                                                            • One-time vendor indicator (ACC_1_TIME field)

                                                                                            • Name (NAME field)

                                                                                            • Second name (NAME_2 field)

                                                                                            • Third name (NAME_3 field)

                                                                                            • Fourth name (NAME_4 field)

                                                                                            • Postal code (POSTL_CODE field)

                                                                                            • City (CITY field)

                                                                                            • Country key (COUNTRY field)

                                                                                            • Street and house number (STREET field)

                                                                                            • PO box (PO_BOX field)

                                                                                            • Postal code of PO box (POBX_PCD field)

                                                                                            • Post office bank current account number (POBK_CURAC field)

                                                                                            • Bank account number (BANK_ACCT field)

                                                                                            • Bank number (BANK_NO field)

                                                                                            • Country key for bank (BANK_CTRY field)

                                                                                            • Tax number 1 (TAX_NO_1 field)

                                                                                            • Tax number 2 (TAX_NO_2 field)

                                                                                            • Indicator: Business partner subject to tax on sales? (SLS_PUR_TX field)

                                                                                            • Indicator: Business partner subject to equalization tax? (EQUAL_TAX
                                                                                            • field)
                                                                                              • Region (country, federal state, province, county) (REGION field)

                                                                                              • Bank control key (CTRL_KEY field)

                                                                                              • Instruction key for Electronic Funds Transfer (INSTR_KEY field)

                                                                                              • Report key for Electronic Funds Transfer (DME_IND field)

                                                                                              • Language key (LANGU field)

                                                                                              • Encryption of payee code (ENCR_PAYM_RECIP field)

                                                                                              • Tax category (TAX_CATEGORY field)

                                                                                              • Tax number type (TAX_NO_TY field)

                                                                                              • Indicator: Is business partner a natural person? (SOLE_PROP field)

                                                                                              • Tax number 3 (TAX_NO_3 field)

                                                                                              • Tax number 4 (TAX_NO_4 field)

                                                                                              • Reference specifications for bank details (BANK_REF field)

                                                                                              • Name of representative (REP_NAME field)

                                                                                              • Business type (BUS_TYPE field)

                                                                                              • Industry type (IND_TYPE field)

                                                                                              • Form of address (FORM_OF_ADDR field)

                                                                                              • VAT registration number (VAT_REG_NO field)
                                                                                              • Value range
                                                                                                The one-time vendor indicator (ACC_1_TIME field) must contain the value'X' if the invoicing party is a one-time vendor. If you want to transferdata from a different payee, the one-time vendor indicator (ACC_1_TIMEfield) must be empty. Transactions with a one-time vendor and adifferent payee are not supported.

                                                                                                Description
                                                                                                This structure contains the header data for the invoice document to becreated.
                                                                                                INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX
                                                                                                The following fields must be populated:

                                                                                                • Document date of incoming invoice (DOC_DATE field)

                                                                                                • Posting date of incoming invoice (PSTNG_DATE field)

                                                                                                • Company code (COMP_CODE field)

                                                                                                • Currency key (CURRENCY field) or ISO currency code (CURRENCY_ISO field)

                                                                                                • Gross invoice amount in document currency (GROSS_AMOUNT field)

                                                                                                • The following fields can be populated:
                                                                                                  • Indicator: Post invoice or credit memo (INVOICE_IND field)

                                                                                                  • Document type (DOC_TYPE field)

                                                                                                  • Reference document number (REF_DOC_NO field)

                                                                                                  • Different invoicing party (DIFF_INV field)

                                                                                                  • Direct quoted exchange rate (EXCH_RATE field)

                                                                                                  • Indirect quoted exchange rate (EXCH_RATE_V field)

                                                                                                  • Automatically calculate tax (CALC_TAX_IND field)

                                                                                                  • Terms of payment key (PMNTTRMS field)

                                                                                                  • Baseline date for due date calculation (BLINE_DATE field)

                                                                                                  • Cash discount days 1 (DSCT_DAYS1 field)

                                                                                                  • Cash discount days 2 (DSCT_DAYS2 field)

                                                                                                  • Net payment terms period (NETTERMS field)

                                                                                                  • Cash discount days 1 (DSCT_PCT1 field)

                                                                                                  • Cash discount days 2 (DSCT_PCT2 field)

                                                                                                  • Document header text (HEADER_TXT field)

                                                                                                  • Key for payment block (PMNT_BLOCK field)

                                                                                                  • Unplanned delivery costs (DEL_COSTS field)

                                                                                                  • Tax code for delivery costs (DEL_COSTS_TAXC field)

                                                                                                  • Jurisdiction code for delivery costs (DEL_COSTS_TAXJ field)

                                                                                                  • Entered by external system user (PERSON_EXT field)

                                                                                                  • Payment method (PYMT_METH field)

                                                                                                  • Payment method supplement (PMTMTHSUPL field)

                                                                                                  • The following field should not be populated:
                                                                                                    • Origin of Logistics Invoice Verification document (IV_CATEGORY field)
                                                                                                    • Value Range

                                                                                                      Functionality:
                                                                                                      Unplanned delivery costs (DEL_COSTS field)
                                                                                                      1. Depending on the settings made in Customizing for Logistics InvoiceVerification in the IMG activity Configure HowUnplanned Delivery Costs Are Posted, the system distributes unplanneddelivery costs either to the items settled in the invoice document or toa separate G/L account.
                                                                                                      Tax code for unplanned delivery costs if they are posted to aseparate G/L account
                                                                                                      1. The system determines the tax code for the unplanned delivery costsfrom the DEL_COSTS_TAXC field.
                                                                                                      Indicator: post invoice or credit memo (INVOICE_IND field)
                                                                                                      If there is an X entered in the INVOICE_IND field, the systemcreates an invoice.
                                                                                                      If the INVOICE_IND field is initial, the system creates a creditmemo.
                                                                                                      Currency key (CURRENCY field, CURRENCY_ISO field)
                                                                                                      1. The system determines the currency from the SAP format field(CURRENCY field).
                                                                                                      2. The system determines the currency from the ISO format field(CURRENCY_ISO field).
                                                                                                      Automatically calculate tax (CALC_TAX_IND field)
                                                                                                      If there is an X in the CALC_TAX_IND field, no data must bemaintained in the TaxData table.
                                                                                                      Checks:
                                                                                                      If you do not enter any data in the following fields, the systemdetermines the data required according to the priorities specified. Ifthe system cannot determine any data, it returns appropriate returnmessages from the method call. These are listed in the return parameter.
                                                                                                      Document type (DOC_TYPE field)
                                                                                                      1. Alternatively, the system copies the settings from Customizing forLogistics Invoice Verification Maintain Document Typesand Number Ranges.
                                                                                                      Invoicing party (DIFF_INV field)
                                                                                                      1. Alternatively, the system determines the invoicing party from theheader data of the first purchase order (ITEMDATA table).
                                                                                                      Exchange rate (EXCH_RATE field)
                                                                                                      1. The system determines the exchange rate from the fixed rate in thepurchase order.
                                                                                                      2. The system determines the exchange rate from the current rate ofexchange.
                                                                                                      Terms of payment
                                                                                                      1. The system determines the terms of payment from the PMNTTRMS field orthe DSCT_DAYS1, DSCT_DAYS2, DSCT_PCT1, or DSCT_PCT2 fields.
                                                                                                      2. The system determines the terms of payment from the first purchaseorder.
                                                                                                      Payment baseline date
                                                                                                      1. If the baseline date for due date calculation (BLINE_DATE field) isfilled, the system uses it to determine the baseline date for payment.
                                                                                                      2. If the terms of payment key (PMNTTRMS field) is filled and thebaseline date for due date calculation (BLINE_DATE field) is initial,the system determines the baseline date for payment from the terms ofpayment key.
                                                                                                      3. If the terms of payment key (PMNTTRMS field) and the baseline datefor due date calculation (BLINE_DATE field) are initial, the systemdetermines the baseline date for payment from the terms of payment keyof the first purchase order.
                                                                                                      Payment block
                                                                                                      1. If the payment block key (PMNT_BLOCK field) is filled, the systemdetermines the payment block from the payment block key.
                                                                                                      2. If the terms of payment key (PMNTTRMS field) is filled and thepayment block key (PMNT_BLOCK field) is initial, the system determinesthe payment block from the terms of payment key.
                                                                                                      3. If the terms of payment key (PMNTTRMS field) and the payment blockkey (PMNT_BLOCK field) are initial, the system determines the paymentblock from the terms of payment key of the first purchase order.
                                                                                                      Origin of an invoice document (IV_CATEGORY field)
                                                                                                      1. The system checks whether the field is initial and automaticallyfills the field with 'B': The invoice document was created using a BAPI.
                                                                                                      Hinweis für Übersetzung zu Erw.paket 5, SAP ERP 6.0:
                                                                                                      folgende Änderungen wurden durchgeführt:
                                                                                                      Zeile 18, 31, 44 und 56: Absatzformat von N1 zu B1 geändert
                                                                                                      Zeile 76: Absatz eingefügt
                                                                                                      Die Formate LS wurden mit ZK ersetzt (außer bei Tabellen u.Paramtern)

                                                                                                      Description
                                                                                                      This table contains account assignment data for the item data in anincoming invoice.
                                                                                                      Use of this table is principally dependent on whether the purchase orderin respect of which settlement is to be effected relates to stockmaterial or consumable material. If you wish to settle a warehousetransaction, no account assignment information is necessary, and you donot need to make any entries in the AccountingData table. If youwish to effect settlement in respect of consumable material, the
                                                                                                      AccountingData table is populated depending on the nature of theaccount assignment (single or multiple) and the option of changing theaccount assignment at the time of invoice receipt. The followingoverview outlines the possible combinations:

                                                                                                      • Single account assignment and account assignment at the time of
                                                                                                      • invoice receipt changeable
                                                                                                        Prerequisite:
                                                                                                        The goods receipt is non-valuated or there is no provision for goodsreceipt. Additionally, the 'Account Assignment Changeable at InvoiceReceipt' indicator (REUPD field) must be set for the account assignmentcategory used, and material for valuated special stock must not beinvolved.
                                                                                                        AccountingData:
                                                                                                        Optional entry. You only need to fill the AccountingData table ifyou want to add unplanned account assignments in the invoice document.In this case, make entries according to the information below for theindividual fields.
                                                                                                        • Single account assignment and account assignment at the time of
                                                                                                        • invoice receipt unchangeable
                                                                                                          Prerequisite:
                                                                                                          The goods receipt is non-valuated or there is no provision for goodsreceipt. Additionally, the 'Account Assignment Changeable at InvoiceReceipt' indicator (REUPD field) must not be set, and material forvaluated special stock must not be involved. The account assignmentcannot be changed if the goods receipt is valuated or if material forvaluated special stock is involved.
                                                                                                          AccountingData:
                                                                                                          No entry. The system adopts the account assignment data from thepurchase order or service entry sheet.
                                                                                                          • Multiple account assignment and account assignment changeable at the
                                                                                                          • time of invoice receipt
                                                                                                            Prerequisite:
                                                                                                            The goods receipt is non-valuated or there is no provision for goodsreceipt. Additionally, the 'Account Assignment Changeable at InvoiceReceipt' indicator (REUPD field) must be set for the account assignmentcategory used, and material for valuated special stock must not beinvolved.
                                                                                                            AccountingData:
                                                                                                            Mandatory entry. Make entries according to the information below for theindividual fields. This enables you avoid a random distribution ofquantities and amounts among the account assignment items
                                                                                                            • Multiple account assignment and account assignment unchangeable at
                                                                                                            • the time of invoice receipt
                                                                                                              Prerequisite:
                                                                                                              The goods receipt is non-valuated or there is no provision for goodsreceipt. Additionally, the 'Account Assignment Changeable at InvoiceReceipt' indicator (REUPD field) must not be set, and material forvaluated special stock must not be involved. The account assignment islikewise unchangeable in the case of settlement in respect of purchaseorders for services if goods receipt is valuated. Furthermore, theaccount assignment is unchangeable in the case of settlement in respectof a purchase order for material for valuated special stock.
                                                                                                              AccountingData:
                                                                                                              Mandatory entry. Make entries according to the information below for theindividual fields. This enables you avoid a random distribution ofquantities and amounts among the account assignment items Make sure thatyour entries match the planned account assignments from the purchaseorder or service entry sheet. The system checks this content and in theevent of variances writes a corresponding error message to the returnparameter Return.
                                                                                                              Alternative entry as of Release Enterprise 4.70:
                                                                                                              As of Release 4.70, you can only add information to the followingfields:
                                                                                                              Document item in invoice document (INVOICE_DOC_ITEM field)
                                                                                                              Sequential number of the account assignment (SERIAL_NO field)
                                                                                                              Amount in document currency (ITEM_AMOUNT field)
                                                                                                              If the quantity field (QUANTITY) is populated, the purchase order unit(PO_UNIT) or purchase order unit in ISO code (PO_UNIT_ISO) fields mustalso be populated.
                                                                                                              Tax code (TAX_CODE field)
                                                                                                              Tax jurisdiction code (TAXJURCODE field)
                                                                                                              The system determines the account assignment information automaticallyfrom the purchase order or service entry sheet.
                                                                                                              For each item in the incoming invoice, the system determines whether theitem has single or multiple account assignment on the basis of theassociated PO item.
                                                                                                              In the case of purchase orders for services with service-based invoiceverification, the system checks whether each individual service hassingle or multiple account assignment. However, if you are not usingservice-based invoice verification, the check is made for the entireservice entry sheet.
                                                                                                              Note:
                                                                                                              If you only partially populate the fields of the AccountingDatatable, in addition to the data entered, the system adopts the data ofthe empty fields and not the account assignment data from thepurchase order.
                                                                                                              The following fields must be filled:
                                                                                                              • Document item in invoice document (INVOICE_DOC_ITEM field)

                                                                                                              • Unplanned account assignment from invoice verification (XUNPL field) or
                                                                                                              • account assignment sequence number (SERIAL_NO field)
                                                                                                                • Amount in document currency (ITEM_AMOUNT field)

                                                                                                                • G/L account number (GL_ACCOUNT field)

                                                                                                                • If the quantity field (QUANTITY) is populated, the purchase order unit
                                                                                                                • (PO_UNIT) or purchase order unit in ISO code (PO_UNIT_ISO) fields mustalso be populated.
                                                                                                                  • If a there is a different purchase order price unit in the purchase
                                                                                                                  • order, the Quantity in PO Price Unit (PO_PR_QNT), Purchase Order PriceUnit (PO_PR_UOM) and PO Price Unit in ISO Code (PO_PR_UOM_ISO) fieldsmust be populated.
                                                                                                                    The following fields can be populated:
                                                                                                                    • Tax code (TAX_CODE field)

                                                                                                                    • Tax jurisdiction code (TAXJURCODE field)

                                                                                                                    • If the Quantity in Purchase Order Price Unit (PO_PR_QNT) field is
                                                                                                                    • populated, the Purchase Order Price Unit (PO_PR_UOM) field or thePurchase Order Price Unit in ISO Code (PO_PR_UOM_ISO) field must also bepopulated.
                                                                                                                      The following fields are populated with the input values of thecalling program in the account assignment table:
                                                                                                                      • Cost center (COSTCENTER field)

                                                                                                                      • SD document number (SD_DOC field)

                                                                                                                      • SD document item (SDOC_ITEM field)

                                                                                                                      • Main asset number (ASSET_NO field)

                                                                                                                      • Asset subnumber (SUB_NUMBER field)

                                                                                                                      • Order number (ORDERID field)

                                                                                                                      • Reference date for settlement accounting (REF_DATE field)

                                                                                                                      • Commitment item (CMMT_ITEM field)

                                                                                                                      • Funds center (FUNDS_CTR field)

                                                                                                                      • Functional area (FUNC_AREA field)

                                                                                                                      • Funds (FUND field)

                                                                                                                      • Business area (BUS_AREA field)

                                                                                                                      • Internal key for Real Estate object (RL_EST_KEY field)

                                                                                                                      • Controlling area (CO_AREA field)

                                                                                                                      • Cost object (COSTOBJEKT field)

                                                                                                                      • Network number for account assignment (NETWORK field)

                                                                                                                      • Activity number (ACTIVITY field)

                                                                                                                      • Profitability segment number (CO-PA) (PROFIT_SEGM_NO field)

                                                                                                                      • Profit center (PROFIT_CTR field)

                                                                                                                      • Work breakdown structure element (WBS_ELEM field)

                                                                                                                      • Grant (GRANT_NBR field)

                                                                                                                      • Commitment item (CMMT_ITEM_LONG field)

                                                                                                                      • Function area (FUNC_AREA_LONG field)

                                                                                                                      • FM: Budget period (BUDGET_PERIOD field)

                                                                                                                      • Delivery creation date (DEL_CREATE_DATE field)

                                                                                                                      • INCLUDE BAPI_DATAELEMENT

                                                                                                                        Value range
                                                                                                                        Order unit and order price unit
                                                                                                                        The system checks whether the purchase order unit (PO_UNIT field) or theorder unit in ISO code (PO_UNIT_ISO) matches the PO unit of theassociated purchase order.
                                                                                                                        The system checks whether the purchase order price unit (PO_PR_UOM) orthe purchase order price unit in ISO code (PO_PR_UOM_ISO field) matchesthe purchase order price unit of the associated purchase order.
                                                                                                                        In the case of a purchase order for external services, the system checkswhether the purchase order unit (PO_UNIT field) or the order unit in ISOcode (PO_UNIT_ISO) is the same as the PO unit of the associated serviceentry sheet.
                                                                                                                        Unplanned account assignment from invoice verification (XUNPL field)or running number of account assignment (SERIAL_NO field)
                                                                                                                        Examples of entries:
                                                                                                                        A purchase order item has threefold account assignment.

                                                                                                                        • You wish to change the existing account assignment:

                                                                                                                        • In the XUNPL field, enter ' ' and then enter the line that you wish tochange (for example, '2') in the SERIAL_NO field.
                                                                                                                          • You wish to add an unplanned account assignment:

                                                                                                                          • Enter 'X' in the XUNPL field and leave the SERIAL_NO field blank.
                                                                                                                            Checks
                                                                                                                            If you do not enter any data in the following fields, the systemdetermines the data according to the specified priorities. If the systemcannot determine any data, the system returns relevant messages from themethod call. These are listed in the return parameters.
                                                                                                                            Tax code
                                                                                                                            1. The determines the tax code from the TAX_CODE field.
                                                                                                                            2. The system determines the tax code from the associated purchaseorder.

                                                                                                                            Description
                                                                                                                            This table enables you to supply the enhancement fields from table IVEXTwithout modifications.

                                                                                                                            Description
                                                                                                                            This table contains the G/L account data for an incoming invoice.
                                                                                                                            If you also want to post to a G/L account for a PO item, enter therequired postings in the GlAccountData table.
                                                                                                                            Note:
                                                                                                                            For more information on the meaning of the individiual parameter fields,see the relevant data element documentation in the ABAP Dictionary.
                                                                                                                            The following fields must be populated:

                                                                                                                            • Document item in invoice document (field INVOICE_DOC_ITEM)

                                                                                                                            • G/L account from G/L accounting (field GL_ACCOUNT)

                                                                                                                            • Debit/credit indicator (field DB_CR_IND)

                                                                                                                            • Company code (field COMP_CODE)

                                                                                                                            • Tax code (field TAX_CODE)

                                                                                                                            • The following fields can be populated:
                                                                                                                              • Amount in document currency (field ITEM_AMOUNT)

                                                                                                                              • Indicator: Negative posting (field NEG_POSTNG)

                                                                                                                              • Tax jurisdiction code - tax location for calculation of taxes (field
                                                                                                                              • TAXJURCODE)
                                                                                                                                • Item text (field ITEM_TEXT)

                                                                                                                                • Cost center (field COST_CENTER)

                                                                                                                                • SD document number (field SD_DOC)

                                                                                                                                • SD document item (field SDOC_ITEM)

                                                                                                                                • Order number (field ORDERID)

                                                                                                                                • Reference date for settlement (field REF_DATE)

                                                                                                                                • Commitment item (field CMMT_ITEM_LONG)

                                                                                                                                • Funds center (field FUNDS_CTR)

                                                                                                                                • Function area (field FUNC_AREA_LONG)

                                                                                                                                • Profit center (field PROFIT_CTR)

                                                                                                                                • Funds (field FUND)

                                                                                                                                • Business area (field BUS_AREA)

                                                                                                                                • Business area of business partner (field TR_PART_BA)

                                                                                                                                • Cost object (field COSTOBJECT)

                                                                                                                                • Network plan number for account assignment (field NETWORK)

                                                                                                                                • Activity number (field ACTIVITY)

                                                                                                                                • WBS element (field WBS_ELEM)

                                                                                                                                • Service type (field ACTTYPE)

                                                                                                                                • Internal key for Real Estate object (field RL_EST_KEY)

                                                                                                                                • Personnel number (field PERSON_NO)

                                                                                                                                • Business process (field CO_BUSPROC)

                                                                                                                                • Grant (field GRANT_NBR)
                                                                                                                                • Value range
                                                                                                                                  Checks
                                                                                                                                  If the system cannot determine any data, the system returns relevantmessages from the method call. These are listed in the return parameter.
                                                                                                                                  Document item in invoice document (field INVOICE_DOC_ITEM)
                                                                                                                                  The field must be populated with values in ascending order.

                                                                                                                                  Description
                                                                                                                                  With this table, you pass on the data for the items of the incominginvoice.
                                                                                                                                  INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                  The following fields must be populated:

                                                                                                                                  • Invoice document number (INVOICE_DOC_ITEM field)

                                                                                                                                  • Purchase order number (PO_NUMBER field)

                                                                                                                                  • Purchasing document item number (PO_ITEM field)

                                                                                                                                  • Amount in document currency (ITEM_AMOUNT field)

                                                                                                                                  • If the quantity field (QUANTITY) is populated, the order unit (PO_UNIT)
                                                                                                                                  • or order unit in ISO code (PO_UNIT_ISO) fields must be populated aswell.
                                                                                                                                    • If there is a different order price unit in the purchase order, the
                                                                                                                                    • quantity in order price unit (PO_PR_QNT) and order price unit(PO_PR_UOM) or order price unit in ISO code (PO_PR_UOM_ISO) fields mustbe populated as well.
                                                                                                                                      • If goods receipt-based invoice verification has been defined, the
                                                                                                                                      • following fields must be populated:
                                                                                                                                        Document number of a reference document (REF_DOC)
                                                                                                                                        Fiscal year of the current period (REF_DOC_YEAR)
                                                                                                                                        Reference document item (REF_DOC_IT)
                                                                                                                                        • If planned delivery costs are posted for a purchase order, the fields
                                                                                                                                        • level number (COND_ST_NO) and condition counter (COND_COUNT) or thefield condition type (COND_TYPE) must be populated.
                                                                                                                                          (You can interpret the values for the fields from database table KONVfor condition and transaction data.)
                                                                                                                                          • For business transactions involving a purchase order for external
                                                                                                                                          • services and service-based invoice verification, if the service entrysheet number field (SHEET_NO) is populated then the line number field(SHEET_ITEM) must also contain a value.
                                                                                                                                            The following fields can be populated:
                                                                                                                                            • Document number of a reference document (REF_DOC field)

                                                                                                                                            • Fiscal year of the current period (REF_DOC_YEAR field)

                                                                                                                                            • Reference document item (REF_DOC_IT field)

                                                                                                                                            • Indicator: subsequent debit/credit (DE_CRE_IND field)

                                                                                                                                            • Tax code (TAX_CODE field)

                                                                                                                                            • Tax jurisdiction code # location for tax calculation (TAXJURCODE field)

                                                                                                                                            • If the quantity in order price unit (PO_PR_QNT) field is populated, the
                                                                                                                                            • order price unit (PO_PR_UOM) or order price unit in ISO code(PO_PR_UOM_ISO) fields must be populated as well.
                                                                                                                                              • Item Text (ITEM_TEXT field)

                                                                                                                                              • Final Invoice Indicator (FINAL_INV field)

                                                                                                                                              • Clearing Indicator for GR/IR Posting for External Services
                                                                                                                                              • (GRIR_CLEAR_SRV field)
                                                                                                                                                • Indicator: posting line not cash discount-relevant (CSHDIS_IND field)
                                                                                                                                                • Value range
                                                                                                                                                  Functionality:
                                                                                                                                                  Creating subsequent debits and credits
                                                                                                                                                  If you enter an X in the DE_CRE_IND field in table ItemDataand an X for posting an invoice in the INVOICE_IND field intable HeaderData, then the system creates a subsequent debit.This means that the amount to be invoiced is apportioned among thequantities already for which settlement has already been effected.
                                                                                                                                                  If you enter an X in the DE_CRE_IND field in table ItemDataand leave the INVOICE_IND field in table HeaderData blank,then the system creates a subsequent credit.
                                                                                                                                                  Checks:
                                                                                                                                                  Order unit and order price unit
                                                                                                                                                  1. The system checks that the order unit (PO_UNIT field) or order unitin ISO code (PO_UNIT_ISO field) is the same as the order unit in therelevant purchase order.
                                                                                                                                                  2. The system checks that the order price unit (PO_PR_UOM field) or theorder price unit in ISO code (PO_PR_UOM_ISO field) is the same as theorder price unit in the relevant purchase order.
                                                                                                                                                  Invoice document number (INVOICE_DOC_ITEM field)
                                                                                                                                                  This field must be populated with ascending values.
                                                                                                                                                  Posting of purchase order items or planned delivery costs
                                                                                                                                                  1. If the fields condition type (COND_TYPE), level number (COND_ST_NO),and condition counter (COND_COUNT) are blank, the system creates aninvoice for a purchase order item.
                                                                                                                                                  2. If the fields for the level number (COND_ST_NO field) and conditioncounter (COND_COUNT field) or condition type (COND_TYPE field) arepopulated, the system creates an invoice for a purchase order item withplanned delivery costs.
                                                                                                                                                  If you do not enter any data in the following fields, the systemdetermines the data according to the priorities specified. If the systemcannot determine any data, it returns appropriate return messages fromthe method call. These are listed in the return parameter.
                                                                                                                                                  Tax code
                                                                                                                                                  Priority:
                                                                                                                                                  1. The system determines the tax code from the TAX_CODE field.
                                                                                                                                                  2. The system determines the tax code from the relevant purchase order.

                                                                                                                                                  Description
                                                                                                                                                  This table contains the material account data for an incoming invoice.
                                                                                                                                                  If you also want to post to a material account for a PO item, enter therequired postings in the MaterialData table.
                                                                                                                                                  Note:
                                                                                                                                                  For more information on the meaning of the individiual parameter fields,see the relevant data element documentation in the ABAP Dictionary.
                                                                                                                                                  The following fields must be populated:

                                                                                                                                                  • Document item in invoice document (INVOICE_DOC_ITEM field)

                                                                                                                                                  • Material (MATERIAL field)

                                                                                                                                                  • Valuation area (PLANT field)

                                                                                                                                                  • Debit/credit indicator (DB_CR_IND field)

                                                                                                                                                  • Quantity (QUANTITY field)

                                                                                                                                                  • Base unit of measure (BASE_UOM field)

                                                                                                                                                  • Base unit of measure in ISO code (BASE_UOM_ISO field)

                                                                                                                                                  • Tax code (TAX_CODE field)

                                                                                                                                                  • The following fields can be populated:
                                                                                                                                                    • Valuation type (VALUATION_TYPE field)

                                                                                                                                                    • Amount (ITEM_AMOUNT field)

                                                                                                                                                    • Tax jurisdiction code - tax location for calculation of taxes
                                                                                                                                                    • (TAXJURCODE field)

                                                                                                                                                      Value range
                                                                                                                                                      Checks
                                                                                                                                                      If the system cannot determine any data, the system returns relevantmessages from the method call. These are listed in the return parameter.
                                                                                                                                                      Document item in invoice document (INVOICE_DOC_ITEM field)
                                                                                                                                                      The field must be populated with values in ascending order.

                                                                                                                                                      Description
                                                                                                                                                      INCLUDE BAPI_TABLE OBJECT DOKU ID TX

                                                                                                                                                      Value range
                                                                                                                                                      Type,,ID,,Number,,Message
                                                                                                                                                      E,,M8,,366,,Terms of payment are incorrect
                                                                                                                                                      E,,M8,,334,,Do not fill field IV_CATEGORY
                                                                                                                                                      E,,M8,,367,,Enter the line numbers in table &1 in
                                                                                                                                                      ,,,,,,ascending order
                                                                                                                                                      E,,M8,,368,,Fill field XUNPL or SERIAL_NO for purchase
                                                                                                                                                      ,,,,,,order item <(>&<)>
                                                                                                                                                      E,,M8,,332,,Planned delivery costs for PO item <(>&<)>
                                                                                                                                                      ,,,,,,incorrectly defined
                                                                                                                                                      E,,M8,,534,,Balance not zero: & debits: & credits: &
                                                                                                                                                      Other possible messages
                                                                                                                                                      Messages from other function modules or programs can also appear, suchas the following:
                                                                                                                                                      Type,,ID,,Number,,Message
                                                                                                                                                      E,,ME,,706,,Item &1 of purchasing document &2 does not exist
                                                                                                                                                      Default

                                                                                                                                                      Description
                                                                                                                                                      This table contains the tax information for the invoice to be created.
                                                                                                                                                      INCLUDE BAPI_DATAELEMENT
                                                                                                                                                      The following fields have to be populated:

                                                                                                                                                      • Tax code (TAX_CODE field)

                                                                                                                                                      • Tax amount in document currency (TAX_AMOUNT field)

                                                                                                                                                      • The following fields can be populated:
                                                                                                                                                        • Tax base amount in document currency (TAX_BASE_AMOUNT field)

                                                                                                                                                        • Condition type (COND_TYPE field)

                                                                                                                                                        • Tax jurisdiction (TAXJURCODE field)

                                                                                                                                                        • Tax jurisdiction code - location for tax (TAXJURCODE_DEEP field)

                                                                                                                                                        • Document item number for tax document (ITEMNO_TAX field)
                                                                                                                                                        • Description
                                                                                                                                                          With this table, you pass on the data of the incoming invoice if youwant to distribute the gross amount among several creditor lines.
                                                                                                                                                          INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                                          The following fields must be populated:

                                                                                                                                                          • Grouping key for split in the creditor line (SPLIT_KEY field)

                                                                                                                                                          • The following fields can be populated:
                                                                                                                                                            • Gross invoice partial amount in document currency (SPLIT_AMOUNT field)

                                                                                                                                                            • Payment method (PYMT_METH field)

                                                                                                                                                            • Tax code (TAX_CODE field)

                                                                                                                                                            • Terms of payment key (PMNTTRMS field)

                                                                                                                                                            • Additional payment method (PMTMTHSUPL field)
                                                                                                                                                            • Value range
                                                                                                                                                              Grouping key (SPLIT_KEY)
                                                                                                                                                              If you want to distribute withholding tax among several creditor lines,you must use the same grouping key for the amount split (SPLIT_KEY) asfor the withholding tax. You must enter the line numbers for thegrouping key in ascending order.

                                                                                                                                                              Description
                                                                                                                                                              With this table, you pass on the data for the withholding tax data fromthe incoming invoice. This data can include information for calculatingemployment tax or capital gains tax, for example.
                                                                                                                                                              INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                                              The following fields must be populated:

                                                                                                                                                              • Grouping key for a split in the vendor line (SPLIT_KEY field)

                                                                                                                                                              • The following fields can be populated:
                                                                                                                                                                • Code for the withholding tax type (WI_TAX_TYPE field)

                                                                                                                                                                • Withholding tax code (WI_TAX_CODE field)

                                                                                                                                                                • Withholding tax base amount (WI_TAX_BASE field)

                                                                                                                                                                • Withholding tax amount in document currency (WI_TAX_AMT field)

                                                                                                                                                                • Withheld withholding tax in doc. currency (WI_TAX_WITHHELD_AMT field)
                                                                                                                                                                • Value range
                                                                                                                                                                  Grouping key (SPLIT_KEY)
                                                                                                                                                                  If you enter several lines for the withholding tax, you must enter theline numbers for the grouping key in ascending order.
                                                                                                                                                                  If you want to distribute the withholding tax amongseveral creditorlines, you must use the same grouping key for the amount split(SPLIT_KEY) as you use for the withholding tax.
                                                                                                                                                                  Withholding tax type (WI_TAX_TYPE) and withholding tax code(WI_TAX_CODE)
                                                                                                                                                                  The withholding tax type contains the calculating rule for determiningthe withholding tax. The vendor can be exempted from withholding tax atcertain times. This information is stored in the vendor master record.
                                                                                                                                                                  If you enter a withholding tax code, then you must also enter thewithholding tax type.
                                                                                                                                                                  If the withholding tax code (WI_TAX_CODE) contains a value, then thewithholding tax base amount (WI_TAX_BASE) must be populated.
                                                                                                                                                                  If the withholding tax code (WI_TAX_CODE) is blank, then the withholdingtax amount in the document currency (WI_TAX_AMT) and the withholding taxbase amount (WI_TAX_BASE) must be zero.

1528384MRM_BAPI: Separation of corrections for TM integration
1528385MRM_BAPI: Separation of corrections for TM integration
1075141BAPIs valid for usage with AFS6.0
830717BAPI: Classic withholding tax
944161BAPI: Purchase order price quantity is negative
381593MIRO/MIR7/MIRA: Batch Input is not possible
648553Support of Invoice Verification BAPI (IS-OIL)
555270BAPI: Entry of negative quantities
549921BAPI GetDetail: Incomplete address data (CPD)
516198BAPI: Mandatory field "Tax code" in GLACCOUNTDATA
486726BAPI: Direct posting to material or G/L account
402363BAPI_INCOMING_INVOICE_CREATE: item amount
380192MIR7, BAPI: Termination RW100 update call without check