Skip to Content
avatar image
Former Member

HOW TO USE BAPI_INCOMINGINVOICE_PARK

HI ALL;

I WANT TO USE BAPI_INCOMINGINVOICE_PARK FOR T-CODE MIR7.

IS THERE ANY BODY COULD GIVE SOME EXAMPLES ? THANKS A LOT.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Nov 16, 2007 at 08:02 AM

    Hi,

    Check the below links

    upload-program

    bapi-to-park-the-invoice-document

    Reward if helpful.

    Regards,

    Nagaraj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 16, 2007 at 08:05 AM

    Hi

    BAPI_INCOMINGINVOICE_PARK

    Invoice Verification: Park Invoice

    FUNCTIONALITY&


    You can use this method to park incoming invoices.

    When header data is transferred, you use the field INVOICE_IND to determine whether the system generates a credit memo or an invoice. If the field remains blank, the system generates a credit memo. If you enter X, the system generates an invoice.

    You use this method if information on posting an invoice document is missing in the invoice document; the balance can be a value other than zero. As in the online transaction, the following updates take place, for example informative PO history, advance tax return, index for check on duplicate invoices, open vendor items from parked documents, log of document changes.

    You can use this method to



    park invoices with multiple account assignment
    change and park account assignments for invoices
    park invoices for blanket purchase orders (see also the documentation for the function module BAPI_INCOMINGINVOICE_CREATE)
    park invoices for purchase orders with planned delivery costs
    park invoices with unplanned delivery costs
    park subsequent credits and debits
    use document types with external number assignment
    park invoices with withholding tax
    park invoices with several vendor line items and different methods of payment and terms of payment
    park invoices for purchase orders for external services
    park invoices with G/L account postings
    park invoices with material account postings
    park invoices for a one-time vendor
    park invoices with a different payee
    Restrictions

    You cannot



    post invoices for return POs
    The following FI fields are not transferred:

    POR subscriber number
    Bank details
    Payment reference
    Short key for house bank account
    Service indicator

    Notes


    The following authorization object is checked with activity 77:

    M_RECH_WRK Plant authorization for entering incoming invoices
    Transfer

    You transfer the header data of the incoming invoice using structure HeaderData.

    The tables ItemData and AccountingData contain the item data of the incoming invoice. Table TaxData contains the tax information for the incoming invoice.

    The table GlAccountData contains data for posting to G/L accounts, and the MaterialData contains data for posting to material accounts.

    You can use table WithTaxData to transfer withholding tax information.

    You can use table VendorItemSplitData to distribute the gross amount among several vendor line items with different payment methods and terms of payment.

    Return



    The document number of the invoice document and the fiscal year are returned as key fields of the incoming invoice.

    Message returns



    Messages are returned in the Return parameter. The parameter documentation shows the return codes and their meanings.

    Further information


    The method can only carry out your function if no error messages were generated in the Return table. This is the case if the header data and all the items were processed successfully.

    Transaction control is not implemented. The calling program therefore has to execute the Commit Work itself after this method has been successfully called (in other words, if no errors were reported in the Return parameter).

    Example: Incoming Invoice


    This example shows which header data you can park in table HeaderData and which item data you can park in table ItemData.

    Purchase order: 10 pieces of material A at 10 USD
    Goods receipt: 10 pieces of material A

    For this purchase order, you receive an incoming invoice with reference to PO number 4500007491, PO item 10, for a quantity of 10 pieces of material A and an amount of 116 USD incl. 16% tax. You enter the following data:

    HeaderData table



    INVOICE_IND (invoice/credit memo): X
    DOC_DATE (document date): 20.05.2000
    PSTNG_DATE (posting date): 23.05.2000
    COMP_CODE (company code): 1000
    GROSS_AMOUNT (gross amount): 116.00
    CURRENCY (currency key): USD
    CALC_TAX_IND (calculate tax): X
    ItemData table

    INVOICE_DOC_ITEM (item of the invoice document): 00001
    PO_NUMBER (PO number): 4500007491
    PO_ITEM (PO item): 00010
    TAX_CODE (tax code): VN
    ITEM_AMOUNT (item amount): 100
    QUANTITY (quantity): 10
    PO_UNIT (unit of measure): PC
    For further information, see the parameter documentation for tables HeaderData and ItemData.

    Example: Incoming invoice with foreign currency, GR-based invoice verification, and tax information
    This example shows which header data you enter in table HeaderData, which item data you enter in table ItemData and which tax information you enter in table TaxData to be able to park an incoming invoice in a foreign currency.

    Purchase order: 10 pieces of material A at 10 USD
    Goods receipt 1: 4 pieces of material A
    Goods receipt 2: 6 pieces of material A

    For this purchase order, you receive an incoming invoice with reference to PO number 4500007505, PO item 10, goods receipt document 50010095, 2000, item 1. A quantity of 4 pieces of material A and a gross amount of 46.60 USD and 16% tax (6.60 USD) is invoiced. You enter the following data:

    HeaderData table



    INVOICE_IND (invoice/credit memo): X
    DOC_DATE (document date): 20.05.2000
    PSTNG_DATE (posting date): 23.05.2000
    COMP_CODE (company code): 1000
    CURRENCY (currency key): USD
    GROSS_AMOUNT (gross amount): 46.60
    ItemData table

    INVOICE_DOC_ITEM (item of invoice document): 00001
    PO_NUMBER (PO number): 4500007505
    PO_ITEM (PO item): 00010
    REF_DOC (goods receipt document): 50010095
    REF_DOC_YEAR (fiscal year of current period): 2000
    REF_DOC_ITEM (item of GR document): 1
    TAX_CODE (tax code): VN
    ITEM_AMOUNT (item amount): 40.00
    QUANTITY (quantity): 4
    PO_UNIT (unit of measure): PC
    TaxData table

    TAX_CODE (sales tax code): VN
    TAX_AMOUNT (tax amount in document currency): 6.60
    For further information, see the parameter documentation for tables HeaderData, ItemData and TaxData.

    Example: Change existing account assignments and add new ones
    This example shows which header data you enter in table HeaderData, which item data you enter in table ItemData and which account assignment data you enter in table AccountingData to be able to change account assignments for an incoming invoice. To be able to change account assignments, a non-valuated goods receipt or no goods receipt must exist. GR-based invoice verification takes place.

    Purchase order: 300 pieces of material A at 1.00 USD
    Goods receipt: 300 pieces of material A

    For this PO with multiple account assignment, you receive an incoming invoice with reference to PO number 4500006846, PO item 10, goods receipt document 50008849, 2000, item. A quantity of 100 pieces of material A and a gross amount of 116.00 USD incl. 16% tax is invoiced. You want to change the planned account assignment for the second account assignment item and add an unplanned account assignment. You enter the following data:

    HeaderData table

    INVOICE_IND (invoice/credit memo): X
    DOC_DATE (document date): 05.08.2000
    PSTNG_DATE (posting date): 08.08.2000
    COMP_CODE (company code): 1000
    CURRENCY (currency key): USD
    GROSS_AMOUNT (gross amount): 17,40
    CALC_TAX_IND (calculate tax automatically): X
    PMNTTRMS (terms of payment key): 0001
    ItemData table

    INVOICE_DOC_ITEM (invoice document item): 00001
    PO_NUMBER (PO number): 4500006846
    PO_ITEM (PO item): 00010
    REF_DOC (goods receipt document): 500008849
    REF_DOC_YEAR (fiscal year of current period): 2000
    REF_DOC_ITEM (item of goods receipt document): 1
    TAX_CODE (tax code): VN
    ITEM_AMOUNT (item amount): 100
    QUANTITY (quantity): 100
    PO_UNIT (unit of measure): PC
    AccountingData table

    Line 1: Change second account assignment item

    INVOICE_DOC_ITEM (Document item in invoice document): 0001
    SERIAL_NO (sequence number for account assignment): 02
    TAX_CODE (tax code): VN
    ITEM_AMOUNT (amount in document currency): 10.00
    QUANTITY (quantity): 10
    PO_UNIT (order unit): PC
    GL_ACCOUNT (number of G/L account): 890000
    COSTCENTER (cost center): 1200
    Line 2: Add unplanned account assignment

    INVOICE_DOC_ITEM (document item in invoice document): 0001
    XUNPL (unplanned account assignment from invoice verification): X
    TAX_CODE (tax code): VN
    ITEM_AMOUNT (amount in document currency): 5.00
    QUANTITY (quantity): 5
    PO_UNIT (order unit): PC
    GL_ACCOUNT (number of G/L account): 890000
    COSTCENTER (cost center): 1200
    For further information, see the parameter documentation for tables HeaderData, ItemData and AccountingData or the Logistics Invoice Verification section of the SAP Library.

    Example: Incoming invoice with planned delivery costs
    This example shows which header data you enter in table HeaderData, which item data you enter in table ItemData and which tax information you enter in table TaxData to be able to generate incoming invoices with planned delivery costs.

    Purchase order: 100 pieces of material A at 1.00 USD
    Goods receipt: 100 pieces of material A

    For this purchase order, you receive an incoming invoice with reference to PO number 4500006986, PO item 10, for a quantity of 100 pieces of material A and an amount of 136.00 USD incl. 16% tax and 20.00 planned delivery costs. You enter the following data:

    HeaderData table

    INVOICE_IND (invoice/credit memo): X
    DOC_DATE (document date): 10.08.2000
    PSTNG_DATE (posting date): 12.08.2000
    COMP_CODE (company code): 1000
    CURRENCY (currency key): USD
    GROSS_AMOUNT (gross amount): 136.00
    ItemData table

    Line 1: Enter PO item

    INVOICE_DOC_ITEM (item of invoice document): 00001
    PO_NUMBER (PO number): 4500006986
    PO_ITEM (PO item): 00010
    TAX_CODE (sales tax code): VN
    ITEM_AMOUNT (item amount): 100.00
    QUANTITY (quantity): 100
    PO_UNIT (unit of measure): PC
    Line 2: Enter planned delivery costs

    INVOICE_DOC_ITEM (item of invoice document): 00002
    PO_NUMBER (PO number): 4500006986
    PO_ITEM (PO item): 00010
    ITEM_AMOUNT (item amount): 20.00
    QUANTITY (quantity): 100
    PO_UNIT (unit of measure): PC
    COND_TYPE (condition type): FRB1
    TaxData table

    TAX_CODE (sales tax code): VN
    TAX_AMOUNT (tax amount in document currency): 16.00
    For further information, see the parameter documentation for tables HeaderData, ItemData and TaxData.

    Example: Incoming invoice with withholding tax
    This example shows which header data you enter in table HeaderData, which item data you enter in table Itemdata and which withholding tax information you enter in table WithTaxData to be able to park an incoming invoice with withholding tax.

    Purchase order: 10 pieces of material A at 10.00 USD

    Goods receipt: 10 pieces of material A

    For this purchase order, you receive an incoming invoice with reference to PO number 4500007505, PO item 10, goods receipt document 50010095, 2000, item 1. A quantity of 10 pieces and a gross amount of 100.00 USD is invoiced. For the gross amount, you must pay 10% withholding tax. You enter the following data:

    HeaderData table

    INVOICE_IND (invoice/credit memo): X
    DOC_DATE (document date): 20.05.2000
    PSTNG_DATE (posting date): 23.05.2000
    COMP_CODE (company code): WT01
    CURRENCY (currency key): USD
    GROSS_AMOUNT (gross amount): 100.00
    ItemData table

    INVOICE_DOC_ITEM (item of invoice document): 00001
    PO_NUMBER (PO number): 4500007505
    PO_ITEM (PO item): 00010
    REF_DOC (goods receipt document): 50010095
    REF_DOC_YEAR (fiscal year of the current period): 2000
    REF_DOC_ITEM (item of a goods receipt document): 1
    TAX_CODE (tax code): V0
    ITEM_AMOUNT (item amount): 100.00
    QUANTITY (quantity): 10.00
    PO_UNIT (unit of measure): PC
    WithTaxData table

    SPLIT_KEY (grouping key for splitting withholding tax): 0001
    WI_TAX_TYPE (indicator for withholding tax type): R1
    WI_TAX_CODE (withholding tax code): 01
    WI_TAX_BASE (withholding tax base amount): 100
    WI_TAX_AMT (withholding tax amount in document currency): 10.00
    For further information, see the parameter documentation for tables HeaderData, ItemData and WithTaxData.

    Example: Incoming invoice with amount split
    This example shows which header data you enter in table HeaderData, which item data you enter in table Itemdata and which information you enter in VendorItemSplitData to generate an incoming invoice with amount split.

    Purchase order: 10 pieces of material A at 10.00 USD

    Goods receipt: 10 pieces of material A

    For this purchase order, you receive an incoming invoice with reference to PO number 4500007505, PO item 10, goods receipt document 50010095, 2000, item 1. A quantity of 10 pieces and a gross amount of 100.00 USD is invoiced. You want to split the gross amount among two vendor line items. 40% of the gross amount is to be paid immediately by check, and 60% of the gross amount is to be paid within 14 days, taking advantage of a 3% discount. You enter the following data:

    HeaderData table

    INVOICE_IND (invoice/credit memo): X
    DOC_DATE (document date): 20.05.2000
    PSTNG_DATE (posting date): 23.05.2000
    COMP_CODE (company code): 0001
    CURRENCY (currency key): USD
    GROSS_AMOUNT (gross amount): 100.00
    ItemData table

    INVOICE_DOC_ITEM (item of invoice document): 00001
    PO_NUMBER (PO number): 4500007505
    PO_ITEM (PO item): 00010
    REF_DOC (goods receipt document): 50010095
    REF_DOC_YEAR (fiscal year of current period): 2000
    REF_DOC_ITEM (item of a goods receipt document): 1
    TAX_CODE (tax code): V0
    ITEM_AMOUNT (item amount): 100.00
    QUANTITY (quantity): 10.00
    PO_UNIT (unit of measure): PC
    VendorItemSplitData table

    Vendor line 1

    SPLIT_KEY (grouping key for splitting vendor line): 0001
    SPLIT_AMOUNT(partial invoice amount in document currency): 40.00
    PYMT_METH (payment method): S
    TAX_CODE (sales tax code): V0
    PMNTTRMS (terms of payment key): 0001
    Vendor line 2

    SPLIT_KEY (grouping key for splitting vendor line): 0002
    SPLIT_AMOUNT (partial invoice amount in document currency): 60.00
    PYMT_METH (payment method): U
    TAX_CODE (sales tax code): V0
    PMNTTRMS (terms of payment key): 0003
    For further information, see the parameter documentation for tables HeaderData, ItemData and VendorItemSplitData.

    Example: Incoming invoice with G/L and material account posting.
    This example shows you, which header data you need to enter in the HeaderData table, which item data you enter in the ItemData table, which G/L account information you enter in the GlAccountData table, and which material account information you enter in the MateralData table in order to park an incoming invoice.

    You receive an invoice with reference to PO number 4500006846, PO item 10. The invoice is for a quantity of 100 PC of material A, and a gross amount of 150.80 USD including 16% tax. This includes a G/L account posting of 10 USD to account 400000 in company code 1, and a material account posting to material MAT01n for 20 USD.

    Enter the following data:

    Table HeaderData

    INVOICE_IND (Post invoice/credit memo): X
    DOC_DATE (Document date): 08.05.2000 PSTNG_DATE (Posting date):
    PSTNG_DATE (Posting date): 08.08.2000
    COMP_CODE (Company code): 1000
    CURRENCY (Currency key): USD
    GROSS_AMOUNT (Gross amount): 150.80 CALC_TAX_IND (Automatically
    CALC_TAX_IND (Automatically calculate tax): X
    PMNTTRMS (Terms of payment key): 0001
    Table ItemData INVOICE_DOC_ITEM (Item in invoice document):

    INVOICE_DOC_ITEM (Item in invoice document): 00001
    PO_NUMBER (PO number): 4500006846
    PO_ITEM (PO item): 00010
    TAX_CODE (Tax code): VN
    ITEM_AMOUNT (Item amount): 100
    QUANTITY (Quantity): 100
    PO_UNIT (Unit of measure): PC
    Table GlAccountData

    INVOICE_DOC_ITEM (Document item in invoice document): 00001
    GL_ACCOUNT (G/L account): 400000
    ITEM_AMOUNT (Item amount): 10.00
    DB_CR_IND (Debit/credit indicator): S
    COMP_CODE (Company code): 0001
    TAX_CODE (Tax code): VN
    COSTCENTER (Cost center): 1
    Table MaterialData

    INVOICE_DOC_ITEM (Document item in invoice document): 0001
    MATERIAL (Material): MAT01
    PLANT (Valuation area): 0001
    DB_CR_INP (Debit/credit indicator): S
    ITEM_AMOUNT (Item data): 10.00
    QUANTITY (MENGE_D): 1
    PO_UNIT (PO unit of measure): PC
    TAX_CODE (Tax code): VN

    For more information, see the parameter documentation for the tables HeaderData, ItemData, GlAccountData and MaterialData


    Example: Incoming invoice for a purchase order for external services and servie-based invoice verification
    This example shows you which header data you need to enter in table HeaderData, which item data in table ItemData, and which accout assignment data you enter in table AccountingData in order to enter and post an incoming invoice.

    You receive an invoice with reference to PO number 4500000191, PO item 10. The invoice is for two services A and B, each with a quantity of six service units. Service A has a gross amount of 580 USD including 16% tax. Service B has 812 USD including 16% tax. 50% of service A was assigned to each of the cost centers 1000 and 2000. 50% of service B was assigned to each of the cost centers 1000 and 3000. The service acceptance is performed jointly for both services with the service entry sheet number 1000000022. The account assignments cannot be changed.

    Enter the following data:

    Table HeaderData

    INVOICE_IND (Post invoice/credit memo): X
    DOC_TYPE (Document type): RE
    DOC_DATE (Document date): 01.10.2002
    PSTNG_DATE (Posting date): 01.10.2002
    COMP_CODE (Company code): 0001
    CURRENCY (Currency key): USD
    GROSS_AMOUNT (Gross amount): 1392.00
    CALC_TAX_IND (Calculate tax automatically): X
    PMNTTRMS (Terms of payment key): 0001
    Table ItemData

    First entry for service A:

    INVOICE_DOC_ITEM (Item in invoice document): 000001
    PO_NUMBER (PO number): 4500000191
    PO_ITEM (PO item): 00010
    TAX_CODE (Tax code): V1
    ITEM_AMOUNT (Item amount): 250.0
    QUANTITY (Quantity): 3
    PO_UNIT (Unit of measure): SU
    SHEET_NO (Entry sheet number): 1000000022
    SHEET_ITEM (Line number) : 10
    Second entry for service A:

    INVOICE_DOC_ITEM (Item in invoice document): 000002
    PO_NUMBER (PO number): 4500000191
    PO_ITEM (PO item): 00010
    TAX_CODE (Tax code): V1
    ITEM_AMOUNT (Item amount): 250.00
    QUANTITY (Quantity): 3
    PO_UNIT (Unit of measure): SU
    SHEET_NO (Entry sheet number): 1000000022
    SHEET_ITEM (Line number) : 10
    First entry for service B:

    INVOICE_DOC_ITEM (Item in invoice document): 000003
    PO_NUMBER (PO number): 4500000191
    PO_ITEM (PO item): 00010
    TAX_CODE (Tax code): V1
    ITEM_AMOUNT (Item amount): 350.0
    QUANTITY (Quantity): 3
    PO_UNIT (Unit of measure): SU
    SHEET_NO (Entry sheet number): 1000000022
    SHEET_ITEM (Line number) : 20
    Second entry for service B:

    INVOICE_DOC_ITEM (Item in invoice document): 000004
    PO_NUMBER (PO number): 4500000191
    PO_ITEM (PO item): 00010
    TAX_CODE (Tax code): V1
    ITEM_AMOUNT (Item amount): 350.00
    QUANTITY (Quantity): 3
    PO_UNIT (Unit of measure): SU
    SHEET_NO (Entry sheet number): 1000000022
    SHEET_ITEM (Line number) : 20

    Table AccountingData

    First account assignment for service A:

    INVOICE_DOC_ITEM (Document item in invoice document): 000001
    SERIAL_NO (Sequential number of the account assignment): 01
    TAX_CODE (Tax code): V1
    ITEM_AMOUNT (Amount in document currency): 250.00
    QUANTITY (Quantity): 3
    PO_UNIT (PO unit of measure): SU
    Second account assignment for service A:

    INVOICE_DOC_ITEM (Document item in invoice document): 000002
    SERIAL_NO (Sequential number of the account assignment): 02
    TAX_CODE (Tax code): V1
    ITEM_AMOUNT (Amount in document currency): 250.00
    QUANTITY (Quantity): 3
    PO_UNIT (PO unit of measure): SU
    First account assignment for service B:

    INVOICE_DOC_ITEM (Document item in invoice document): 000003
    SERIAL_NO (Sequential number of the account assignment): 01
    TAX_CODE (Tax code): V1
    ITEM_AMOUNT (Amount in document currency): 350.00
    QUANTITY (Quantity): 3
    PO_UNIT (PO unit of measure): SU
    Second account assignment for service B:

    INVOICE_DOC_ITEM (Document item in invoice document): 000004
    SERIAL_NO (Sequential number of the account assignment): 03
    TAX_CODE (Tax code): V1
    ITEM_AMOUNT (Amount in document currency): 350.00
    QUANTITY (Quantity): 3
    PO_UNIT (PO unit of measure): SU

    For more information, see the parameter documentation for the tables HeaderData, ItemData, and AccountingData, or in the SAP Library under Logistics Invoice Verification.


    Example: Incoming invoice for a one-time vendor
    This example shows you how to proceed in order to enter and post an invoice for a one-time vendor.

    You do not need to enter data into the AddressData table. If you do not enter any data into table AddressData, the address data for the one-time vendor is copied 1:1 from the purchase order into the invoice.


    If you use table AddressData for the data transfer, the address data for the one-time vendor is read from the purchase order into the invoice, and is then overwritten or added to by the fields in the AddressData table.


    The purchase order for the one-time vendor shows the name 'SAP AG', postal code '60000', and the street and building number 'Neurottstraße 16'. You receive an invoice with the one-time vendor address as follows: Name 'SAP AG', postal code '69190', and city 'Walldorf'.

    Enter the following data:


    Table AddressData

    ACC_1_TIME (Indicator one-time vendor): X

    NAME (Name): SAP AG

    POSTL_CODE (Postal code): 69190

    CITY (City): Walldorf


    The invoice is posted with the following one-time vendor address data: Name 'SAP AG', street and building number 'Neurottstraße 16', postal code '69190', city 'Walldorf'.


    For more information, see the parameter documentation for the table AddressData.


    Example: Incoming invoice for a different payee
    This example shows you which address data you need to enter in table AddressData in order to enter and post an invoice for a different payee.


    You receive an invoice for the different payee with the name 'SAP AG', postal code '69190', city 'Walldorf', bank number '38070724', and account number '4711'.

    Enter the following data:


    Table AddressData

    ACC_1_TIME (Indicator one-time vendor): ' '

    NAME (Name): SAP AG

    POSTL_CODE (Postal code): 69190

    CITY (City): Walldorf

    BANK_NO (Bank number): 38070724

    BANK_ACCT (Bank account number): 4711


    For more information, see the parameter documentation for the table AddressData.

    Reward if usefull

    Add comment
    10|10000 characters needed characters exceeded