Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Use of SELECT SINGLE FOR UPDATE

Hello,

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.

Any ideas?

Thanks,

Chris.

Former Member
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.

Source: [http://help.sap.com/abapdocu_70/en/ABAPSELECT_CLAUSE_LINES.htm#&ABAP_ALTERNATIVE_1@1@].

This DB lock exists till the end of the current DB LUW & is released at the end.

BR,

Suhas

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question