09-25-2008 6:58 PM
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
09-25-2008 7:31 PM
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.
Regards,
Naimesh Patel
09-25-2008 7:28 PM
what do you exactly mean by batch: batch upload program or material batch?
09-25-2008 7:31 PM
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.
Regards,
Naimesh Patel
09-26-2008 6:19 AM
i want to know whether the material batch is locked or unlocked before i start updating the batch. I would like to know this before I send the control to BAPI to update the material batch. If it is locked i wouldn't send the control to BAPI and wait till it is unlocked