Fonction SAP BAPI_INCOMINGINVOICE_CANCEL - Invoice Verification: Reverse Invoice

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
POSTINGDATE BAPI_INCINV_FLD-PSTNG_DATE D 8 X Reversal Document Posting Date
REASONREVERSAL BAPI_INCINV_FLD-REASON_REV C 2 Reversal Reason

Paramètre Reférence Type Long. Description
FISCALYEAR_REVERSAL BAPI_INCINV_FLD-FISC_YEAR N 4 Fiscal Year of Reversal Document
INVOICEDOCNUMBER_REVERSAL BAPI_INCINV_FLD-INV_DOC_NO C 10 Reversal Document Number

Paramètre Reférence Long. Facultatif Description
RETURN BAPIRET2 548 Return Messages

Functionality
With this method, you can create a reversal document by entering theoriginal document.

Notes
The system checks the following authorization object with activity 01:

  • M_RECH_WRK Plant Authorization for Entering
  • Invoices
    Transfer
    You have to pass on to the method the key fields of the invoice(InvoiceDocNumber and FiscalYear) and the reversal reason as importparameters. You have the option of entering the posting date for thereversal.
    Return
    The document number and the document year of the reversal document arereturned in the export parameters InvoiceDocNumber andFiscalYear.
    Return messages
    INCLUDE BAPI_RETURN

    Further information
    The methods can only perform their function if no error messages arecreated in the Return table. This is the case if the system wasable to process the header data and all items without any errors.
    No transaction control is implemented. That means that the caller has toperform the 'Commit Work' itself after successfully invoking this method(that is, if no errors are reported to the caller in the Returnparameter).

    Description
    The parameter returns the fiscal year of the reversal document.
    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
    Fiscal year of reversal document

    Description
    The export parameter returns the reversal document number.
    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
    Reversal document number

    Description
    INCLUDE BAPI_KEYFIELD

    Description
    INCLUDE BAPI_KEYFIELD

    Description
    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
    Reversal document posting date

    Description
    INCLUDE BAPI_DATAELEMENT OBJECT DOKU ID TX LANGUAGE EN
    Reversal reason

    Description
    INCLUDE BAPI_TABLE OBJECT DOKU ID TX LANGUAGE EN

    Value range
    Type,,ID,,Number,,Message
    E,,M8,,022,,Allowed posting periods: <(>&<)>
    E,,M8,,063,,Document does not contain any items
    E,,M8,,209,,You have no authorization to enter an
    ,,,,,,incoming invoice in plant <(>&<)>
    E,,M8,,184,,Invoice document <(>&<)>1 <(>&<)>2 does not exist
    E,,M8,,243,,Document <(>&<)> cannot be cancelled
    E,,M8,,351,,Document already cancelled with document <(>&<)>1
    ,,,,,,(fiscal year <(>&<)>2)
    Other possible messages
    Messages from other function modules or programs could also appear,such as:
    Type,,ID,,Number,,Message
    E,,F0,,601,,State reason for reversal
    E,,F0,,602,,Reversal reason <(>&<)> is not defined. This must be
    ,,,,,,changed
    E,,F5,,745,,Reversal reason <(>&<)>1 only permits posting date
    ,,,,,,<(>&<)>2
    A,,F5,,802,,Document <(>&<)> <(>&<)> <(>&<)> already contains cleared
    ,,,,,,items - reversal not possible

381593MIRO/MIR7/MIRA: Batch Input is not possible
448196Problems with bapi_incominginvoice_cancel