Bapi incoming invoice

Hi,
Invoice verification bapi BAPI_INCOMINGINVOICE_CREATE is not checking duplicates,Also MRM_DUPLICATE_INVOICE_CHECK fm
throws the error message straight away.As i am calling this bapi to upload a batch of invoices and i want duplicate error message to be collected.Also what is the best place to call duplicate check ??
Regards,
Tess

Hi,
You can  check whether the invoice has been processed via FM. IDOC_INPUT_BBP_IV in R3 system.
If the invoice has been processed via FM IDOC_INPUT_BBP_IV, then you can check which user-exits can be used for duplicate invoice check within FG BBPI.
In standard BAPI processes system can't support the functionality for
duplicate invoice check. Thanking you

Similar Messages

  • Bapi incoming invoice not checking the tolerance keys

    Hi,
       I  am using bapi BAPI_INCOMINGINVOICE_CREATE to post an invoice.Does it cover the tolerance check.
    If it doesnt check all the tolerance keys  lthen is there any other function module which can be used?
    Any one ??Plz help.

    Hi,
    put a break-point in these fm´s:
    FI_TOLERANCES_CHECK
    MRM_TOLERANCE_CHECK
    and execute the bapi.
    Best regards.

  • Error in BAPI while creating incoming invoice

    Hi Experts,
    Im creating incoming invoice by using the BAPI,  'BAPI_INCOMINGINVOICE_CREATE'.
    when im going to posting my invoice it is showing the error like 'EDI: Error in customizing for differential invoicing'.it is a urgent requirement and need to solve this ASAP.Pls help me out with this error
    Im passing following parameters to BAPI:
    wa_header-invoice_ind = 'X'.
    wa_header-doc_date   =  sy-datum.   "Enter the document date
    wa_header-pstng_date = sy-datum .   "Enter the posting date
    * wa_header-ref_doc_no = '5000008590'.
    wa_header-comp_code = '1000'.
    *wa_header-gross_amount = '50.11'.  "Enter the gross amount(aft. tax) for the invoice
    *wa_header-calc_tax_ind = 'X'.
      wa_header-currency = 'INR'.
      wa_header-INV_TRAN = 'X'.
      wa_header-SIMULATION = 'X'.
    wa_item-invoice_doc_item = '000001'.
    wa_item-po_number = '3700000557'.    "Enter the PO number
    wa_item-po_item = '00010'.           "Enter the PO item number
    * wa_item-ref_doc = '5000008590'.      "Enter the GR number
    * wa_item-ref_doc_year = '2014'.       "Enter the GR fiscal year
    * wa_item-ref_doc_it = '0001'.         "Enter the GR item number
    * wa_item-tax_code = 'V0'.             "Enter the tax code applicable
    wa_item-item_amount = '50.60'.     "Enter the item amount
    * wa_item-quantity = '2380'.           "Enter the invoice quantity
    * wa_item-po_unit = 'EA'.              "Enter the UoM
    APPEND wa_item TO it_item.
    CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
       EXPORTING
         headerdata                = wa_header
    * *   ADDRESSDATA               =
      IMPORTING
        invoicedocnumber          = g_invno
        fiscalyear                = g_fyear
       TABLES
         itemdata                  = it_item
    * *   ACCOUNTINGDATA            =
    * *   GLACCOUNTDATA             =
    * *   MATERIALDATA              =
    * *   TAXDATA                   =
    * *   WITHTAXDATA               =
    * *   VENDORITEMSPLITDATA       =
         return                    = it_ret
    * *   EXTENSIONIN               =
    IF g_invno IS NOT INITIAL.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT          = 'X'
    * *   IMPORTING
    * *     RETURN        =

    Thanks every one for your valuable solutions.
    Issue is Solved by unchecking the flag.
    wa_header-INV_TRAN = 'X'.
    Thanks & Regards,
    Ramjee.

  • BAPI for MIRO Incoming Invoice

    Hi All,
    I want BAPI for MIRO Posting ie for Incoming Invoice.
    .here MIRO is being done with Delivery Note number
    Following are the necessary entries for MIRO Posting
    Invoice date
    Reference
    Amount
    Calculate Tax
    Tax amount
    Delivery Note
    Vednor
    Business Area
    Please suggest me suitable BAPI for MIRO Incoming Invoice Posting with sample code.
    immediately.Please give some sample code for my reference.
    Rewards will be given.
    Regards.
    Ulhas

    Hi,
    BAPI for Invoice Verification: Post Invoice
    BAPI_INCOMINGINVOICE_CREATE
    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).

  • BAPI for attachment to incoming invoice

    Hello,
    I am creating documents for incoming invoices with an RFC that uses BAPI_INCOMINGINVOICE_CREATE. I also want to attach an external file to the document created. Is it possible to achieve this with a BAPI or an fm?
    Thanks in advance,
    Ali

    Hi,
    I am giving a brief about the flow you should follow.
    PERFORM file_upload USING p_file.  (This is the perform in which you will upload your file with the business object of the document, document key, archiv type, the local path of attachment etc...)
      PERFORM validate_file.   ( This is to validate your entries from the file)
      PERFORM bo_existence_check. (This is to check the the existence check of the business object and document key in the system)
    LOOP AT gt_upload_file INTO gs_upload_file.  (This is looping through the file for each entry i.e. each document)
          PERFORM upload_attachment. ( This is to upload scanned attachment to optical archiv drive)
    Use FM SCMS_AO_FILE_PUT_FE for uploading the file
           PERFORM link_archiv.  (This is to link the uploaded document in archiv drive with the document in SAP system)
    USE FM ARCHIV_CONNECTIONTABLE_INSERT  for linking the document and attachment.
    ENDLOOP.
    Let me know if you find it useful.
    Thanks and Regards,
    Kiran Mohan

  • Bapi to save as completed an incoming invoice

    Hi,
    is there a bapi allowing to create an incoming invoice an saving it as completed?.
    i don´t  need to park it.
    i´d like to save the document as completed.
    (i did try with BAPI_INCOMINGINVOICE_PARK but what i got was a parked document and what i need is a document saved as completed).
    it is as if you cliked "Saved as completed" button of transaction MIR7.
    Best regards.

    To all people interested this is how i solved the question:
    CALL FUNCTION 'BAPI_INCOMINGINVOICE_PARK'
      EXPORTING
        headerdata       = x_in_header
      IMPORTING
        invoicedocnumber = lc_belnr
        fiscalyear       = lc_gjahr
      TABLES
        itemdata         = i_in_item
        return           = i_return.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.
      CALL FUNCTION 'MRM_INVOICE_READ'
        EXPORTING
          i_belnr = lc_belnr
          i_gjahr = lc_gjahr
        IMPORTING
          e_rbkpv = s_rbkpv
        TABLES
          t_drseg = tab_drseg
          t_rbselbest = l_t_selbest
          t_rbsellifs = l_t_sellifs
          t_rbselfrbr = l_t_selfrbr
          t_rbselwerk = l_t_selwerk
          t_rbselerfb = l_t_selerfb.
    PERFORM drseg_complete(SAPLMR1M) USING     s_rbkpv
                                                'V'
                                                space
                                      CHANGING  tab_drseg[].
    * As the next routine checks ok-code not initial i have to
    * pass a value to the ok-code
    DATA: c_okqu(17)   TYPE c VALUE '(SAPLMR1M)OK-CODE'.
    FIELD-SYMBOLS: <fs_okqu> TYPE ANY.
    ASSIGN (c_okqu) TO <fs_okqu>.
    <fs_okqu> = 'COMP'.
    DATA: ok-code(20).
    DATA:      l_trtyp     LIKE t169-trtyp value 'V'.
    CONSTANTS: l_okcode    LIKE  ok-code VALUE 'COMP'.
    PERFORM document_park(SAPLMR1M) USING s_rbkpv
                                 tab_drseg[]
                                 l_t_selbest[]
                                 l_t_selfrbr[]
                                 l_t_sellifs[]
                                 l_t_selwerk[]
                                 l_t_selerfb[]
                                 l_trtyp          "akt_typ
                                 l_okcode.       "fcocomp.
    Note that the key here was the two routines drseg_complete and document_park
    Best regards.
    Edited by: pablo casamayor on Apr 24, 2008 8:27 AM
    Edited by: pablo casamayor on Apr 24, 2008 8:29 AM

  • Archiving incoming invoice via BAPI

    I have a scenario were we receive incoming invoice as a formatted text-file with a corresponding pdf image of the invoice. The concept is to first create an archived document reference of the PDF (via a BAPI call) and then send the archive-doc-id with the INVOIC01 Idoc and link these so that the PDF appears as an attachment in the MM invoice in transaction MIR4. The middleware used is MS BizTalk.
    The problem is that the BAPI seems to require a dialog user to post the PDF, and returns the message "RFC partner does not allow to start any program" (CMS057).
    Does anyone have experience with this?
    The BAPI coding:
    function z_bapi_archivobject_createfile .
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(I_ARCHIV_ID) TYPE  BAPITOAV0-ARCHIV_ID
    *"     VALUE(I_DOCUMENT_TYPE) TYPE  BAPIARCPAR-DOC_TYPE
    *"     VALUE(I_FILEPATH) TYPE  SAPB-SAPPFAD
    *"  EXPORTING
    *"     VALUE(E_ARCHIV_DOC_ID) TYPE  TOAV0-ARC_DOC_ID
    *"     VALUE(E_BAPIRETURN) TYPE  BAPIRET2
      call function 'ARCHIVOBJECT_CREATE_FILE'
        exporting
          archiv_id                = i_archiv_id
          document_type            = i_document_type
          path                     = i_filepath
        importing
          archiv_doc_id            = e_archiv_doc_id
        exceptions
          error_archiv             = 1
          error_communicationtable = 2
          error_upload             = 3
          error_kernel             = 4
          others                   = 99.
      if sy-subrc <> 0.
        call function 'BALW_BAPIRETURN_GET2'
          exporting
            type   = sy-msgty
            cl     = sy-msgid
            number = sy-msgno
            par1   = sy-msgv1
            par2   = sy-msgv2
            par3   = sy-msgv3
            par4   = sy-msgv4
          importing
            return = e_bapireturn.
      endif.
    endfunction.

    Hi,
    You can  check whether the invoice has been processed via FM. IDOC_INPUT_BBP_IV in R3 system.
    If the invoice has been processed via FM IDOC_INPUT_BBP_IV, then you can check which user-exits can be used for duplicate invoice check within FG BBPI.
    In standard BAPI processes system can't support the functionality for
    duplicate invoice check. Thanking you

  • DMS document attachment with Incoming Invoice

    Hi All,
    We are creating one DMS document and want to attach it to an Incoming Invoice (MIRO).
    We are using the bapi BAPI_DOCUMENT_CREATE.  What are the fields to pass in Objectlink.
    Please help us to achieving it.
    Thanks

    We have created an Incoming Invoice already using 'BAPI_INCOMINGINVOICE_CREATE'. We are now creating a DMS document using 'BAPI_DOCUMENT_CREATE' and want it to be linked to the existing Invoice. For this we are trying to use the 'OBJECTLINKS' table.
    The linked document should be visible in T-Code FBL1N. Can you please throw some light on how to do this?
    Edited by: Himansu.P on Jun 14, 2011 3:06 PM

  • Incoming invoice from third party system

    Hi All,
    Could you please help in choosing functional module or bapi or badi's for incoming invoices that are receiving from third party system. I have no ideal about that but the SAP has to be loaded using idocs. what is the reason to choose the above ones
    Thanks in advance for response.

    Why not starting with docu?
    The general process  is explained well in help.sap.com
    As a service, put this into your Google: vendor invoice edi site:help.sap.com

  • Bapi for invoice parking

    Hi,
    Does anyone know any BAPI to park a invoice using purchase order at the level of the services. I know BAPI_INCOMINGINVOICE_PARK, but it supposed to only park the invoice at the level of the purchase order items, not of the level of included services in each purchase order item. And we want to enter information related to the service's items.
    Thanks,
    Paulo Sousa

    Hi Paulo,
    the same bapi can be used for services as well:
    Here is the example given in the documentation:
    "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
    Regards,
    Ravi

  • Posting a previously parked incoming invoice

    Hi all,
    Can anybody help me with the following scenario:
    I am parking incoming invoice document using BAPI_INCOMINGINVOICE_PARK. It gives me a document no.
    Later I want to post this document. I don't know which BAPI or fm to use for this. Is it possible to post parked documents with BAPI_INCOMINGINVOICE_CREATE?
    Thanks
    Ali
    Edited by: Ali Abbasgil on Aug 4, 2010 12:59 PM

    Hi ,
    invoice_change facilitates your requirement...
    But there are certain constriants as of the following points:
    pls see if these points help.
    1.It is not possible to change invoice documents flagged for invoice verification in the background using this method.
    2.Furthermore, no invoice documents saved within the framework of the EDI process can be changed with this method.
    regards,
    umakanth..

  • Need urgent help on Posting Incoming Invoice...........

    Hi,
    Please suggest me the best approach to post Incoming invoice (Customer Invoice, Invoice, GL Account) as the data is there in legacy system and my middle ware is XI system. Please suggest best approach among the below methods.
    1) XI will call a BAPI(BAPI_INCOMINGINVOICE_CREATE) and data will be posted accordingly.
    2) XI will generate Idocs and R/3 system will pick those Idocs and post. (Please tell me the IDOC type and Message type for the same).
    3) XI will place a file at application server level and ABAP will pick that file and post the data using BAPI (BAPI_INCOMINGINVOICE_CREATE).
    Note: while posting the customer invoice, the customer account number that is coming from legacy system is different from customer account number that is in R/3. So, when ever posting the data I need to change the legacy customer a/c numbmer with R/3 customer a/c number which is maintained in R/3.
    Please let me know the better approach ASAP. If you suggest first or second approach please let me know the enhancement or BADI name to achieve the functionality specified in NOTE....
    Looking forward for some good answers.
    Regards,
    Chandu.

    hi thr...
    http://help.sap.com/saphelp_45b/helpdata/en/b4/8a7415dc4ad111950d0060b03c6b76/content.htm
    kindly go thru the above data and do reward if helpful.

  • User-Exit to Modify Accounting Document of Incoming Invoice

    Hello,
    My requirement is to add two new Line Items (One Debit One Credit - with net value 0) in the Accounting Document of the Incoming Invoice.
    Is there any User-Exit available for modification of the Accounting Document?
    P.S. - The Incoming Invoice is being Posted using BAPI - BAPI_INCOMINGINVOICE_CREATE
    Thanks & Regards,
    Abhishek

    Hi Abhishek,
    Try this exits. You go through the flow and put a break point on the selected exits, and check it whether it triggering or not?
    I too not aware of this invoice flow, so I am listing all the relevant exits. I think this may help you.
    Enhancement
    LMR1M001                                User exits in Logistics Invoice Verification
    LMR1M002                                Account grouping for GR/IR account maintenance
    LMR1M003                                Number assignment in Logistics Invoice Verification
    LMR1M004                                Logistics Invoice Verification: item text for follow-on docs
    LMR1M005                                Logistics Inv. Verification: Release Parked Doc. for Posting
    LMR1M006                                Logistics Invoice Verification: Process XML Invoice
    MRMH0001                                Logistics Invoice Verification: ERS procedure
    MRMH0002                                Logistics Invoice Verification: EDI inbound
    MRMH0003                                Logistics Invoice Verification: Revaluation/RAP
    MRMN0001                                Message output and creation: Logistics Invoice Verification
    Business Add-in
    INVOICE_UPDATE                          Business Add-In: Logistics Invoice Verification
    Reward points if it helps you.
    Cheers,
    Swamy Kunche

  • Creating of incoming invoice automatically when documen info record created

    Hi all,
    I apologize because I am asking many questions on this forum during the last few weeks, but I have some problems which I can't solve by myself in one project.
    So, this time the question is about incoming invoices.
    Here is the situation:
    When our customer receives incoming invoice (in paper form) we scan it and send it to one Document management system. In that system we verify the invoice and approve it. After that step the document is released to SAP (only the document info record is created and that info record points to the original document (pdf file) in that DMS).
    Now the question is:
    Is it possible to automatically create incoming invoice (parked) when the document is released to SAP (it+s document info record created) and to create link between these two SAP objects? Basically it means that at the moment when doc. info record is created, the incoming invoice is created (only with mandatory data) and saved (parked).
    We need this functionality because our client wants to have the access to original document (pdf file) when he is about to finish the incoming invoice.
    So, is it possible to set up some parameters so that incoming invoice is created automatically after the document info record is created, and linked to that document info record?

    I was not aware that u have already done coding to create DIR in SAP. In that case u don't need to rely on status triggering, u may create the invoice prior to  DIR creation and then link it to the DIR.It can be done in the way u have mentioned. I.e. linking at the time of DIR with BAPI_DOCUMENT_CREATE.
    I doubt we have any direct link to Incoming Invoice from DIR. One of the options i can think of is linking DIR to EKPO(Purchase Order Item) which is mentioned in Invoice.
    Else u may need to add another object with object table "RBKP"
    Following link will help u in creating new Object for development of new screens [http://help.sap.com/saphelp_erp60_sp/helpdata/en/c1/1c31a243c711d1893e0000e8323c4f/frameset.htm]
    BAPI_DOCUMENT_CREATE2 is  the latest BAPI instead of BAPI_DOCUMENT_CREATE.
    Points Appreciated.

  • Park the incoming invoice without PO#.

    Hi All,
    I have a issue where i need to  park the incoming invoice without PO#. I found one BAPI 'BAPI_INCOMINGINVOICE_PARK', but when I checked it, It is asking for PO#. Is there any BAPI, or FM which can serve the purpose.
    Please help me on this issue.
    Regards,
    Rohit

    Hi,
    With T_Code FB60, you can fulfill your requirements, but whenever you want to track the same wrt PO / GR / SES it will not give you proper details, as long as possible you should avoid using FB60.
    Regards,
    VIkas

Maybe you are looking for

  • PO Document type and ERS default cchecked

    Hi Guys Need a bit of help here with an issue My requirement -- When a Purchase order with specific document type is created for One time vendors the ERS check box should be ticked default in the PO Line item details in the invoice tab . Is there a u

  • Threads + Swing

    Hi folks, I found the following code here at SDN. The main purpose of this code is to execute an exe-file and to redirect its output to a java Swing JTextArea. This code works fine. However, if I change...     public cCallGenerator()         init();

  • Computer shutting down when left on

    This happens with all my macs - MacBook Air, MacBook and iMac. If I leave them on, will come back half an hour later with it having closed down most programs, usually failing to on Safari. I checked my energy saving settings, and they are all on NEVE

  • How do I get rid of horizontal lines on mac osx 10.7?

    I have several horizontal lines on the screen of my Laptop.  It is a PowerBook ios 7.0.5.  How do I eliminate the lines?

  • Touch screen mouse

    Hi I'm beginning to become totally annoyed by the touch screen mouse; 27" imac... it seems to have a mind of it's own. It is indeed much better than the former grot wheel but it selects and does things which I don't ask it to do. It's like the "touch