02-12-2009 8:29 AM
Hi all,
Please help me working with this enqueue/dequeue command. What I'm trying to do is to lock a Service Order. My requirement is to do a BDC for the Service Order Settlement Rule. So after hitting SAVE, a secondary process will be kicked off to perform my BDC for the same order. Now what Im doubting is that what if user re-enter the same Service Order again so quick. So my BDC program will not be performed immediately since it will be locked by the usser.
So my idea is to lock it first while my BDC program is still running. Any help please? Thanks.
02-12-2009 9:07 AM
If I am not wrong, you are doing two BDCs for same order. If yes, you can use the synchonus update in the first BDC, then the order will be available for the second BDC. No need to look the order.
02-12-2009 8:42 AM
After hitting SAVE-button, and within the second program, do a check if the service order is locked or not. If still locked, built in a WAIT and try again until object is no longer locked.
02-12-2009 9:07 AM
If I am not wrong, you are doing two BDCs for same order. If yes, you can use the synchonus update in the first BDC, then the order will be available for the second BDC. No need to look the order.
02-12-2009 10:45 AM
Nope. Just 1 BDC -on my 2nd program only. Or to make it simple, I have modified ZXWOCU07 (IWO10009) to perform/kick off a call function( this is being triggered after hitting on SAVE). And this FM contains my checking if SO is now open for change then do the do the BDC.
What I'm thinking is to lock first the SO to block any user from accessing that SO, so it will do the BDC first. But I'm not yet familiar with the locking/unlocking of objects. Please help me on how to use enqueue or locking object.
02-12-2009 10:53 AM
If you are trying the apply BDC on same SO for which the SAVE event is triggered.. then you can't do this.. as the SO would be locked while in the SAVE event..technically this is wrong.. how can you update an order in the SAVE event of the order... if the SO is different then you can do the BDC.
There is no need to lock the SO before BDC, the BDC will throw an error it is already locked by some other user...
02-13-2009 3:06 AM
But what if we send this BDC in the background or in new task? Then perform some checking if SO saving already completed before proceeding to BDC. I think this one is possible. What I'm worrying about is what if the user re-enters the SO again so quickly. That's why I'm thinking for possible catch for this concern. Any other bright ides other than the one I'm thinking?
12-17-2013 9:37 AM
hi Ayem,
I am facing the same problem. My BDC for auto settling (KO88) cannot be executed and the error shown is that the object is locked. If you solved the problem can you please share the solution.
Thanks and regards,
Snehal Chaudhary.
12-17-2013 11:28 AM
Hi,
Use WAIT UP TO n SECONDS. after one complete Save Cycle of BDC.
Thanks,
Ams K.
12-18-2013 10:42 AM
hi all,
WAIT UPTO did not solve the problem. However I used dequeue_esorder FM.
it unlocked the object.
Thanks Ams K
Regards,
Snehal Chaudhary.