SAP Function BAPI_INCOMINGINVOICE_GETDETAIL - Invoice Verification: Display Incoming Invoice

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

Parameter Reference Type Length Text
ADDRESSDATA BAPI_INCINV_DETAIL_ADDRESSDATA u 516 Transfer Structure: Address Data Incoming Invoice (Create)
HEADERDATA BAPI_INCINV_DETAIL_HEADER u 554 Header Data in Incoming Invoice

Parameter Reference Length Optional Text
ACCOUNTINGDATA BAPI_INCINV_DETAIL_ACCOUNT 330 X Account Assignment Data in Invoice (Create)
EXTENSIONOUT BAPIPAREX 990 X Enhancement Fields (Export Parameters)
GLACCOUNTDATA BAPI_INCINV_DETAIL_GL_ACCOUNT 367 X G/L Account Posting: Incoming Invoice (GetDetail)
ITEMDATA BAPI_INCINV_DETAIL_ITEM 254 Item Data in Invoice
MATERIALDATA BAPI_INCINV_DETAIL_MATERIAL 163 X Material Account Posting: Incoming Invoice (GetDetail
RETURN BAPIRET2 548 Return Messages
TAXDATA BAPI_INCINV_DETAIL_TAX 38 X Tax Information in Invoice (GetDetail)
TMDATA BAPI_TM_DATA 461 X Transfer Table for Data from Transportation Management
VENDORITEMSPLITDATA BAPI_INCINV_DETAIL_VENDORSPLIT 27 X Transfer Structure: Vendor Split Incoming Invoice (GetDetail
WITHTAXDATA BAPI_INCINV_DETAIL_WITHTAX 46 X Transfer Structure: Withholding Tax Data (GetDetail)

Functionality
You can use this method to display detail data from an incoming invoice.

Notes
The following authorization object is checked with activity 03:
M_RECH_WRKPlant authorization for entering incominginvoices

Input parameters
The key fields of the incoming invoice (InvoiceDocNumber and
FiscalYear) must be transferred to the method as import parameters.

Output parameters
The header data for the incoming invoice is returned in the
HeaderData structure.
The AddressData structure contains the address data of a one-timevendor or a different payee.
The data for the individual invoice items is exported in the
ItemData and AccoutingData tables. The TaxData tablecontains the tax information in the invoice.
The GlAccountData table contains data for posting to a G/Laccount and the MaterialData table contains the data for postingto a material account.
The WithTaxData table is used to return the withholding taxinformation.
The VendorItemSplitData table contains data if you distribute thegross amount across several vendor lines with different payment methodsand terms of payment
IF &[SWITCH]MM_SFWS_TM& = 'X'.
The BAPI_TM_DATA table allows you to transfer data from documents thatcome from an external transport management system to the correspondingincoming invoice document or to the relevant invoice item.
ENDIF.

Return messages
INCLUDE BAPI_RET OBJECT DOKU ID TX LANGUAGE EN

Further information
The method can only perform its function if no error messages weregenerated in the Return table. This is the case if it waspossible to process the header data and all items without errors.
For more information, see the following parameter documentation:AddressData,ItemData,GlAccountData,MaterialData,WithTaxData, andVendorItemSplitData.
Further information is available in the methodCreateFromData with the parameters
HeaderData andAddressData.
and in the SAP library under Logistics Invoice Verification.

Meaning
In structure AddressData, the address data of a one-time vendoror a different payee is returned.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN

Description
The invoice header data is passed on in the structure Headerdata
.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN

Description
INCLUDE BAPI_KEYFIELD OBJECT DOKU ID TX LANGUAGE EN

Description
INCLUDE BAPI_KEYFIELD OBJECT DOKU ID TX LANGUAGE EN

Description
The table contains the account assignment data for the invoice items.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN

Description
This table enables you to add export parameters to the BAPI withoutmodifications.

Description
The table contains the data for posting to G/L accounts.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN

Default

Description
The table contains the item data of the incoming invoice.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN

Description
The table contains the data for posting to the material account.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN

Description
INCLUDE BAPI_TABLE OBJECT DOKU ID TX LANGUAGE EN

Value range
Type,,ID,,Number,,Message
E,,M8,,184,,Invoice document & & does not exist
E,,M8,,063,,Document does not contain any items
Other possible messages
Messages from other function modules or programs can also appear.

Default

Description
The table contains the tax information for the invoice.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN

Description
This parameter allows you to transfer data from documents that originatefrom SAP TM to the corresponding incoming invoice document or to therelevant invoice item.

Description
The table contains the data in the case of creditor split in an incominginvoice.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN

Description
The table contains the withholding tax data.
INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN

1528384MRM_BAPI: Separation of corrections for TM integration
1528385MRM_BAPI: Separation of corrections for TM integration
1075141BAPIs valid for usage with AFS6.0
381593MIRO/MIR7/MIRA: Batch Input is not possible
815385Supplier Portal Open Invoice Check doesn check for vendor
690856MIR4/MIR6: Performance for document display II
606234BAPI:Amount display incorrect with multiple account assignmt
549921BAPI GetDetail: Incomplete address data (CPD)
515203BAPI: GetDetail displays no account assignment values