2011 May 06 5:53 PM
Hello All,
This may be a basic question for the experts, but to clear the confusion I am putting it infront of you.
Scenario :-
Let us assume that the standard order save user exit "USEREXIT_SAVE_DOCUMENT_PREPARE" is being used to populate/modify some data in the z-table which has fields like VBELN, POSNR, DATE, TIME etc.,
In the above case,
1) Do we really need to lock the z-table using an Enqueue lock objects with the row level parameters defined ?
(or)
2) Do we directly populate the database table without any lock object under the assumption that standard SAP lock object ENQUEUE_EVVBAKE takes care of locking the z-table as well because z-table has the VBELN as the parameter ??
Please comment / clarify my confusion. Appreciate your <removed by moderator> response on this.
Thanks,
Babu Kilari
Edited by: Thomas Zloch on May 7, 2011 1:20 PM - urgency reduced
Hello All,
This may be a basic question for the experts, but to clear the confusion I am putting it infront of you.
Scenario :-
Let us assume that the standard order save user exit "USEREXIT_SAVE_DOCUMENT_PREPARE" is being used to populate/modify some data in the z-table which has fields like VBELN, POSNR, DATE, TIME etc.,
In the above case,
1) Do we really need to lock the z-table using an Enqueue lock objects with the row level parameters defined ?
(or)
2) Do we directly populate the database table without any lock object under the assumption that standard SAP lock object ENQUEUE_EVVBAKE takes care of locking the z-table as well because z-table has the VBELN as the parameter ??
Please comment / clarify my confusion. Appreciate your <removed by moderator> response on this.
Thanks,
Babu Kilari
Edited by: Thomas Zloch on May 7, 2011 1:20 PM - urgency reduced
2011 May 06 6:31 PM
1) It is upto you. How sensible is that information and do you really want to lock down the entries? if yes, go ahead
2) Again, it is upto you. SAP Lockobject doesnt lock Ztables.
2011 May 06 7:20 PM
Standard locks doesn't lock ztables and locks are specific to table, not fields. You are the best person to decide if a lock is required or not, based on your requirement and how frequently data is modified. You can go ahead with lock, no harm.
Cheers.
S. Verma
2011 May 06 10:46 PM
Hi Babu,
if the Z table has the VBELN in the key and the only process updating this table is the USEREXIT_SAVE_DOCUMENT_PREPARE, then you do not need any additional locking for this table.
But you should put this updating into a function module and call this function IN UPDATE TASK in the user exit.
Then you can be sure, that the update take place with the successful save of the sales document, any errors will roll it back together with order data. Database consistency is given.
Regards,
Clemens
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |