I have tried using the FM ENQUE_DELETE but I keep on not getting the expected result to delete the lock for some table entries.
I noticed that there are different kind of locks and the program that locked those table entries is using lock type 'E'.
Could I set the lock type to 'S' (Shared) so that it is possible for the first program to "lock" the table entries but once the second program is run, it can delete the table lock?
The program which first locks the table has usually the type set up. If it is not Your program, You surely are not able and allowed to modify the standard locktype, which was set up, at runtime. As far as I know.
If it is Your program, then You can self define, which lock type You can use.
will tell You about the types and a code sample in the link should provide all information, which You might need.