2010 Sep 15 11:28 AM
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.
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.
2010 Sep 15 11:47 AM
2010 Sep 15 12:45 PM
2010 Sep 15 2:44 PM
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@]
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |