‎2007 Nov 19 3:52 PM
hi
i want to write code for below
i am working on 1 report in that report suppose i am updating inbound delivey no data at that time suppose some one is working on same inbound delivery no
<b>The System must block
the users in case if they are working on the same
Inbound Delivery</b>
thank in advanced
‎2007 Nov 19 9:18 PM
Hi,
Whenever someone changes a delivery (e.g. VL32N) a lock is created - lock object EVVBLKE.
Therefore you need to do the same in your program:
create lock (function module ENQUEUE_EVVBLKE) for the delivery you are working with
if you can set the lock, you can update the delivery (because no one else is updating it), if you can't set the lock (exception foreign_lock) then that delivery is currently processed by someone else and you just issue an error to the user that the delivery is locked.
If you get the lock, don't forget to unlock the delivery once your update is done. (function module DEQUEUE_EVVBLKE)
Hope that helps,
Michael
‎2007 Nov 20 5:30 AM