Use of SELECT SINGLE FOR UPDATE
Am I missing something with FOR UPDATE addition in Open SQL? When I use it I can't get a lock to appear to SM12. For example, if I select a single record for update from table EKKO it's still possible to effect a normal MEPO update of the releavnt purchase order even before a COMMIT WORK command in my code.
Suhas Saha replied
This phrase from the SAP documentation should answer your query :
An exclusive lock can be set for this line using the FOR UPDATE addition when a single line is being read with SINGLE.
This DB lock exists till the end of the current DB LUW & is released at the end.