You use a local lock container to collect lock requests and lock releases. You can then send them together by calling the FLUSH_ENQUEUE function module.
This has two advantages over sending the lock requests directly:
The system empties the local lock container if all the collected lock requests can be executed. Otherwise its contents remain unchanged. The following figure explains the relations between an ABAP program, the local lock container and the lock server.
The local lock container can be emptied by calling the RESET_ENQUEUE function module. The system deletes all the collected lock requests or lock releases. The local lock container is automatically emptied when the corresponding internal session is ended.
Lock requests and lock releases are managed together in the local lock container. When these collected assignments are sent, the system sends the lock requests first of all. If all the requested locks have already been assigned, the system sends the lock releases.
The lock requests and lock releases are not adjusted in the local lock container. The order in which the individual requests are written in the local lock container is of no importance.