determine batch is locked or not
how can i determine if a batch is locked (ie it is in change mode) . Before i update the batch i would like to know if it is locked or not , so that i can wait till it is unlocked and then update
Naimesh Patel replied
You can use the Enquequ Function of the Batch to try to lock the Batch. If you are successfully able to lock it that means that Batch is not locked by any other user.
Enquequ FM: ENQUEUE_EMMCH1E
Dequequ FM: DEQUEUE_EMMCH1E
You need to pass Material and batch to set and release the lock using these FM.
You can try to lock using this FM in a loop (with Some predefined number ... to avoid the deadlock). You can use the dequeue FM after the Enqueue to release the lock.