SAP Function BAPI_INCOMINGINVOICE_SAVE - Invoice Verification: Flag Invoice for Background Processing

Parameter Reference Type Length Default Optional Text
ADDITIONALHEADERDATA BAPI_INCINV_SAVE_HEADER_BACKGR u 48 Transfer Structure for New Header Data Incoming Inv. (Save)
ADDRESSDATA BAPI_INCINV_CREATE_ADDRESSDATA u 516 X Transfer Structure: Address Data Incoming Invoice (Create)
HEADERDATA BAPI_INCINV_CREATE_HEADER u 489 Transfer Structure for Invoice Header Data (Create)
REFDOCCATEGORY BAPI_INCINV_FLD-REF_DOC_CATEGORY C 1 Reference Document Category

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
EXTENSIONIN BAPIPAREX 990 X Enhancement Fields (Import Parameter)
RETURN BAPIRET2 548 Return Parameter
SELECTBILLLADING BAPI_INCINV_SELECT_BILL_LADING 51 X Transfer Structure for Bills of Lading Incoming Invoice (Create)
SELECTDELIVERY BAPI_INCINV_SELECT_DELIVERY 51 X Transfer Structure f. Delivery Notes Incoming Invoice (Save)
SELECTPLANT BAPI_INCINV_SELECT_PLANT 4 X Transfer Structure for Plants Incoming Invoice (Create)
SELECTPO BAPI_INCINV_SELECT_PO 15 X Transfer Structure for Purchasing Documents Incoming Invoice (Create)
SELECTSERVICE BAPI_INCINV_SELECT_SERVICE 10 X Transfer Structure for Service Entry Sheet Incoming Invoice (Create)
TAXDATA BAPI_INCINV_CREATE_TAX 66 X Transfer Structure for Tax Data (Create)
VENDORITEMSPLITDATA BAPI_INCINV_CREATE_VENDORSPLIT 27 X Transfer Structure: Vendor Split Incoming Invoice (Create)
WITHTAXDATA BAPI_INCINV_CREATE_WITHTAX 46 X Transfer Structure: Withholding Tax Data (Create)

Functionality
In the case of invoice verification in the background, you enter only asmall amount of document header data such as invoice amount, currency,and tax information. You also assign the incoming invoice to a documentor a vendor. The system saves the entered data and the assignment. Thesystem creates an invoice scheduled for verification in the background.The data can be transferred via EDI or XML.
You can use this method to do the following:

  • Enter invoices for blanket purchase orders

  • Create invoices for purchase orders with planned delivery costs

  • Use document types with external number ranges

  • Enter invoices with withholding tax

  • Enter invoices with several creditor lines and different methods and
  • terms of payment
    • Enter invoices for returns items

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

      • The invoice will be verified in the background at a later point in time.Invoice verification in the background is executed using the programRMBAG00. Your system administrator defines the jobs that startthe program for invoice verification in the background. The systemdetermines the item list on the basis of the stored assignment.

        Restrictions
        The following functions are not possible:

        • Post one-time data

        • Make an assignment to a transportation service provider

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

          • Bank details

          • Payment reference

          • Short key for house bank

          • Service indicator
          • Notes
            Authorization check
            The system checks whether the user has authorization to use the FastInvoice Entry transaction (MIRA).
            Transfer
            You pass on the header data of the incoming invoice using the structuresHeaderdata and AdditionalHeaderData and the assignmentusing the structure RefDocCategory and the tables SelectPo
            , SelectDelivery, SelectBillLading, SelectService
            , and SelectPlant. You pass on tax data using the TaxData
            and WithTaxData tables.
            Return
            The document number of the invoice document and the fiscal year arereturned 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
            The following examples illustrate the use of different assignments andfield entries.

            Example: Assignment to purchase order
            If your invoice references a purchasing document or scheduling agreementand you wish to enter goods items, you must populate the followingfields:
            RefDocCategory table

            • REF_DOC_CATEGORY (Reference document category): 1

            • HeaderData table
              • INVOICE_IND (Invoice=X/Credit memo=blank): X

              • DOC_DATE (Document number in document): 11.05.00

              • PSTNG_DATE (Posting date in document : 11.06.00

              • COMP_CODE (Company code): 0001

              • CURRENCY (Currency key): EUR

              • AdditionalHeaderData table
                • ASSIGN_DELIV (Indicator: Delivery item assignment): X

                • DELIV_POSTING (Posting logic for delivery items (Invoice=S/Credit
                • memo=H): S
                  • SEL_GOODS (Indicator: Goods invoice/Service): X

                  • SelectPo table
                    • PO_NUMBER (Document number of purchasing document): 4500000679

                    • For more information, see the parameter documentation for the tables
                      RefDocCategory,HeaderData,AdditionalHeaderData, andSelectPo.

                      Example: Assignment to delivery note
                      If your invoice references an external delivery note and you want toenter goods items you must populate the following fields:
                      RefDocCategory table

                      • REF_DOC_CATEGORY (Reference document category): 2

                      • HeaderData table
                        • INVOICE_IND (Invoice=X/Credit memo=blank): X

                        • DOC_DATE (Document date in document): 11.05.00

                        • PSTNG_DATE (Posting date in document): 11.06.00

                        • COMP_CODE (Company code): 0001

                        • CURRENCY (Currency key): EUR

                        • AdditionalHeaderData table
                          • ASSIGN_DELIV (Indicator: Delivery item assignment): X

                          • DELIV_POSTING (Posting logic for delivery items (Invoice=S/Credit
                          • memo=H): S
                            • SEL_GOODS (Indicator: Goods invoice/Service): X

                            • SEL_ VENDOR (Number of selection vendor): SPENCER

                            • SelectDelivery table
                              DELIVERY_NOTE (Number of external delivery note): 11/00-256
                              For more information, see the parameter documentation for the tables
                              • RefDocCategory,

                              • HeaderData,

                              • AdditionalHeaderData and
                                • SelectDelivery.
                                • Example: Assignment to bill of lading
                                  If your invoice references a bill of lading and you wish to enterinvoices for delivery costs, you must populate the following fields:
                                  RefDocCategory table

                                  • REF_DOC_CATEGORY (Reference document category): 3

                                  • HeaderData table
                                    • INVOICE_IND (Invoice=X/Credit memo=blank): X

                                    • DOC_DATE (Document date in document): 11.05.00

                                    • PSTNG_DATE (Posting date in document): 11.06.00

                                    • COMP_CODE (Company code): 0001

                                    • CURRENCY (Currency key): EUR

                                    • AdditionalHeaderData table
                                      • ASSIGN_DELIV (Indicator: Delivery item assignment): X

                                      • ASSIGN_RETURN (Indicator: Returns assignment): X

                                      • DELIV_POSTING (Posting logic for delivery items (Invoice=S/Credit
                                      • memo=H): S
                                        • RETURN_POSTING (Posting logic for returns items (Invoice=S/Credit
                                        • memo=H): H
                                          • SEL_DELIV_COSTS (Indicator: Planned delivery costs)

                                          • SEL_ VENDOR (Number of selection vendor): Spencer

                                          • SelectBillLading table
                                            • BILL_OF_LADING (Number of external bill of lading): FR00-265

                                            • For more information, see the parameter documentation for the tables
                                              • RefDocCategory,

                                              • HeaderData,

                                              • AdditionalHeaderData and
                                                • SelectBillLading

                                                • .

                                                  Example: Assignment to service entry sheet
                                                  If your invoice references a service entry sheet and you wish to entergoods items or services, you must populate the following fields:
                                                  RefDocCategory table

                                                  • REF_DOC_CATEGORY (Reference document category): 4

                                                  • HeaderData table
                                                    • INVOICE_IND (Invoice=X/Credit memo=blank): X

                                                    • DOC_DATE (Document date in document): 11.05.00

                                                    • PSTNG_DATE (Posting date in document): 11.06.00

                                                    • COMP_CODE (Company code): 0001

                                                    • CURRENCY (Currency key): EUR

                                                    • AdditionalHeaderData table
                                                      • ASSIGN_DELIV (Indicator: Delivery item assignment): X

                                                      • ASSIGN_RETURN (Indicator: Returns assignment): X

                                                      • DELIV_POSTING (Posting logic for delivery items (Invoice=S/Credit
                                                      • memo=H): S
                                                        • RETURN_POSTING (Posting logic for returns items (Invoice=S/Credit
                                                        • memo=H): H
                                                          • SEL_GOODS (Indicator: Goods invoice/Service)

                                                          • SEL_ VENDOR (Number of the selection vendor): SPENCER

                                                          • SelectService table
                                                            • SHEET_NO (Number of the service entry sheet): 1000000245

                                                            • For more information, see the parameter documentation for the tables
                                                              • RefDocCategory,

                                                              • HeaderData,

                                                              • AdditionalHeaderData, and
                                                                • SelectService.
                                                                • Example: Assignment to vendor
                                                                  If your invoice references a vendor and you wish to enter goods items orservices, you must populate the following fields:
                                                                  RefDocCategory table

                                                                  • REF_DOC_CATEGORY (Reference document category): 5

                                                                  • HeaderData table
                                                                    • INVOICE_IND (Invoice=X/Credit memo=blank): X

                                                                    • DOC_DATE (Document date in document): 11.05.00

                                                                    • PSTNG_DATE (Posting date in document): 11.06.00

                                                                    • COMP_CODE (Company code): 0001

                                                                    • CURRENCY (Currency key): EUR

                                                                    • AdditionalHeaderData table
                                                                      • ASSIGN_DELIV (Indicator: Delivery item assignment): X

                                                                      • ASSIGN_RETURN (Indicator: Returns assignment): X

                                                                      • DELIV_POSTING (Posting logic for delivery items (Invoice=S/Credit
                                                                      • memo=H): S
                                                                        • RETURN_POSTING (Posting logic for returns items (Invoice=S/Credit
                                                                        • memo=H): H
                                                                          • SEL_GOODS (Indicator: Goods invoice/Service)

                                                                          • SEL_ VENDOR (Number of selection vendor): SPENCER

                                                                          • For more information, see the parameter documentation for the tables:
                                                                            • RefDocCategory,

                                                                            • HeaderData and

                                                                            • AdditionalHeaderData.

                                                                              Example: Incoming invoice with planned delivery costs
                                                                              If your invoice references a vendor and you wish to enter delivery costsonly, incurred in the period from 1 November 2000 to 15 November 2000,enter the following values. Delivery costs for returns items are not tobe taken into account.
                                                                              RefDocCategory table

                                                                              • REF_DOC_CATEGORY (reference document category): 5

                                                                              • HeaderData table
                                                                                • INVOICE_IND (Invoice=X/Credit memo=blank): X

                                                                                • DOC_DATE (Document date in document): 11.05.00

                                                                                • PSTNG_DATE (Posting date in document): 11.06.00

                                                                                • COMP_CODE (Company code): 0001

                                                                                • CURRENCY (Currency key): EUR

                                                                                • AdditionalHeaderData table
                                                                                  • ASSIGN_DELIV (Indicator: Delivery item assignment)

                                                                                  • DELIV_POSTING (Posting logic for delivery items (Invoice=S/Credit
                                                                                  • memo=H): S
                                                                                    • SEL_DELIV_COSTS (Indicator: Planned delivery costs)

                                                                                    • SEL_ VENDOR (Number of selection vendor): SPENCER

                                                                                    • DELIV_DATE_FROM (Delivery date): 11.01.00

                                                                                    • DELIV_DATE_TO (Delivery date): 11.15.00

                                                                                    • For more information, see the parameter documentation for the tables
                                                                                      • RefDocCategory,

                                                                                      • HeaderData and

                                                                                      • AdditionalHeaderData.

                                                                                        Example: Invoice with withholding tax
                                                                                        This example shows which header data you can enter in the HeaderData
                                                                                        and AdditionalHeaderData tables and which withholding taxinformation you can enter in the WithTaxData table in order toenter an invoice with withholding tax that references a purchase order.
                                                                                        You receive an invoice for this purchase order referencing PO no.4500000679. You are invoiced for a quantity of 10 pc and a gross amountof 100 USD. You have to pay 10% 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 code): USD

                                                                                        • GROSS_AMOUNT (Gross amount): 100.00

                                                                                        • AdditionalHeaderData table
                                                                                          • ASSIGN_DELIV (Indicator: Delivery item assignment): X

                                                                                          • DELIV_POSTING (Posting logic for delivery items (Invoice=S/Credit
                                                                                          • memo=H): S
                                                                                            • SEL_GOODS (Indicator: Goods invoice/Service): X

                                                                                            • SelectPo table
                                                                                              PO_NUMBER (Document number of purchasing document): 4500000679
                                                                                              WithTaxData table
                                                                                              • SPLIT_KEY (Grouping key for splitting the withholding tax): 0001

                                                                                              • WI_TAX_TYPE (Indicator for withholding tax type): 01

                                                                                              • WI_TAX_CODE (Withholding tax indicator): 01

                                                                                              • WI_TAX_BASE (Withholding tax base amount): 100

                                                                                              • WI_TAX_AMT (Withholding tax amount in document currency): 10.00

                                                                                              • For more information, see the parameter documentation for the tables
                                                                                                • HeaderData,

                                                                                                • AddtionalHeaderData,
                                                                                                  • SelectPo and

                                                                                                  • WithTaxData.
                                                                                                  • Example: Incoming invoice with amount split
                                                                                                    This example shows which header data you can enter in the HeaderData
                                                                                                    and AdditionalHeaderData tables and which information you canenter in the VendorItemSplitData table in order to generate anincoming invoice with amount split.
                                                                                                    You receive an invoice for this purchase order referencing PO no.4500000697. You are invoiced for a quantity of 10 pc and a gross amountof 100 USD. You wish to distribute the gross amount among two creditorlines. 40% of the gross amount is to be paid immediately by check, andthe remaining 60% of the gross amount is to be paid within within 14days subject to 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

                                                                                                    • AdditionalHeaderData table
                                                                                                      • ASSIGN_DELIV (Indicator: Delivery items assignment): X

                                                                                                      • ASSIGN_RETURN (Indicator: Returns assignment): X

                                                                                                      • DELIV_POSTING (Posting logic for delivery items (Invoice=S/Credit
                                                                                                      • memo=H): S
                                                                                                        • RETURN_POSTING (Posting logic for returns items (Invoice=S/Credit
                                                                                                        • memo=H): H
                                                                                                          • SEL_GOODS (Indicator: Goods invoice/Service)

                                                                                                          • SEL_DELIV_COSTS (Indicator: Planned delivery costs)

                                                                                                          • SelectPo table
                                                                                                            • PO_NUMBER (Document number of the purchasing document:4500000697

                                                                                                            • VendorItemSplitData table
                                                                                                              1st creditor line
                                                                                                              • SPLIT_KEY (Grouping key for splitting of creditor line): 0001

                                                                                                              • SPLIT_AMOUNT(Partial invoice gross amount in document currency): 40.00

                                                                                                              • PYMT_METH (Payment method): S

                                                                                                              • TAX_CODE (Tax code): V0

                                                                                                              • PMNTTRMS (Terms of payment key): 0001

                                                                                                              • 2nd creditor line
                                                                                                                • SPLIT_KEY (Grouping key for splitting creditor line): 0002

                                                                                                                • SPLIT_AMOUNT(Gross invoice amount in document currency): 60.00

                                                                                                                • PYMT_METH (Payment method): U

                                                                                                                • TAX_CODE (Tax code): V0

                                                                                                                • PMNTTRMS (Terms of payment key): 0003

                                                                                                                • For more information, see the parameter documentation for the tables
                                                                                                                  • HeaderData,

                                                                                                                  • AddtionalHeaderData,
                                                                                                                    • SelectPo, and

                                                                                                                    • VendorItemSplitData.

                                                                                                                      Example: Incoming invoice for one-time vendor
                                                                                                                      This example shows how to proceed in order to enter and post an invoicefor a one-time vendor.
                                                                                                                      It is not necessary to populate table AddressData with data. Ifyou do not enter any data in the AddressData table, the addressdata for the one-time vendor is adopted in the invoice 1:1 from thepurchase order.
                                                                                                                      If you use the AddressData table for the data transfer, theaddress data for the one-time vendor is read from the purchase orderinto the invoice and then overwritten or supplemented with the fields ofthe AddressData table.
                                                                                                                      In the purchase order for the one-time vendor, the name is 'SAP AG', thepostal code is '60000', and the street and building number are'Neurottstrasse 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 address data:Name 'SAP AG', street and building number 'Neurottstrasse 16', postalcode '69190', place 'Walldorf'.
                                                                                                                      For more information, see the parameter documentation for the tableAddressData.

                                                                                                                      Example: Incoming invoice for different payee
                                                                                                                      This example shows which address data you must enter in theAddressData table in order to enter and post an invoice for adifferent payee.
                                                                                                                      You receive an invoice for the different payee with the name 'SAP AG',postal code '69190', place 'Walldorf', bank number '38070724', andaccount number '4711'. Enter the following data:
                                                                                                                      AddressData table
                                                                                                                      ACC_1_TIME (Indicator for 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.

                                                                                                                      Description
                                                                                                                      INCLUDE BAPI_KEYFIELD
                                                                                                                      Fiscal year

                                                                                                                      Description
                                                                                                                      INCLUDE BAPI_KEYFIELD
                                                                                                                      Document number of an invoice document number

                                                                                                                      Description
                                                                                                                      This structure contains additional header data for the invoice documentto be generated.
                                                                                                                      INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                      The mandatory fields to be populated are dependent on the input in theRefDocCategory table for the assignment.

                                                                                                                      Assignment to purchase order
                                                                                                                      If the Reference Document field (Ref_Doc_Category) is populatedwith the value 1 for purchase order in the tableRefDocCategory,and you wish to effect settlement in respect of deliveries, you mustpopulate the following fields:

                                                                                                                      • Indicator: Delivery item assignment (ASSIGN_DELIV field)

                                                                                                                      • Posting logic for delivery items (DELIV_POSTING field)

                                                                                                                      • Indicator: Goods invoice/Service (SEL_GOODS field)

                                                                                                                      • If you wish to effect settlement with regard to returns, you mustpopulate the following fields:
                                                                                                                        • Indicator: Returns assignment (ASSIGN_RETURN field)

                                                                                                                        • Posting logic for returns items (RETURN_POSTING field)

                                                                                                                        • Indicator: Goods invoice/Service (SEL_GOODS field)

                                                                                                                        • If you wish to effect settlement in respect of delivery costs, you mustpopulate at least the following fields:
                                                                                                                          • Indicator: Delivery item assignment (ASSIGN_DELIV field)

                                                                                                                          • Posting logic for delivery items (DELIV_POSTING field)

                                                                                                                          • Indicator: Planned delivery costs (SEL_DELIV_COST field)

                                                                                                                          • or
                                                                                                                            • Indicator: Returns assignment (ASSIGN_RETURN field)

                                                                                                                            • Posting logic for returns items (RETURN_POSTING field)

                                                                                                                            • Indicator: Planned delivery costs (SEL_DELIV_COST field)

                                                                                                                            • The following fields must not be populated:
                                                                                                                              • Number of selection vendor (SEL_VENDOR field)

                                                                                                                              • Delivery date 'from' (DELIV_DATE_FROM field)

                                                                                                                              • Delivery date 'to' (DELIV_DATE_TO field)

                                                                                                                              • Delivery date for returns 'from' (RETURN_DATE_FROM field)

                                                                                                                              • Delivery date for returns 'to' (RETURN_DATE_TO field)

                                                                                                                              • For more information, see the parameter documentation for the tablesSelectPo andRefDocCategory.

                                                                                                                                Assignment to delivery note
                                                                                                                                If the Reference Document (Ref_Doc_Category) field is populatedwith the value 2 for delivery note in the tableRefDocCategoryand you wish to effect settlement in respect of deliveries, you mustpopulate the following fields:

                                                                                                                                • Indicator: Delivery item assignment (ASSIGN_DELIV field)

                                                                                                                                • Posting logic for delivery items (DELIV_POSTING field)

                                                                                                                                • Indicator: Goods invoice /Service (SEL_GOODS field)

                                                                                                                                • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                • If you wish to effect settlement in respect of returns, then you mustpopulate the following fields:
                                                                                                                                  • Indicator: Returns assignment (ASSIGN_RETURN field)

                                                                                                                                  • Posting logic for returns items (RETURN_POSTING field)

                                                                                                                                  • Indicator: Goods invoice/Service (SEL_GOODS field)

                                                                                                                                  • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                  • If you wish to settle delivery costs, you must populate at least thefollowing fields:
                                                                                                                                    • Indicator: Delivery item assignment (ASSIGN_DELIV field)

                                                                                                                                    • Posting logic for delivery items (DELIV_POSTING field)

                                                                                                                                    • Indicator: Planned delivery costs (SEL_DELIV_COST field)

                                                                                                                                    • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                    • or
                                                                                                                                      • Indicator: Returns assignment (ASSIGN_RETURN field)

                                                                                                                                      • Posting logic for returns items (RETURN_POSTING field)

                                                                                                                                      • Indicator: Planned delivery costs (SEL_DELIV_COST field)

                                                                                                                                      • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                      • If you wish to limit deliveries and returns to certain periods ofdelivery, populate the following fields:
                                                                                                                                        • Delivery date 'from' (DELIV_DATE_FROM field)

                                                                                                                                        • Delivery date 'to' (DELIV_DATE_TO field)

                                                                                                                                        • Delivery date for returns 'from' (RETURN_DATE_FROM field)

                                                                                                                                        • Delivery date for returns 'to' (RETURN_DATE_TO field)

                                                                                                                                        • For more information, see the parameter documentation for the tablesRefDocCategoryand SelectDelivery
                                                                                                                                          .

                                                                                                                                          Assignment to bill of lading
                                                                                                                                          If the Reference Document (Ref_Doc_Category) field is populatedwith the value 3 for bill of lading in the table RefDocCategoryand you wish to settle delivery costs, you must populate at least thefollowing fields:

                                                                                                                                          • Indicator: Delivery items assignment (ASSIGN_DELIV field)

                                                                                                                                          • Posting logic for delivery items (DELIV_POSTING field)

                                                                                                                                          • Indicator: Planned delivery costs (SEL_DELIV_COSTS field)

                                                                                                                                          • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                          • or
                                                                                                                                            • Indicator: Returns assignment (ASSIGN_RETURN field)

                                                                                                                                            • Posting logic for returns items (RETURN_POSTING field)

                                                                                                                                            • Indicator: Planned delivery costs (SEL_DELIV_COSTS field)

                                                                                                                                            • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                            • The following fields must not be populated:
                                                                                                                                              • Indicator: Goods invoice/Service (SEL_GOODS field)

                                                                                                                                              • Delivery date 'from' (DELIV_DATE_FROM field)

                                                                                                                                              • Delivery date 'to' (DELIV_DATE_TO field)

                                                                                                                                              • Delivery date for returns 'from' (RETURN_DATE_FROM field)

                                                                                                                                              • Delivery date for returns 'to' (RETURN_DATE_TO field)

                                                                                                                                              • For more information, see the parameter documentation for the tablesRefDocCategoryand
                                                                                                                                                SelectBillLading
                                                                                                                                                .

                                                                                                                                                Assignment to service entry sheet
                                                                                                                                                If the Reference Document (Ref_Doc_Category) field is populatedwith the value 4 for entry sheet in the table RefDocCategoryand you wish to effect settlement in respect of external services, youmust populate at least the following fields:

                                                                                                                                                • Indicator: Delivery item assignment (ASSIGN_DELIV field)

                                                                                                                                                • Posting logic for delivery items (DELIV_POSTING field)

                                                                                                                                                • Indicator: Goods invoice/Service (SEL_GOODS field)

                                                                                                                                                • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                                • or
                                                                                                                                                  • Indicator: Returns assignment (ASSIGN_RETURN field)

                                                                                                                                                  • Posting logic for returns items (RETURN_POSTING field)

                                                                                                                                                  • Indicator: Goods invoice/Service (SEL_GOODS field)

                                                                                                                                                  • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                                  • The following fields must not be populated:
                                                                                                                                                    • Indicator: Planned delivery costs (SEL_DELIV_COSTS field)

                                                                                                                                                    • Delivery date 'from' (DELIV_DATE_FROM field)

                                                                                                                                                    • Delivery date 'to' (DELIV_DATE_TO field)

                                                                                                                                                    • Delivery date for returns 'from' (RETURN_DATE_FROM field)

                                                                                                                                                    • Delivery date for returns 'to' (RETURN_DATE_TO field)

                                                                                                                                                    • For more information, see the parameter documentation for the tablesRefDocCategoryand SelectService
                                                                                                                                                      .

                                                                                                                                                      Assignment to vendor
                                                                                                                                                      If the Reference Document (Ref_Doc_Category) field is populatedwith the value 5 for vendor in the table RefDocCategoryand you wish to effect settlement with respect to deliveries, you mustpopulate at least the following fields:

                                                                                                                                                      • Indicator: Delivery item assignment (ASSIGN_DELIV field)

                                                                                                                                                      • Posting logic for delivery items (DELIV_POSTING field)

                                                                                                                                                      • Indicator: Goods invoice/Service (SEL_GOODS field)

                                                                                                                                                      • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                                      • If you want to settle returns, you must populate the following fields:
                                                                                                                                                        • Indicator: Returns assignment (ASSIGN_RETURN field)

                                                                                                                                                        • Posting logic for returns items (RETURN_POSTING field)

                                                                                                                                                        • Indicator: Goods invoice/Service (SEL_GOODS field)

                                                                                                                                                        • Number of selection vendor (SEL_ VENDOR field)

                                                                                                                                                        • If you want to settle delivery costs, you must populate at least thefollowing fields:
                                                                                                                                                          • Indicator: Delivery items assignment (ASSIGN_DELIV field)

                                                                                                                                                          • Posting logic for delivery items (DELIV_POSTING field)

                                                                                                                                                          • Indicator: Planned delivery costs (SEL_DELIV_COST field)

                                                                                                                                                          • or
                                                                                                                                                            • Indicator: Returns assignment (ASSIGN_RETURN field)

                                                                                                                                                            • Posting logic for returns items (RETURN_POSTING field)

                                                                                                                                                            • Indicator: Planned delivery costs (SEL_DELIV_COST field)

                                                                                                                                                            • If you wish to limit deliveries and returns to certain periods ofdelivery, populate the following fields:
                                                                                                                                                              • Delivery date 'from' (DELIV_DATE_FROM field)

                                                                                                                                                              • Delivery date 'to' (DELIV_DATE_TO field)

                                                                                                                                                              • Delivery date for returns 'from' (RETURN_DATE_FROM field)

                                                                                                                                                              • Delivery date for returns 'to' (RETURN_DATE_TO field)

                                                                                                                                                              • For more information, see the parameter documentation for the tablesRefDocCategoryand SelectPlant.
                                                                                                                                                                INCLUDE 'BAPI_INCOMINGINVOICE_CREATE ADDRESSDATA' OBJECT DOKU ID FU

                                                                                                                                                                Description
                                                                                                                                                                This structure contains the header data for the invoice document to becreated.
                                                                                                                                                                INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                                                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)

                                                                                                                                                                  • Exchange rate: direct quotation (EXCH_RATE field)

                                                                                                                                                                  • Exchange rate: indirect quotation (EXCH_RATE_V field)

                                                                                                                                                                  • Calculate tax automatically (CALC_TAX_IND field)

                                                                                                                                                                  • Calculate tax automatically (CALC_TAX_IND field)

                                                                                                                                                                  • Baseline date for due date calculation (BLINE_DATE field)

                                                                                                                                                                  • Cash discount days 1 (DSCT_DAYS1 field)

                                                                                                                                                                  • Cash discount days 2 (DSCT_DAYS2 field)

                                                                                                                                                                  • Deadline for net conditions (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)

                                                                                                                                                                  • Delivery costs tax code (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)

                                                                                                                                                                  • Additional payment method (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 maintained in Customizing for LogisticsInvoice Verification, in the step Configure HowUnplanned Delivery Costs Are Posted, the system distributes unplanneddelivery costs either among the items settled in the invoice document orto a 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 the INVOICE_IND field contains an X, the system generates aninvoice.
                                                                                                                                                                      If the INVOICE_IND field is blank, the system generates a creditmemo.
                                                                                                                                                                      Currency key (CURRENCY and CURRENCY_ISO fields)
                                                                                                                                                                      1. The system determines the currency from the SAP display field(CURRENCY field).
                                                                                                                                                                      2. The system determines the currency from the ISO display field(CURRENCY_ISO field).
                                                                                                                                                                      Automatically calculate tax (CALC_TAX_IND field)
                                                                                                                                                                      If the CALC_TAX_IND field contains an X, no data may bemaintained in the table TaxData.
                                                                                                                                                                      Checks:
                                                                                                                                                                      If you do not enter any data in the following fields, the systemdetermines the necessary data according to the priorities specified. Ifthe system cannot determine any data, it returns appropriate returnmessages from the method call. These messages are listed in the returnparameter.
                                                                                                                                                                      Document type (DOC_TYPE field)
                                                                                                                                                                      1. As an alternative, the system adopts the settings from Customizingfor Logistics Invoice Verification Maintain DocumentTypes and Number Ranges.
                                                                                                                                                                      Invoicing party (DIFF_INV field)

                                                                                                                                                                      • Assignment to purchase order

                                                                                                                                                                      • As an alternative, the system determines the invoicing party from theheader data of the first purchase order and populates the DIFF_INVfield. The SEL_VEND (selection vendor) remains initial.
                                                                                                                                                                        • Assignment to delivery note and bill of lading

                                                                                                                                                                        • The system determines the invoicing party from the selection vendor(SEL_VEND field). The SEL_VEND field is initialized.
                                                                                                                                                                          • Assignment to vendor

                                                                                                                                                                          • The system determines the invoicing party from the selection vendor(SEL_VEND field). The SEL_VEND is a mandatory field.
                                                                                                                                                                            Exchange rate (EXCH_RATE field)
                                                                                                                                                                            1. The system determines the exchange rate from the fixed rate in thepurchase order.
                                                                                                                                                                            2. The system determines the exchanges 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.
                                                                                                                                                                            Baseline date for payment
                                                                                                                                                                            1. If the baseline date for due date calculation (BLINE_DATE field) ispopulated, the system determines the baseline date for payment from thebaseline date for due date calculation.
                                                                                                                                                                            2. If the terms of payment key (PMNTTRMS field) is populated and thebaseline date for due date calculation (BLINE_DATE field) is blank, thesystem determines the baseline date for payment from the terms ofpayment key.
                                                                                                                                                                            3. If the terms of payment key (PMNTTRMS field) is populated and thebase date for due date calculation (BLINE_DATE field) is blank, thesystem determines the baseline date for payment from the terms ofpayment key for the first purchase order.
                                                                                                                                                                            Payment block
                                                                                                                                                                            1. If the payment block key (PMNT_BLOCK field) is populated, the systemdetermines the payment block from the payment block key.
                                                                                                                                                                            2. If the terms of payment key (PMNTTRMS field) is populated and thepayment block key (PMNT_BLOCK field) is blank, the system determines thepayment block from the terms of payment key.
                                                                                                                                                                            3. If the terms of payment key (PMNTTRMS field) and the payment block(field PMNT_BLOCK) key is blank, the system determines the payment blockfrom the terms of payment key for the first purchase order.
                                                                                                                                                                            Origin of an invoice document (IV_CATEGORY field)
                                                                                                                                                                            1. The system checks whether the field is blank and automaticallypopulates it with 'B': The invoice document was created by a BAPI.

                                                                                                                                                                            Description
                                                                                                                                                                            The reference document category determines which document the incominginvoice refers to.
                                                                                                                                                                            INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                                                            Reference Document Category

                                                                                                                                                                            Value range
                                                                                                                                                                            The reference document category (Ref_Doc_Category) is a mandatory-entryfield. To create a reference document for background verification, thedocument must contain the following values:

                                                                                                                                                                            • 1: Assignment to purchase order or scheduling agreement

                                                                                                                                                                            • 2: Assignment to delivery note

                                                                                                                                                                            • 3: Assignment to bill of lading

                                                                                                                                                                            • 4: Assignment to service entry sheet

                                                                                                                                                                            • 5: Assignment to vendor

                                                                                                                                                                            • Your chosen assignment affects the entries in the structureAdditionalHeaderData. For more information, see the parameterdocumentation for the table
                                                                                                                                                                              AdditionalHeaderData.

                                                                                                                                                                              Description
                                                                                                                                                                              This table enables you to supply the enhancement fields from table IVEXTwithout modifications.
                                                                                                                                                                              Description
                                                                                                                                                                              INCLUDE BAPI_TABLE OBJECT DOKU ID TX LANGUAGE EN

                                                                                                                                                                              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,,332,,Planned delivery costs for PO item & <(>&<)>
                                                                                                                                                                              ,,,,,,incorrectly defined
                                                                                                                                                                              E,,M8,,374,,Fill in mandatory field &1 SELECT_DELIVERY (tableSelectDelivery)
                                                                                                                                                                              E,,M8,,738,,Fill either field SEL_VENDOR or field SEL_GOODS (importparameter I_ADDITIONALHEADERDATA )
                                                                                                                                                                              E,,M8,,737,,Delete field SELECT_DELIVERY (table SelectDelivery)
                                                                                                                                                                              Other possible message
                                                                                                                                                                              The system may also display message from other function modules orprograms, for example:
                                                                                                                                                                              Type,,ID,,Number,,Message
                                                                                                                                                                              E,,ME,,706,,Item & for purchasing document & does not exist

                                                                                                                                                                              Description
                                                                                                                                                                              This structure contains the number of the bill of lading at the time ofthe goods receipt.
                                                                                                                                                                              INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                                                              The following field must be populated:

                                                                                                                                                                              • Number of the bill of lading (BILL_OF_LADING field)

                                                                                                                                                                              • The following tables and fields must not be populated:
                                                                                                                                                                                • Table SelectPo: PO_NUMBER (Document number of the PO document)

                                                                                                                                                                                • Table SelectDelivery: DELIVERY_NOTE (Number of the external delivery
                                                                                                                                                                                • note)
                                                                                                                                                                                  • Table SelectService: SHEET_NO (Service entry sheet number)

                                                                                                                                                                                  • Table SelectPlant: PLANT (Plant)
                                                                                                                                                                                  • Description
                                                                                                                                                                                    This structure contains the number of the external delivery note.
                                                                                                                                                                                    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                                                                    The following field must be populated:

                                                                                                                                                                                    • Number of the external delivery note (SELECT_DELIVERY field)

                                                                                                                                                                                    • The following tables and fields must not be populated:
                                                                                                                                                                                      • Table SelectPo: PO_NUMBER (Document number of the PO document)

                                                                                                                                                                                      • Table SelectBillLading: BILL_OF_LADING (Number of the bill of lading at
                                                                                                                                                                                      • the time of goods receipt)
                                                                                                                                                                                        • Table SelectService: SHEET_NO (Service entry sheet number)

                                                                                                                                                                                        • Table SelectPlant: PLANT (Plant)
                                                                                                                                                                                        • Description
                                                                                                                                                                                          You can use this table to additionally restrict the assignment to vendorto certain plants.
                                                                                                                                                                                          INCLUDE BAPI_DATAELEMENT

                                                                                                                                                                                          Description
                                                                                                                                                                                          This structure contains the document and item number of the purchasingdocument.
                                                                                                                                                                                          INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                                                                          The following field must be populated:

                                                                                                                                                                                          • Purchase order number / scheduling agreement (PO_NUMBER field)

                                                                                                                                                                                          • The following field can be populated:
                                                                                                                                                                                            • Item number of the purchasing document (PO_ITEM field)

                                                                                                                                                                                            • The following tables and fields must not be populated:
                                                                                                                                                                                              • Table SelectDelivery: DELIVERY_NOTE (Number of the external delivery
                                                                                                                                                                                              • note)
                                                                                                                                                                                                • Table SelectBillLading: BILL_OF_LADING (Number of the bill of lading at
                                                                                                                                                                                                • the time of goods receipt)
                                                                                                                                                                                                  • Table SelectService: SHEET_NO (Service entry sheet number)

                                                                                                                                                                                                  • Table SelectPlant: PLANT (Plant)
                                                                                                                                                                                                  • Description
                                                                                                                                                                                                    This structure contains the number of the service entry sheet.
                                                                                                                                                                                                    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                                                                                    The following field must be populated:

                                                                                                                                                                                                    • Number of the service entry sheet (SHEET_NO field)

                                                                                                                                                                                                    • The following tables and fields must not be populated:
                                                                                                                                                                                                      • Table SelectPo: PO_NUMBER (Document number of the PO document)

                                                                                                                                                                                                      • Table SelectDelivery: DELIVERY_NOTE (Number of the external delivery
                                                                                                                                                                                                      • note)
                                                                                                                                                                                                        • Table SelectBillLading: BILL_OF_LADING (Number of the bill of lading at
                                                                                                                                                                                                        • the time of goods receipt)
                                                                                                                                                                                                          • Table SelectPlant: PLANT (Plant)
                                                                                                                                                                                                          • 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
                                                                                                                                                                                                                This table transfers the data for the invoice if you want to distributethe gross amount among several vendor lines.
                                                                                                                                                                                                                INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
                                                                                                                                                                                                                You must populate the following fields:

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

                                                                                                                                                                                                                • You can populate the following fields:
                                                                                                                                                                                                                  • 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 vendor lines,then you must use the same grouping key for the amount split (SPLIT_KEY)as you use for withholding tax. You must enter the line numbers for thegrouping key in ascending order.

                                                                                                                                                                                                                    Description
                                                                                                                                                                                                                    With this table, you transfer the data for the withholding tax for theincoming invoice. This can be, for example, information for calculatingemployment tax or capital gains tax.
                                                                                                                                                                                                                    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 (field WI_TAX_TYPE)

                                                                                                                                                                                                                      • Withholding tax code (WI_TAX_CODE field)

                                                                                                                                                                                                                      • Withholding tax base amount (WI_TAX_BASE field)

                                                                                                                                                                                                                      • Withholding tax amount in doc. 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, then you must enterthe line numbers for the grouping key in ascending order.
                                                                                                                                                                                                                        If you want to distribute the withholding tax to several vendor lines,then you must use the same grouping key for the amount split (SPLIT_KEY)as you use for the withholding tax.
                                                                                                                                                                                                                        Wittholding 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 freed 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.

1432631BUS2081: Address data of incoming invoice
381593MIRO/MIR7/MIRA: Batch Input is not possible
459524BAPIs: Address data (customer data), different payee