Record locking is a basic functionality of an RDBMS. This is how we do it within JDE in business functions.
The API’s used for the cause are
As this is very simple to use, given are the parameters with comments.
Download the following files to view it in action.