‎2010 Mar 06 12:12 PM
Hi,
I have a report where I am updating the pickup date and time for a shipment in LIKP using FM 'WS_DELIVERY_UPDATE_2'.
The requirement is , I want to check each delivery before updating LIKP.
i.e if some user has opened a delivery in VL02n (lock object), then those I need to find those object before calling the FM 'WS_DELIVERY_UPDATE_2'
Any idea how to achieve this?
Thanks
‎2010 Mar 06 12:25 PM
Hi
You dont need to worry about this, the FM has already taken care about it.
Just execute this FM and in another Session open delivery document you will get the Message.
in SE37 Just search for ENQUE key word and you will find this FM
574 CALL FUNCTION 'ENQUEUE_EVVBLKE' " At line number 574
EXPORTING
vbeln = p_vbak-vbeln
EXCEPTIONS
foreign_lock = 1 " Means P_VBAK-VBELN is locked by another User
system_failure = 2.Cheerz
Ram
‎2010 Mar 06 12:25 PM
Hi
You dont need to worry about this, the FM has already taken care about it.
Just execute this FM and in another Session open delivery document you will get the Message.
in SE37 Just search for ENQUE key word and you will find this FM
574 CALL FUNCTION 'ENQUEUE_EVVBLKE' " At line number 574
EXPORTING
vbeln = p_vbak-vbeln
EXCEPTIONS
foreign_lock = 1 " Means P_VBAK-VBELN is locked by another User
system_failure = 2.Cheerz
Ram
‎2010 Mar 06 12:29 PM
Hello Ram,
Yes you are right , the FM already takes care of this. But my requirement is to find out the delivery's which are locked before I update the table and I want to avoid the error msg which is displayed when the object is locked.
Any idea how it can be achieved?
thanks
Quresh
‎2010 Mar 06 12:32 PM
Hi,
Then use this FM
Put a break point at the FM 'ENQUEUE_EVVBLKE'
and open a billing document in VL02N and in other session execute the Same
document number with the FM
call function 'ENQUEUE_EVVBLKE'
exporting
vbeln = if_delivery " Your Delivery Document Number
exceptions
foreign_lock = 2 " Means already locked by other User
the user ID is given back to you in "SY-MSGV
" and Give your Own message
system_failure = 3.Cheerz
Ram
‎2010 Mar 06 12:39 PM
‎2010 Apr 12 7:12 AM
Hi All,
Looking into the import parameters, the lock objects can only lock specific records, not the whole table. I want to prevent insertion of records while the program is selecting from the table. Is there a way to do that? Thanks.
Regards,
Joyie