Mentor SAP
Requesting a lock from a program is a communication step with lock administration. If the program sets locks for multiple objects, the communication effort occurs more than once.

 

By using the lock container, technical effort required for communication with lock administration can be reduced. To do this, set the _collect = X parameter whenever a lock module is called. The effect is that the respective lock requests are stored in the local container for subsequent collective dispatch.

 

The contents of the lock container can be dispatched to lock management by using the FLUSH_ENQUEUE function module.

 

If all the lock requests are successfully issued, the system deletes the entire content of the lock container. If one of the locks in a container cannot be set, the FLUSH_ENQUEUE function module triggers the FOREIGN_LOCK exception. When the FOREIGN_LOCK exception is triggered, none of the locks registered in the container are set, and the container content remains complete for further dispatch attempts.

 

Hint: Use the RESET_ENQUEUE function module to delete the contents of the lock container.