‎2007 Jan 18 1:23 PM
Hi guys! I'm currently having a problem....
I have a program that creates a production order, after it goes and creates a notification to that order.
The problem I'm having is that sometimes, when the program creates the notification, it gives the error that the material/plant data is blocked, so how could I verify if that data is blocked so the program could wait until the data is unblocked so it can continue and create the notification?
Thanx
Jesus
‎2007 Jan 18 1:33 PM
‎2007 Jan 18 1:41 PM
Hey Rich! thanx for your answer!!
but I don't know if I'm getting it straight.... my problem is that the program needs to wait until the material is UNLOCKED so it can continue, and if I'm getting what you said, then what I'll be doing is LOCKING the material, and that's not what I want, it's actually the opposite of what I need
please, do explain a little better...
thanx again!
Jesus
‎2007 Jan 18 2:40 PM
Hi guys! thanx to rich that gave a hand there... I solved my problem using the FM ENQUEUE_READ to check if the material is locked
Jesus
‎2007 Jan 18 2:53 PM
Good, that will work too, sort of. The reason that I was pointing you to the lock objects, is because they will allow you to wait for the lock to be released, then you know that your program can continue, with using the ENQUEUE_READ, there is no mechisum for WAITING(unless you create this your self using a WHILE loop).
You are right, if you use the lock object is will apply a lock, but you can immediately remove the lock after the system waits for the previous lock to unlock and applies your lock.( I hope that I didn't confused you here ).
My point is that when you used the ENQUEUE_READ function module, the system is checking for the locking, but it is not waiting for it to be released.
Regards,
Rich Heilman
‎2007 Jan 18 3:09 PM
hey rich! i got it now....
however, I used ENQUEUE_READ inside DO ENDDO, so it can wait for it to be locked.
thank you anyway man, you were very helpful!
Jesus