Duplicate Invoice Control.

With regards to duplicate invoice control, can anyone advise if they have found a method to ensure that invoices are not processed more than once? Current process in ECC is too rudimentary. Is there a way to configure the system such that it displays a list of both FV60 and MIRO invoices that are potential duplicates based on parameters such as Reference, Amount, Vendor, Name etc?
Any help here is appreciated.

Hello,
If you want to make it from warning to error message, you can restrict it.
Try to post a same invoice. The system gives a warning message, double click on the warning message. Note down the message number.
Then go to OBA5
Give the application area (alphabeticals in the message number is application area)
and give the message number and switch off the message for online and batch entries.
In case if the message is not available in OBA5, then go to OBMSG and add the message there, click on switch off button, then you come to OBA5 and switch off.
If you make this as error, in future, if you post the same invoice reference, the system will stop you. You need to keep that in mind.
Hope this will solve the purpose.
Regards,
Ravi

Similar Messages

  • Control of duplicate invoice posting at T.Code FB70

    Dear Experts
    As per clients need to we need to control with error message when user trying post duplicate customer invoice at T.Code FB70.
    we request your help on how do we can meet this requirement.
    if any body know the relevant application areas for message control, pleas let me know. 
    I tried with application area F5, but it is not working for customer postings.
    Thanks in advance.
    Best regards,
    S. Habib Pasha.

    Hi,
    I used this validation for vendor invoice.
    $$1 is the document number, which is about to be generated after passing through this validation.
    So far as the check part is concerned, I used user exit form and coding in program ZRGGBR000, which is a copy of standard program RGGBR000. The coding is as follows-
    exits-name  = 'U300'.
      exits-param = c_exit_param_none.        "AP Duplicate Invoice Check.
      exits-title = text-104.                 "Posting check
      APPEND exits.
    FORM u300 USING b_result.
    *****Local Variables
      DATA:    l_bukrs   LIKE   bkpf-bukrs,  "Company Code
               l_belnr   LIKE   bkpf-belnr,  "Doucment Number
               l_gjahr   LIKE   bkpf-gjahr,  "Fiscal Year
               l_buzei   LIKE   bseg-buzei.  "Number of Line Item
      b_result  =   b_true.
      SELECT  bukrs
              belnr
              gjahr
         FROM bkpf
         INTO (l_bukrs, l_belnr, l_gjahr)
         WHERE bstat = bkpf-bstat
           AND xblnr = bkpf-xblnr
           AND stblg = ' '.
        IF sy-subrc = 0 .
          SELECT  buzei
             FROM bseg
             INTO l_buzei
             UP TO 1 ROWS
             WHERE belnr = l_belnr
               AND gjahr = l_gjahr
               AND bschl = '31'
               AND lifnr = bseg-lifnr.
            IF sy-subrc = 0.
              b_result =  b_false.
              bkpf-belnr = l_belnr.
            ENDIF.
          ENDSELECT.
        ENDIF.                            "closed for SY-SUBRC
      ENDSELECT.
    ENDFORM.                                                    " U300
    Regards
    K Khatri

  • A/P Invoice Entry - Duplicate Invoice Error vs. Warning Message Control

    In configuration, the duplicate invoice message has been defined as an error instead of a warning.  This affects all invoice entry dialog transactions.  Is there a method  or approach to change only transaction F-63 Park Document so the message is a warning intead of an error?   Thxs.

    Hi
    we have to activate certain setting in MM.
    Step - 1
    SPRO - MM - Logistic Invoice Verification - Incoming Invoice - Set Check for Duplicate Invoices - Activate Check box for reference field.
    Step - 2
    In Vendor Master XK02/FK02 goto Payment Transaction & click on check box - Check double Inv
    Step - 3
    There is also a Std Report for checking the invoices for which same reference feild was given
    S_ALR_87012340
    Hope its useful, give if found useful
    Regards,
    ram

  • Duplicate invoices check criteria

    Hello Gurus,
    I have a quick question,
    We have set the duplicate invoice checkbox in Vendor master records to check for duplicate invoices and the reference field in FB60 is a mandatory field, now as per the documentations, If a reference number was specified in the sequential invoice/credit memo, the system checks whether an invoice/credit memo has been posted where all the following attributes agree:
    Company code
    Vendor
    Currency
    Document date
    Reference number
    How can I add Amount as a criterion to check for Duplicate invoice check??

    In case of FI document , duplicate vendor invoice check is available for :-
    Company code
    Vendor
    Currency
    Document date
    Reference number
    You need not to restrict to amount for example
    a vendor gives you duplicate invoice with different amount. system will block the entry or give warning message depending upon message control maintained.
    in case you have scenario for restriction you have to maintain user-exit. check user-exit for fb60.
    thanks
    S AP
    Edited by: S AP on Aug 11, 2008 3:34 PM

  • Duplicate Invoice Check -Vendor

    Hi everyone,
    I found  out that I posted an invoice(FB60) for the same vendor with same, amount, reference,invoice date,same company code.one invoice was posted on 3rd march and  other was posted on 25th march,I checked in the vendor master record indicator" chk double inv" is checked.Why system didn't give any error or warning message.Please guide.
    Regards
    Shaun

    Hi,
    Good Day,
    Please follow the below steps ( taken from another post and its working fine for me)
    The following fields must be identical for Duplicate invoice check
    Company code (BUKRS)
    Vendor number (LIFNR)
    Currency (WAERS)
    Reference number (XBLNR)
    Amount in document currency (WRBTR)
    Document date (BLDAT)
    If the document is having any one of the above filed different then the
    system does not consider it as a duplicate invoice.
    and also It will check duplicate invoice check in vendor master data
    and in posting key is there check box selected for sales related
    The setting you making in OMRDC i.e Materials management->Logistics
    Invoice Verification->Incoming Invoice ->Set Check for Duplicate
    Invoices is only valid for MM and not FI invoices posted via FB60/FB65.
    You should check the F1 help on field "Chk double inv." (LFB1-REPRF)
    in the relevant vendor master record (transaction FK03).
    Please also check, that message F5 117 has been set correctly in the
    IMG using this path:
    Financial Accounting -> Financial Accounting Global Settings ->
    Document -> Default Values for Document Processing -> Change Message
    Control for Document Control For Document Processing
    Finally & mainly, go to the relevant posting key is defined as sales
    related in transaction OB41. You have to flag this field if the
    duplicate invoice check should work.
    Best Regards,
    KSK

  • AR Duplicate invoice number

    Hi
    From past many years we have been getting duplicate transaction numbers in Oracle AR. Because of this the new invoices get stuck in the interface table(ra_interface_lines_all) with the error Duplicate Invoice Number.
    To address this we are changing the old invoice numbers present in the base tables(ar_payment_schedules_all,ra_customer_trx_all and ra_customer_trx_lines_all) with -1 as suffix ,so that the newer transactions will flow into oracle.But we need to find a permanent solution to this problem.
    Any suggestions will be welcomed.

    Hi,
    in receivables module the transaction number sequence is controlled by the configuration "Transaction Source" .... typically any organization would have two sources one for manual transaction entered in the receivables module directly ... another for transactions imported from Order management or any third party systems ...
    When there are two different sources, it is often said to have two different sequence numbers (which cannot overlay each other) ... probably a larger sequence ...say For Manual Invoices 10000001 and for Imported Invoices 5000001 .. in which case chances of duplication would be NIL ....
    Also check the Transaction source configuration, since there is an option available to accept Duplicate Invoice numbers .. make sure that checkbox is unchecked as well .....
    Also it is recommended by oracle not to make updates to base table / transaction data .. it is a much simpler approach to assign unique transactions numbers for new ones getting imported ...
    The key areas to check is the Transaction source configuration ... navigation in receivables module is Setup > Transactions > Sources
    Regards,
    Ivruksha

  • Duplicate Invoices while saving document through MIR7

    Hello,
    I have to Post the invoice document through MIR7. This can be done through MIRO as well but the end user is using MIR7 for this purpose by parking and then posting the document.
    Problem here is that once user has posted the invoice document, he is able to post the same document again by just changing the reference document number field in MIR7, which leads duplicate  invoices.
    Here we need to control this by manually putting some conditions. I tried to find the exit and BADI but was able to get only one useful thing that is BADI "INVOICE_UPDATE".
    I am not sure about this BADI but in case if this BADI can be used then I want to know how?
    Also if not then what are the possible solutions to resolve the issue.
    I am open for any further inputs.
    Thanks,
    Harjeet

    Hello Pablo,
    In the BADI I am using table TI_RSEG_NEW, there I am getting values same as listed below for MIR7 but instead I am getting the values of BELNR as well. Here the second column is BELNR which is blank for MIRO.
                                                                                    1     110  |                |2011 |000001|0411000942|00010|00   |000000000009000029   |
        2     110  |                |2011 |000002|0411000942|00020|00   |000000000003000013   |
    Code for the same is:
    if sy-ucomm eq 'COMP'.
            select ebeln
                   ebelp
                   zekkn
                   gjahr
                   buzei
                   bewtp
              from ekbe into table i_ekbe
              for all entries in ti_rseg_new
              where ebeln = ti_rseg_new-ebeln
                and ebelp = ti_rseg_new-ebelp
                and zekkn = ti_rseg_new-zekkn
                and gjahr = ti_rseg_new-gjahr
                and buzei = ti_rseg_new-buzei+2(4).
          endif.
          if sy-ucomm = 'BU'.
            select ebeln
                   ebelp
                   zekkn
                   gjahr
                   belnr
                   buzei
                   bewtp
              from ekbe into table i_ekbe_belnr
              for all entries in ti_rseg_new
              where ebeln = ti_rseg_new-ebeln
                and ebelp = ti_rseg_new-ebelp
                and zekkn = ti_rseg_new-zekkn
                and gjahr = ti_rseg_new-gjahr
                and belnr = ti_rseg_new-belnr
                and buzei = ti_rseg_new-buzei+2(4).
            if sy-subrc eq 0.
              select belnr
                     gjahr
                     vgart
                from rbkp into table i_rbkp
                for all entries in i_ekbe_belnr
                where belnr = i_ekbe_belnr-belnr
                  and gjahr = i_ekbe_belnr-gjahr.
            endif.
          endif.
          loop at ti_rseg_new into wa_rseg_new.
            if sy-ucomm = 'COMP'.
              clear v_message.
              read table i_ekbe into wa_ekbe with key
                                             ebeln = wa_rseg_new-ebeln
                                             ebelp = wa_rseg_new-ebelp
                                             zekkn = wa_rseg_new-zekkn
                                             gjahr = wa_rseg_new-gjahr
                                             buzei = wa_rseg_new-buzei
                                             bewtp = 'T'.
              if sy-subrc eq 0.
                concatenate 'Purchasing Document Number' wa_ekbe-ebeln 'is already parked.' into v_message separated by space.
                message v_message type 'E'.
              else.
                clear v_message.
                read table i_ekbe into wa_ekbe with key
                                               ebeln = wa_rseg_new-ebeln
                                               ebelp = wa_rseg_new-ebelp
                                               zekkn = wa_rseg_new-zekkn
                                               gjahr = wa_rseg_new-gjahr
                                               buzei = wa_rseg_new-buzei
                                               bewtp = 'Q'.
                if sy-subrc eq 0.
                  concatenate 'Purchasing Document Number' wa_ekbe-ebeln 'is already Posted.' into v_message separated by space.
                  message v_message type 'E'.
                endif.
              endif.
            elseif sy-ucomm = 'BU'.
              clear v_message.
              read table i_ekbe_belnr into wa_ekbe_belnr with key
                                             ebeln = wa_rseg_new-ebeln
                                             ebelp = wa_rseg_new-ebelp
                                             zekkn = wa_rseg_new-zekkn
                                             gjahr = wa_rseg_new-gjahr
                                             belnr = wa_rseg_new-belnr
                                             buzei = wa_rseg_new-buzei
                                             bewtp = 'Q'.
              if sy-subrc eq 0.
    **          READ TABLE s_rbkp_new WITH KEY belnr = wa_ekbe_belnr-belnr
    **                                         gjahr = wa_ekbe_belnr-gjahr.
    **          IF sy-subrc EQ 0.
                read table i_rbkp into wa_rbkp with key belnr = s_rbkp_new-belnr
                                                        gjahr = s_rbkp_new-gjahr
                                                        vgart = s_rbkp_new-vgart.
                if sy-subrc eq 0.
                  concatenate 'Purchasing Document Number' wa_ekbe_belnr-ebeln 'is already posted.' into v_message separated by space.
                  message v_message type 'E'.
                endif.
    *          ENDIF.
              endif.
            endif.
          endloop.

  • Duplicate invoices

    Presently, Invoices in the SAP system are getting posted using XMS upload program.
    Problem:
    System is not giving error message or not stopping the XMS upload program from posting two invoices with same reference number and text description (even though date of posting is different)?
    Please suggest some ways as to how to avoid these duplicate invoices posting.
    Note: If this has to be resolved using substitution rule then please explain the exact procedure to be followed for that.

    I assume that the duplicate invoice check you are talking is for Vendor invoices in AP and LIV.
    I am not sure what you mean by XMS upload but here is how duplicate invoice check works in standard system.
    Standard Duplicate invoice check on vendor master enables the system to block duplicate (Same invoice reference, company code, invoice date, amount and vendor). If either of these differ the system allows the invoice to get processed.
    So as per requirement of our client we developed a new validation rule that checks a invoice document while posting for any duplicates accross all company codes and for vendor invoices.
    Prereq:If inv doc type is KR or RE
    Validation: In user exit
    Write code for checking same reference in BKPF-XBLNR=XBLNR and BKPF-Doc Date=Doc Date.
    If there exists same XBLNR check for
    BSEG-Posting Key=31, BSEG-LIFNR=LIFNR;  and issue the message for duplicate check.
    Note: This will still post duplicate invoices if the document date is changed. If you want to block the invoices accross all document dates remove the code of BKPF-Doc Date check.
    But understand the implication. You are telling the system to check for duplicate invoices accross all posting dates. Hence if you are looking 1 yr or 2yrs down the lane the system will slow down alot for invoice posting given that it has to check invoices accross all dates. If you have a seperate doc type for XMS upload you can control the validation by doc type.
    Hope it resolves your issue.
    Thanks,
    Sivaram

  • Duplicate Invoice Verification

    Hi,
      I've got a problem with setting he Duplicate Invoice check. Have perform the following
       1. Goto Tcode OMRDC and tick the 'Check Refernce' check-box
       2. Goto Vendor Master and tick the ''Chk double inv' check-box
       3. Set the Messge Control for Message F5 117 to E for both online and batch input
    However, when i create invoices via F-43, I am still able to post invoices with the same ref number, doc date, vendor, company code, currency and amount.
    Am I missing a config somewhere? Appreciate your advce. Thank you.

    Hi,
    Please find below the steps for checking duplicate invoice from FI.
    1) Check "Chk Double inv" in vendor master-> company code view-> payment transactions
    2) OBA5, enable message # 117 in F5 Application area as "E" as per the requirement (options available are, online, batch input and standard)
    Kindly note following points....
    1) It is better to check Reference number as mandatory field in OBA7
    2) If you have activated chk double inv in the vendor master, it will not check for the duplication with earlier documents which have created before such activation.  It means, this check will happen only the against the documents posted after activation
    Hope this answers your query.
    Best Regards,
    Madhu
    Edited by: Madhusoodanan Ramachandran on May 3, 2010 3:37 PM

  • Duplicate invoice check in park invoice

    hello gurus
    what are the settings for duplicate invoice check at the time of invoice parking.
    Thanks
    Venkat

    HI Venkat,
    Let me  explain how the check for duplicate invoices work in FI:
    In FI,when checking for duplicated invoices,the system compares the following
    Note 305201 clarifies this in a more detail.
    The following fields must be identical for Duplicate invoice check
         Company code                             (BUKRS)
         Vendor number                             (LIFNR)
         Currency                                      (WAERS)
         Reference number                         (XBLNR)
         Amount in document currency        (WRBTR)
         Document date                             (BLDAT)
    If the document is having any one of the above filed different then the system does not consider it as a duplicate invoice.
    and also It will check duplicate invoice check in vendor master data and in posting key is there check box selected for sales related
    The setting you making in OMRDC i.e Materials management->Logistics Invoice Verification->Incoming Invoice ->Set Check for Duplicate Invoices is only valid for MM and not  FI invoices posted via FB60/FB65.
    You should check the F1 help on field "Chk double inv." (LFB1-REPRF) in the relevant vendor master record (transaction FK03).
    Please also check, that message F5 117 has been set correctly in the IMG using this path:
    Financial Accounting -> Financial Accounting Global Settings -> Document -> Default Values for Document Processing -> Change Message Control for Document Control For Document Processing
    Finally & mainly, go to the relevant posting key is defined as sales related in transaction OB41. You have to flag this field if the duplicate invoice check should work.
    Please assign points if it useful.
    Regards
    Ravinagh Boni

  • DUPLICATE INVOICE VERIFICATION CHECKL

    Hi
    How to set control for duplicating invoice verification.
    Like the same Delivery note or the Freight passing twice to be checked by an error message
    Please help
    Krishna

    SPRO-MM-invoice verification-incoming invoice-Set Check for Duplicate Invoices                                                                               
    In this step, you can configure for each company code if the system is to check for duplicate invoices when you enter invoices.                                                                               
    This check should prevent incoming invoices being accidentally entered and paid more than once.                                                                               
    You can choose whether to activate or deactivate the check criteria of company code, reference document number and invoice date for each company code. The more criteria that you activate, the lower the probability of the system finding a duplicate invoice. The Accounting documents are checked first, followed by documents from Logistics Invoice Verification (only incorrect invoices or those entered for verification in the background).                                                                               
    When checking duplicate invoices, the system compares the following attributes in the standard system:                                                                               
    Vendor                                                                               
    Currency Company code                                                                               
    Gross invoice amount Reference document number                                                                               
    1. Invoice date If the system finds an invoice that matches all                         
           attributes, the system                                                               
           -  displays a customizable message.                                                  
           -  If you are entering credit memos, subsequent debits, or subsequent                
           -  credits, the system does not check for duplicate invoices.                        
           -  The exception is the Argentina country version, where the system                  
              checks                                                                               
    -  for duplicate invoices and credit memos.                                          
           -  If a previously processed document is later cancelled and then                    
              entered                                                                               
    -  again, no message is displayed.                                                                               
    Requirements                                                                               
    The system only checks for duplicate invoices in Materials Management                                                                               
    if you specify a reference document number when entering the invoice.                                                                               
    In Customizing (IMG) for Invoice Verification, you can specify that the                                                                               
    system check the following attributes                                                                               
    Reference document number                                                                               
    Invoice date                
       Company code                                                                               
    Because there are fewer attributes to check, it is more likely that the system will find a duplicate invoice.                                                                               
    Standard settings                                                                               
    All check criteria are activated in the standard system.                                                                               
    Example                                                                               
    The following document has been entered and posted:                                                                               
    Reference document number: 333                                                                               
    Invoice date: 28.04.00                                                                               
    Gross invoice amount: 100,00                                                                               
    Currency: EUR                                                                               
    Vendor: Wolf                                                                               
    Company code: Hamburg                                                                               
    The settings for checks for duplicate invoices in Customizing have                                                                               
    been maintained as follows:                                                                               
    The field reference document number and company code are not selected.                                                                               
    This means that these attributes will not be checked. Now enter the                                                                               
    following invoice:                                                                               
    Reference document number: 334                                                                               
    Invoice date: 28.04.00                                                                               
    Gross invoice amount: 100,00                                                                               
    Currency: EUR                                                                               
    Vendor: Wolf                                                                               
    Company code: Berlin                                                                               
    Result                                                                               
    By entering the reference document number and entering an invoice,it is possible to check for duplicate invoices.                              
    The reference document number and the company code contain different data than the invoice you entered. These attributes are not checked because you have deselected them in Customizing.                                                                               
    All other attributes are equal. The system displays a message telling you that a duplicate invoice has been found.                                                                               
    If, for example, you had selected the reference document number in Customizing, the system would check this and recognize that this invoice is different to the previously entered invoice. The system would not then display a message.

  • Urgent !!!! Duplicate invoice entry

    Hello Experts,
    I have a meeting tomorrow with business people to discuss the problems of "Double Entry Invoice" and how to control that.
    Here is what I was told by Business Unit head:
    I have observed that we sometimes make duplicate payments, usually through the AP check payments then again via wire transfer, but also could be duplicate invoice entry.  I need to understand how this could happen and what we can be done to prevent (or minimize) the possibility of this occurring.  Are there any SAP configuration settings we can use that we are not currently using?
    I joined very recently in this project and didnt know much about the configuration settings of the System.
    How should I deal this situation? Please advise me on what points should I prepare.
    Any help in this regard is highly appreciated and duly rewarded.
    Regards,
    Sriram

    HI Sriram,
    In vendor master data you need to check " check double invoice"
    In the vendor master, set whether the system should check for duplicate invoices.
    The check for duplication of invoice entry aims to avoid invoices being accidentally created and paid twice.
    When you enter invoices, the system first checks whether the accounting documents in Financial Accounting and then documents in Logistics Invoice Verification – only those that contain errors or that were entered for verification in the background – match up according to the following criteria.
    Vendor
    Currency
    Company code
    Gross invoice amount
    Reference document number
    Invoice doc. date
    The system only checks invoices. It does not check credit memos or subsequent credits/debits. When you create a duplicate invoice, the system displays a warning or error message, depending on your settings in Customizing.
    Exception
    For the Argentina country version and for documents in Financial Accounting, both invoices and credit memos are checked for duplicate entries.
    If a previously created document is canceled and then created again, the system does not display a message.
    Integration with Financial Accounting
    One of the following checks is performed in Financial Accounting, depending on the entry in the Reference field:
    If you enter a reference document number in the current invoice or credit memo, then the system checks for previously posted invoices or credit memos in Financial Accounting that match the following attributes:
    Company code
    Vendor
    Currency
    Document date
    Reference document number
    If you do not enter a reference document number in the current invoice or credit memo, then the system checks for previously posted invoices or credit memos in Financial Accounting that match the following attributes:
    Company code
    Vendor
    Currency
    Document date
    Amount in document currency
    Your system settings determine whether the system sends a warning or error message when it finds an invoice or a credit memo that matches all the relevant attributes.
    Prerequisites
    In the vendor master record, select the Chk double inv. (check for duplicate invoice) on the Payments in Accounting screen.
    The system only checks for duplicate invoices in Logistics Invoice Verification if you enter the reference document number when entering the invoice.
    In the Implementation Guide (IMG) for Logistics Invoice Verification, you can define that the following characteristics are not checked:
    (Logistics Invoice Verification ® Incoming Invoice ® Set Check for Duplicate Invoices)
    Reference document number
    Invoice date
    Company code
    The result of this is that the system is more likely to find a duplicate invoice, as it checks fewer characteristics.
    Note, that if you deselect the Company Code field this can have a negative effect on system performance. This is because the system then checks numerous documents from existing company codes.
    Features
    During the check for duplicate invoices, the system compares the following entered attributes in the standard system in Logistics Invoice Verification:
    Reference document number
    Invoice date
    Gross invoice amount
    Currency
    Vendor
    Company code
    Best Regards
    Ashish Jain

  • Custom Table for Verifying Duplicate Invoice against Legacy Invoice Data

    Hi All,
    We are trying to upload legacy invoice data in a custom table. Then we want to use SAP duplicate invoice check functionality to look for the potential duplicate invoice from this custom table as well apart from the standard SAP tables.
    If you know of some user exit or any function module which I can use to link this custom table with the standard SAP duplicate invoice check functionality then it would be of great help.
    Regards,
    Sanjay

    Hi Jurgan!
    Thanks for the reply,
    We are using ECC6,
    Support pack : SAPKH60013
    Settings for Duplicate Invoice Check In Vendor Master is correct
    Customization setting OMRDC transaction, tick mark for invoice reference no. only
    If all the cited characteristics match, the system displays a
    customizable message. M8462 (if logistics invoice documents are found) or M8108 (if accounting documents are found).
    I have ensured that message M8108 (if accounting documents are found) is maintained as an error message in OMRM.
    Still system is allowing duplicate invoices for the reference nos. 00082 and 00072.
    For other reference Nos. which are previously used for other documents, system issues error message successfully.
    I dont want to delete archived accounting doc. and if I maintaind BKPF entris of this archived doc manually it will create probelm in FI.
    is this happen due to life span of secondory index of archived accounting doc. is completed ?.
    Please Help
    Many Thanks
    Vikas

  • Duplicate invoice. Query help needed

    Hi All,
    We need to build a query which addresses the following condition
    Some of the invoices were created against the wrong vendors and that money needs to be recovered. Some of them are already recovered while some are not
    * list out all the duplicate invoices between a particular date range(invoice date) with same invoice num ,same invoice amount and same invoice date.
    * If there are any debit invoice created(invoice number postfixed with CR or ADJ),those particualr invoices should not be included.
    The table below shows two type of invoice, the one with bold(invoice num=193666) has debit invoice created and all the three records related to it should not be a part of output data
    while the record(invoice num=00017321) should be a part of output data.
    INVOICE_NUM     INVOICE_AMOUNT     VENDOR_NUMBER     INVOICE_DATE     ORG_ID
    00017321     233.35     A321     1-Dec-11     95
    00017321     233.35     K452     1-Dec-11     95
    *193666     101.67     EM9B     18-May-12     91*
    *193666     101.67     1B02     18-May-12     91*
    *193666CR     -101.67     1B02     18-May-12     91*
    Below is the query which i wrote to identify the duplicate invoice
    select distinct
    a1.invoice_amount,
    a1.invoice_num,
    (select segment1 from apps.po_vendors where vendor_id=a1.vendor_id) vendor_name,
    a1.invoice_date,
    A1.ORG_ID
    from apps.ap_invoices_all a1,
    apps.ap_invoices_all a2
    where 1=1
    and a1.org_id in (91,95)
    and a1.org_id in (91,95)
    and a1.invoice_date between (to_DATE('01-SEP-2011','DD-MON-YYYY')) AND (to_DATE('01-JUN-2012','DD-MON-YYYY'))
    and a2.invoice_date between (to_DATE('01-SEP-2011','DD-MON-YYYY')) AND (to_DATE('01-JUN-2012','DD-MON-YYYY'))
    and a2.invoice_num=a1.invoice_num
    and a1.invoice_amount=a2.invoice_amount
    and a1.invoice_id<>a2.invoice_id
    and a1.invoice_amount<>0
    order by a1.invoice_amount,a1.invoice_num
    Can anybody share their thoughts on how to modify the query above which checks if there are any debit invoice created and not include in the final output.
    Thanks in advance

    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • How can i get an duplicate invoice from my MacBook which I bought in an independent Apple retail store

    how can i get a duplicate invoice from my MacBook which I bought in an independent Apple retail store in poland

    Call the store & ask the sales staff to send you one if you are no longer in Poland.  If you are still there, what is stopping you from visiting the store? 

Maybe you are looking for

  • Can iPad3 connect to Apple TV via Airplay, and Bluetooth speaker at the same time?

    I'm making a best man speech using Keynote at a wedding tomorrow, for which I need audio as well as video. The Apple TV is connected via HDMi to the projector, and I can control the presentation wirelessly from my iPad. So far so good. There is a Blu

  • How to display image using from open dialog box?

    I've developed a program that can display image by named the file that I want to display in my program. But how can I display an image from an Open Dialog Box? I attch here with my program. import java.io.*; import java.awt.*; import java.awt.event.*

  • Select Option header cleared after FM call

    Hi I'm calling an FM in the AT SELECTION SCREEN event in which I'm using some FMs to validate the values entered by the user. However on returning from the FM the header of the select option gets cleared. And the value you entered on the select optio

  • IE is not Working

    Hello, I have Windows 8 computer and I am using Internet Explorer since I purchased Windows 8 Computer. Since yesterday I am facing an issue with IE. The IE app in the Start screen is working but whenever I start IE from my desktop, Its not Opening e

  • Importing (ABAP Function Module) into my Software component

    How to import a  ABAP Function Module into my Software component