<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Select single for update not creating lock on entry in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779863#M1308122</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't use this variant, so I'm not entirely sure what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think this will create a lock at the database level, not an SAP lock. To lock the record, you should use the ENQUEUE functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jul 2009 16:37:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-06T16:37:17Z</dc:date>
    <item>
      <title>Select single for update not creating lock on entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779861#M1308120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to update an entry from MARA table so what ii did is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single for update *   from mara where matnr = 'ZYS'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The for update is supposed to create a lock  for me and the the lock is released after the commit or roll back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm running this prg in debug mode and after the statment &lt;/P&gt;&lt;P&gt;select single for update *   from mara where matnr = 'ZYS''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I opened MM02 for this material and could change the data which i'm not supposed to be as there is lock on this particular mater from single for update statemnt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I even tried from other program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single  *   from mara where matnr = 'ZYS'. in debug mode and it returned a sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i don't see a lock in SM12 FOR SELECT * FOR UPDATE.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone clarify on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:29:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779861#M1308120</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-06T16:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Select single for update not creating lock on entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779862#M1308121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using the FOR UPDATE,  you are applying a lock at the DB level, not the application level.  I believe that MM02 will always use the lock object to put locks on material master tables. You can only see lock object locks in SM12, this is why you don't see them when using the FOR UPDATE.  I would suggest using a lock object for the material master tables instead of the FOR UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find the lock object via SE11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:35:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779862#M1308121</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2009-07-06T16:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Select single for update not creating lock on entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779863#M1308122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't use this variant, so I'm not entirely sure what happens.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think this will create a lock at the database level, not an SAP lock. To lock the record, you should use the ENQUEUE functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:37:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779863#M1308122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-06T16:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Select single for update not creating lock on entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779864#M1308123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the select/Insert/update/delete statement on the MARA table for Matnr will not lock the Material number from accessing through MM02 tcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To lock the Matnr you need to call the ENQUEUE and DEQUEUE FM .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search the SCN for ENQUEUE and DEQUEUE / Lock objects..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:38:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779864#M1308123</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-06T16:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Select single for update not creating lock on entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779865#M1308124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I knew we can create a lock object but thought to give a shot without creating lock object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i'm just curious to know when we can use select * for update &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F1 Help says select * for update creates an E type lock- which will prevent other locks(X AND S type locks) overwriting or even reading that entry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can someone throw some light DB lock and SAP Lock ( is this same as SAP LUW and DB LUW) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:42:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-not-creating-lock-on-entry/m-p/5779865#M1308124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-06T16:42:49Z</dc:date>
    </item>
  </channel>
</rss>

