Duplicate Postings in SAP

Hi All,
I have encountered an interesting situation. While trying to post a document through an RFC I have come across two postings which have all the header and line items same except for the document number. Even the posting time is same for both even to the extent of seconds. However, one of the document comes from the Program and the other is coming from the SM35 session which the program creates.
I have duplication checks present and active which involve a user exit when it comes across a duplication situation.
Can anyone advice as to how this situation came and the two entries got posted despite the duplication check present and active.

I suppose that your exit is executed before the Db Commit and the COMMIT-WORK, so when, the check was performed no record existed, and no error was raised, so both process executed the COMMIT-WORK update tasks and inserted records in the database with the same value.
You should try to lock "something" when checking duplicate posting (customer, vendor or the like so the second process will not be able to proceed further, and no duplicate posting will occur, the lock will be released by the COMMIT-WORK and the end of the update tasks (Be aware, there could be some duplicates nevertheless due to buffering(*) and delay in actual database update)
Regards,
Raymond
(*) Check [BYPASSING BUFFER |http://help.sap.com/abapdocu_70/en/ABAPFROM_CLAUSE.htm#&ABAP_ADDITION_3@3@]

Similar Messages

  • Postings in SAP HR for creating delta records for Time Management

    Hi Experts,
                      I am trying to test delta load for SAP HR Time Management Datasources. I am fairly new to SAP HR and need some help.
    Where do we create postings in  SAP HR for creating delta records which can be imported to BW. This is for the data sources 0HR_PT_1 and 0HR_PT_2.
                   Any help is appreciated. Will assign full points
    Regards
    Sunil Kumar.

    Hi,
    In order to test the above data sources you need to have some employee enter his time details or change the entered time details.  That will create some delta records for the planned or actual times.  CAT2 transaction should help entering the time details in SAP. 
    Hope it helps.

  • Check Duplicate Postings, GL, A/R, A/P

    Hi Experts,
    My requirement is to post accounting documents based on data pushed from another interface via RFC.  We're using BAPI_ACC_DOCUMENT_POST to handle this.  Now, the client wants us to handle double postings to prevent reprocessing of same data.  The postings are combination of GL to GL, GL to Vendor and GL to Customer.  So far, what I've researched are checking on duplicate vendor invoices. 
    As a last resort, we're leaning on just having a log of all entries that we processed and comparing them with the incoming data.
    Please help.  Is there a function module or any other way to prevent double postings?  Your inputs are greatly appreciated.  Thanks.
    Regards,
    Reiko

    Hi
    One suggestion on the AR Part. Use the User Exit SDVFX008 to populate the XREF1/2/3 with the SD Billing Document No. Than in posting of the document. Than you can write a validation rule for the same in GGB0 to check for values existing already. You need to try this, but i think it should work
    Regards
    Sanil Bhandari

  • Duplicate rows in SAP Query

    Now here is the issue.
    FIrst of all I am using sap query for generating a report.There are such reports where we require to know deliveries corresponding to sales orders.So in the infoset we have to join the tables *vbak-vbap-lips-likp". Now in the report output we will find duplicate records for a single order(400000001)  delivery relation(9000000002) such as:
    Sale Order      Delivery
    400000001     9000000002
    400000001     9000000002
    400000001     9000000002
    This is due to three items in between them.Now how can we handle this situation as we know there is not duplicate records in the infoset but there duplicate records in the output.I hope you get my point.Please reply urgently

    Hello,
    in the join of the tables VBAK VBAP LIKP LIPS and you look for item detailes, are you considering the item number POSNR as key also?
    Try to consider also the folliwing tables:
    1. VBAK (get the order list)
    2. VBAP (get the item details of the order) and keep truck of the POSNR
    3. check the subsequent documents in VBFA (you enter with result of VBAP [VBELV & POSNV] and you end/take the follow-on document and item number = VBELN & POSNN)
    4. LIKP (get the information of the delivery header = you enter with the result at point 3 VBELN)
    5. LIPS (get the information of the item of the delivery = you enter with VBELN & POSNN got at point 3)
    Do not forget to query and have POSNR as key since the beginning.
    Regards,

  • No delivery created & partial delivery postings[Non SAP(FTP) to SAP(idoc)]

    Dear All,
    When the sales posting(invoice,returns etc) is triggered later in SAP PI/XI it is successful.
    Once it reached ECC system the idoc's are successfull but the delivery is not created.
    Please find attached images for your reference.
    It is basically file to idoc scenario.
    Thanks and Regards,
    Rajesh

    Dear All,
    When the sales posting(invoice,returns etc) is triggered later in SAP PI/XI it is successful.
    Once it reached R3 system(ECC) the idoc's are successful but the delivery is not created.
    Please find above attached screenshots.
    It is basically file to idoc scenario.
    For successful delivery completions, an delivery no is created and saved.
    These are basically splitted in to 3 postings namely Fully delivery, Partial delivery and No delivery.
    This needs to be corrected at base level. Please advice on above issue.
    Thanks and Regards,
    Rajesh
    SAPSD Enquiry sapsd sapsd SD MODULE SD MODULE SAPXI XIPI SD SD IDOC_Err_Processing?? SAP PI XI EXPERT SAP PI SAP SD SAP MM sap sd InboundDelivery inbound idoc-deficit IDOC-XML to IDOC-Flat file conversion

  • How to avoid the duplicate receipts in SAP and Barcode system

    Hi Everyone
    We are using SAP ECC 5.0.Our receving is done by bar code system and it updates the SAP system. We have two separate database systems  one for Bar code systems and  another for SAP. Sometimes  while receiving RFID scanner shows material is not received or failed  and we have to receive it manually in the SAP system. Sometimes barcode system might have received but it is displayig error message, material receipt failed and we enter manually in the SAP and it becomes duplicate and creating inventory problems. Is there anyway we can fix this problem like while receving manually in the SAP system it should alert or pop message like material already received. What change we need to do in the configuration side.
    Your help is greatly appreciated.
    thanks in advance
    Murali

    Look at the posts closely:might not be needed if formatted ;)
    create or replace procedure splitsms as
    begin
      insert into scott.smssplit (r,c,s,tc,na,tc2,na2,tc3,na3,tc4,na4,wther,sno)
      select substr(rcstcnatcnatcnatcnawther,1,2) r,
             substr(rcstcnatcnatcnatcnawther,3,2) c,
             substr(rcstcnatcnatcnatcnawther,5,1) s,
             substr(rcstcnatcnatcnatcnawther,6,3) tc,
             substr(rcstcnatcnatcnatcnawther,9,3) na,
             substr(rcstcnatcnatcnatcnawther,12,3) tc2,
             substr(rcstcnatcnatcnatcnawther,15,3) na2,
             substr(rcstcnatcnatcnatcnawther,18,3) tc3,
             substr(rcstcnatcnatcnatcnawther,21,3) na3,
             substr(rcstcnatcnatcnatcnawther,24,3) tc4,
             substr(rcstcnatcnatcnatcnawther,27,3) na4,
             substr(rcstcnatcnatcnatcnawther,30,10) wther,
             sno
        from scott.sms1 a
       where sno = (select max(sno)
                      from sms1
                     where sno != a.sno
                   ); ---------------> added where clause with table alias.
    end;Regards
    Etbin

  • Duplicate Idocs - XI - SAP

    Hi Experts,
    In our scenario Idocs are coming in SAP from XI which generates Measuring Document.
    Now, Here Duplicate Idocs are getting generated carrying the same data where in one of the Idocs generates a Measuring document and other gives an Error Measuring document already exists.
    We would like to find out how the Duplicate Idocs are getting generated.
    Can anyone through some light on this kind of issues.??
    Thank You
    Deepak

    Hi,
    Now today also i found two Idocs, one has created the measuring document XYZ and the other is lying in 52 status-Duplicate Measuring Document Found. Document - XYZ.
    Now, we checked in XI system we couldnt able to find both these Idocs, dont know how these are getting generated in SAP or by any chance if they are coming from XI ??
    Also, can we have a report from SAP system showing Measuring Document generated against the IDOC number???
    Can anyone guide about this ??
    regards
    DM
    Edited by: Deepak M on Jun 30, 2010 2:40 PM

  • Qm postings in sap

    i know  litille sap qm
    my client is sap implemented
    now i am working in integratiion project
    my requirement is  in production client  what are qm postings are done daily
    how i have  to find,  any reports,  qm related data how we can find in production client,
    thanks
    ravi

    As far as the QM in production is concern it 03 & 04 inspection lots that are created.
    In QA33 or in table QALS these can be seen.
    Next could be the notifications generated in background or manually like F3 can be seen in QM10

  • Franchise scenarios financial postings in SAP Retail

    Have anybody implemented SAP R45 franchise scenario /  a separate company code per Franchise scenario without a dummy company code?
    If a dummy company code where did the Franchises perform full financial accounting e.g. in a separate system (integrated with SAP or not?)
    If multiple company codes (per Franchise) how did you manage the Retail elements such as pricing, promotions, assortments, POS integration etc from a distribution chain perspective.
    If there is anything else you think is relevant either from a Retail or Financial perspective I would be happy to hear it.

    Hello Adi,
    we are about to have exactly the same questions. Did you get any answer and that specific point. Essentially on the impact of the master data management.
    We would like to implement Franchise sites with real company code (1 franchise per company code) but we are looking for answers on what may be the impact on :
    - article management (do we have to create a company view per company code of a franchise site?)
    - purchase organisation and distribution channel (do we have to create a purchase organisation / distribution channel per company code of a franchise site?)
    - assortment
    - stock management (stock valuation)
    Did you identifie some limits on the use of franchise site? (complexity of maintenance, limit number on company code and franchise site...)
    Thanks in advance for your feedback
    Lawrence

  • Duplicate Idocs in SAP

    Hi Everyone,
    I'm hoping at least one of you have had this issue and know of a fix. We received a batch of 111 850's (PO's) in our ftp In Folder and then XI created 111 855's to send back to the customer in our ftp Out Folder. In SAP I have 222 idocs from this batch! I can tell the batch duplicated 1 for 1 each order. This happens every once in a while and makes our order folks crazy because they have to Delete all the dupe orders that get in. Does anyone have a direction for me or an answer to this problem. Please let me know if I need to provide some info here.
    Thanks!
    Eddie 
    PS we are running the Seeburger Adapter incase that helps.

    Hey
    >>BUT!! SXMB_MONI shows 636!!! So in XI we see the 106 orders X 6 - Any Ideas???
    are the messages coming from outside your landscape?
    if yes,then its possible that the sender system send the message 6 times.
    its possible that that they send the message to XI and they might have not got the acknowledgment for it so they send it again n again n again.
    Thanx
    Aamir

  • KEFC upload - how to reverse duplicate postings

    Hi Experts
    We have an issue with KEFC upload to COPA.
    We uploaded incorrect file into COPA. In order to reverse the postings we uploaded another file with negative signs.
    But it seems KEFC did not read negative signs and there was again postings with postive values.
    Can you please let us know how can we reverse these double postings. Any suggestion would be highly appreciated.
    Regards,
    Santosh

    Hi Ram
    Thanks, this solved the problem.
    Regards,
    Santosh

  • Validation for duplicate AP invoice

    We would like to prevent duplicate AP invoices from being posted through FB60.   We created an FI validation in OB28 in which the prerequisite = Tcode FB60, and the check is a user exit to check the values in vendor / company code / reference fields and if those 3 fields have the same values as in an existing document, to generate an error message preventing the duplicate document from being posted.
    The above works well for creating new invoices.   However, when we have to make changes to an existing invoice (created through FB60), the system also calls on that validation and generates the error message, even though the only fields we can change on the invoice is payment terms, payment method, payment method supplement and text. 
    Other than modifying the user exit, does anybody know of a better way to do this validation or to prevent duplicate manual invoice from being created?  
    thank you.

    This has already been answered before so extracted part of the reply
    there are two duplicate checks in SAP:
    1. the one for FI documents, this is relevant for all F... postings (but nor for MIRO!)
    this can be turned off or on (in vendor master record) and 6 fields are checked:
    Check Flag for Double Invoices or Credit Memos
    Indicator which means that incoming invoices and credit memos are checked for double entries at the time of entry.
    Use
    Checking Logistics documents
    Firstly, the system checks whether the invoice documents have already been entered in the Logistics invoice verification; the system checks invoices that are incorrect, or invoices that were entered for invoice verification in the background.
    Checking FI documents
    The system then checks whether there are FI or Accounting documents that were created with the original invoice verification or the Logistics verification, and where the relevant criteria are the same.
    Checking Logistics documents
    In checking for duplicate invoices, the system compares the following characteristics by default:
    Vendor
    Currency
    Company code
    Gross amount of the invoice
    Reference document number
    Invoice document date
    If all of these characteristics are the same, the system issues a message that you can customize.
    When you enter credit memos or subsequent adjustments, the system does not check for duplicate invoices.
    Exception: Country-specific solution for Argentina, where invoices and credit memos are checked for duplicate documents.
    No message is issued if you enter a document that has previously been reversed.
    Dependencies
    The system only checks for duplicate invoices in Materials Management if you enter the reference document number upon entering the invoice.
    In Customizing for the Logistics invoice verification, you can specify that the following characteristics should not be checked:
    Reference document number
    Invoice document date
    Company code
    This means that you can increase the likelihood that the system will find a duplicate invoice, because you can reduce the number of characteristics checked.
    Example
    The following document has already been entered and posted:
    Reference document number: 333
    Invoice date: 04/28/00
    Gross invoice amount: 100.00
    Currency: EUR
    Vendor: Spencer
    Company code: Munich
    You have made the following settings in Customizing:
    The field "Reference document number" and "Company code" are deselected, which means that these characteristics will not be checked.
    Now you enter the following document:
    Reference document number: 334
    Invoice date: 04/28/00
    Gross invoice amount: 100.00
    Currency: EUR
    Vendor: Spencer
    Company code: Berlin
    Result
    Because you entered a reference document when you entered the invoice, the system checks for duplicate invoices.
    The reference document number and the company code are different from the invoice entered earlier, but these characteristics are not checked due to the settings you have made in Customizing.
    All other characteristics are the same. As a result, the system issues a message that a duplicate entry has been made.
    If the "Reference document number" had been selected in Customizing, the system would have checked the document and discovered that it was different from the invoice entered earlier, so it would not have issued a message.
    Checking FI documents
    Depending on the entry in the field "Reference", one of the following checks is carried out:
    1. 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
    2. If no 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
    Amount in document currency
    2. the one for LIV.
    this can be customized (as stated above) and is relevant for MIRO (and not for F... postings!).
    Company, Reference and Invoice date
    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

  • How to prevent Duplicate AP Invoices ??

    hi Experts
    End user Raised Po for 1000 quantities but good receipt Po comes one time 100,2nd time 200 ,3time 300 and so on...in between invoice raised for 100 ,2time 200 ... against GRPO..in between End user miss understand or communication some Duplicate bills are raised...
    how i restrict duplicate postings??
    note:(im using sap b1 2007 pl 17)
      Thanks & Regards
         AKR

    Hi
    Try this Stored Procedure in Test Environment.
    if (@object_type = '20' or @object_type = '18')
         and (@transaction_type= 'A' or @transaction_type= 'U')
    begin
         declare @venno as varchar(100)   
         if @object_type = '20'
         begin
              select @venno = NumAtCard
              from opdn
              where docentry =@list_of_cols_val_tab_del
              if 1 != (select count(docentry) from opdn with(nolock) where NumAtCard = @venno)
              begin
                   select @error = 1
                   select @error_message = 'Duplicate vendor ref no in PO Receipts. ! '
              end
         end
         else
         if @object_type = '18'
         begin
              select @venno = NumAtCard
              from opch
              where docentry =@list_of_cols_val_tab_del
              if 1 != (select count(docentry) from opch with(nolock) where NumAtCard = @venno)
              begin
                   select @error = 2
                   select @error_message = 'Duplicate vendor ref no in AP Invoices. ! '
              end
         end
    end
    With Regards
    Balaji Sampath

  • BP Duplicate Check - SIC_INDEX_MAIN

    I am enabling BP duplicate check in SAP CRM6.0.
    Steps followed to activate indexes are:
    1) I created an index for for application BAS, object type BUT000 and index object type BUT000 from spro > Web Application server > Application Server > System Settings > Search Engine Services > Define Object Types for Indexes.
    2) Once I am done with these changes, I don't find the corresponding entry in the SIC_INDEX_MAIN table. 
    Still if I go ahead and try to activate the index, it says 'No entry found in table SIC_INDEX_MAIN' for object BAS and sub object type BUT000'

    Hi,
    Use BadI 'CRM_MKTLIST_BADI' and implement method IF_EX_CRM_MKTLIST_BADI~DUPLICATE_CHECK. Inside write down following code:
    DATA: lv_duplicates_found    TYPE crmt_mktlist_duplicate.
    Perform Duplicate Check.
      CALL FUNCTION 'CRM_MKTLIST_DUP_CHECK_INT'
        EXPORTING
          it_staging_adr      = it_mktlist_adr
          it_staging_per      = it_mktlist_per
          it_staging_org      = it_mktlist_org
        IMPORTING
          et_staging_dup      = et_duplicates
          ev_duplicates_found = lv_duplicates_found
          ev_error            = ev_error
          et_message          = et_message.
      IF lv_duplicates_found IS NOT INITIAL.
        ev_error = gc_true.
      ENDIF.
    You may refer class 'CL_DEF_IM_CRM_MKTLIST_BADI' for more reference.
    Regards,
    Shikha

  • Standalone (J2SE) adapter - axis SOAP adapter - issue duplicate messages

    All,
    Perhaps you can help me. I've setup a scenario where an standalone (J2SE) adapter sends a file to SAP XI channel, configured on the central adapter engine, of type SOAP configured to use Axis servlet.
    The connection is setup and the standalone adapter channel logs thre response from the SOAP channel which reads HTTP error 500, indicating a duplicate message.
    SAP has identified this problem and proposes in the FAQ for Axis (note 1039369) to set on the SOAP channel module CallSapAdapter property ignoreDuplicate to true in the module processor.
    I've implemented this as suggested however found the problem persists. I'm still receiving an HTTP 500 error.
    Your help is much appreciated solving this problem.
    Thanks
    Harald

    As there was a bugfix recently, make sure that you have installed the latest patch.
    If this does not work, open an OSS ticket for this issue.
    Stefan

Maybe you are looking for