Fonction SAP BAPI_INCOMINGINVOICE_COMPLAIN - Invoice Verification: Display Letter of Complaint

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
FISCALYEAR BAPI_INCINV_FLD-FISC_YEAR N 4 Fiscal Year
INVOICEDOCNUMBER BAPI_INCINV_FLD-INV_DOC_NO C 10 Invoice Document Number

Paramètre Reférence Type Long. Description
ADDRESSDATA BAPI_INCINV_COMPLAIN_ADDRESS u 426 Transfer Structure for Incoming Invoice Address Data (Complaint)
HEADERDATA BAPI_INCINV_COMPLAIN_HEADER u 705 Transfer Struc.: Header Data in Incoming Invoice (Complaint)

Paramètre Reférence Long. Facultatif Description
EXTENSIONOUT BAPIPAREX 990 X Reference Structure for BAPI Parameters ExtensionIn/ExtensionOut
ITEMDATA BAPI_INCINV_COMPLAIN_ITEM 549 Item Data for Invoice Reduction (Complaint)
RETURN BAPIRET2 548 Return Messages
TAXDATA BAPI_INCINV_COMPLAIN_TAX 53 Tax Information for Invoice Reduction (Complaint)

Functionality
You can use this method to display complaints data for a reducedincoming invoice.
For automatically reduced invoices, only the invoice header is displayedwith the reduction amount at header level. For reduced invoice items,the invoice header and the reduced items are displayed.
The data displayed is the same as the data of a complaints letter inlogistics invoice verification.

Notes
The following authorization object is checked for all reduced invoiceitems with activity 03:
M_RECH_WRK Plant authorization for enteringincoming invoices
In Customizing for Logistics Invoice Verification, message types REKLand REK6 are defined for automatic printing of complaints letters andsending of IDocs in case of an invoice reduction. BAPI COMPLAIN can becalled for any reduced invoice, whether or not a message record ofmessage type REKL or REK6 exists for it. BAPI COMPLAIN does not changethe status of the message record. The message record is only updated bythe Output Messages function in Logistics Invoice Verification(transaction MR90) - for example, set to Processed Successfully.

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 of the incoming invoice is returned in structureHeaderdata.
The Addressdata structure contains the address data and tax number(s) ofthe vendor.
The data for individual reduced invoice items is exported to tableItemdata. The Taxdata table contains the tax information for theinvoice reduction.

Return messages
INCLUDE BAPI_RET OBJECT DOKU ID TX LANGUAGE EN

Further information
This method can only perform its function if no error messages aregenerated in table Return. This is the case if both the header data andall the reduced items can be processed correctly.
For more information, see the parameter documentation and SAP LibraryLogistics Invoice Verification.

Description
In the address data structure, the address data and the tax number(s) ofthe vendor are transferred.

Description
In the Headerdata structure, the header data of the reducedincoming invoice is transferred.
The data of the invoice verification clerk is transferred In thefollowing fields:

  • FIRSTNAME

  • LASTNAME

  • TITLE_ACA1

  • TEL1_NUMBR

  • TEL1_EXT

  • FAX_NUMBER

  • FAX_EXTENS

  • E_MAIL

  • In case of an automatically reduced invoice, the reduction amount isdisplayed.
    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
    INCLUDE BAPI_KEYFIELD OBJECT DOKU ID TX LANGUAGE EN
    INCLUDE BAPI_KEYFIELD OBJECT DOKU ID TX LANGUAGE EN
    Enhancement fields (export parameters)

    Description
    The Extensionout table enables you to add export parameters to the BAPIwithout modifications.

    Description
    Table Itemdata contains the data of the reduced invoice items, if theinvoice has been reduced manually.
    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,,000,,You do not have authorization for plant &1 and activity &2
    E,,M8,,184,,Invoice document &1 &2 does not exist
    I,,M8,,679,,There are no reduced items for invoice &1 &2
    Other possible messages
    Messages from other function modules or programs may occur.

    Default

    Description
    Table Taxdata contains the tax information of the invoice reductiondocument. This is the excess tax that you have paid to the vendor.
    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN