Skip to Content

BAPI for MIRO Invoice Document Changes

Hi,

I have created the MIRO but later user said some changes related to MIRO Header.

Changes are:

Header text

Assignment

Reference No

Item Text

I have tried to call BAPI_INCOMINGINVOICE_CHANGE. But, I am getting error as 'MIRO Incoice blocked for processing'.

Please suggest any other bapi which we can use for MIRO(IR-L) document change.

Regards

Amol Khochare

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Apr 24, 2017 at 08:53 AM

    Hi,

    instead of trying to find another bapi, it would be more interesting to know why are you receiving message M8 560.

    Best regards,

    Pablo

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 24, 2017 at 09:33 AM

    Try to set a break-point in FM MRM_INT_INVOICE_LOCK or look with SM12 for table RBKP.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 24, 2017 at 12:20 PM

    Hi,

    We can achieve this by using these two function module. 1->BAPI_INCOMINGINVOICE_CHANGE and 2->BAPI_TRANSACTION_COMMIT.

    First of all we need to do it before post of that miro document or parked miro document . Pass this two FM import parameters And also need to pass the INVOICE_DOC_STATUS = 'A'.

    Thanks,

    Kaushik

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 02 at 05:58 AM
    Hi,
    These are the mandatory input fields to be passed into the BAPI to create Invoice number.  
    
    *HEADER VALUES
      WA_BAPI_INCINV_CREATE_HEADER-INVOICE_IND      = 'X'.
      WA_BAPI_INCINV_CREATE_HEADER-DOC_DATE         = Document Date 
      WA_BAPI_INCINV_CREATE_HEADER-COMP_CODE        = Company Code
      WA_BAPI_INCINV_CREATE_HEADER-CURRENCY         = Currency
      WA_BAPI_INCINV_CREATE_HEADER-CALC_TAX_IND     = 'X'.
    
    *ITEM VALUES
     WA_BAPI_INCINV_CREATE_HEADER-PSTNG_DATE        = Posting Date
     WA_BAPI_INCINV_CREATE_HEADER-REF_DOC_NO        = Reference
     WA_BAPI_INCINV_CREATE_ITEM-INVOICE_DOC_ITEM    = '0001'
     WA_BAPI_INCINV_CREATE_ITEM-PO_NUMBER           = Purchasing Doc.
     WA_BAPI_INCINV_CREATE_ITEM-PO_ITEM             = Item
     WA_BAPI_INCINV_CREATE_ITEM-REF_DOC             = Material Doc.
     WA_BAPI_INCINV_CREATE_ITEM-REF_DOC_YEAR        = Mat. Doc. Year
     WA_BAPI_INCINV_CREATE_ITEM-REF_DOC_IT          = '00001'.
     WA_BAPI_INCINV_CREATE_ITEM-TAX_CODE            = Tax code
     WA_BAPI_INCINV_CREATE_ITEM-ITEM_AMOUNT         = Amount
     WA_BAPI_INCINV_CREATE_ITEM-PO_UNIT             = Order Unit
     WA_BAPI_INCINV_CREATE_ITEM-QUANTITY            = PO Quantity
     WA_BAPI_INCINV_CREATE_HEADER-GROSS_AMOUNT      = Gross Amount.
    
    
      CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
       EXPORTING
         HEADERDATA                = WA_BAPI_INCINV_CREATE_HEADER
    *    ADDRESSDATA               =
       IMPORTING
         INVOICEDOCNUMBER          = WA_INVOICEDOCNUMBER
    *    FISCALYEAR                =
       TABLES
         ITEMDATA                  = IT_BAPI_INCINV_CREATE_ITEM[]
    *    ACCOUNTINGDATA            =
    *    GLACCOUNTDATA             =
    *    MATERIALDATA              =
    *    TAXDATA                   =
    *    WITHTAXDATA               =
    *    VENDORITEMSPLITDATA       =
         RETURN                    = IT_RETURN2[]
    *    EXTENSIONIN               =
    *    TM_ITEMDATA               =
               .
     CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       EXPORTING
         WAIT          = 'X'
    *  IMPORTING
    *    RETURN        =
               .
    
    
    Hope this helped you.
    
    
    Regards
    Niyas
    Add comment
    10|10000 characters needed characters exceeded