<?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: Row level locking - Lock objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369543#M1839631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, for example, this behavior allow to lock an object during creation...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jun 2014 08:42:09 GMT</pubDate>
    <dc:creator>RaymondGiuseppi</dc:creator>
    <dc:date>2014-06-06T08:42:09Z</dc:date>
    <item>
      <title>Row level locking - Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369539#M1839627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am aware that we can do row level locking by creating a separate lock object for the table. I am calling enqueue_**** FM to call lock object created for my custom table. I am passing lock parameters &amp;amp; see that when a record does not exist in my custom table still SUBRC returned is 0 by lock FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my understanding, SUBRC should not be 0 as the record does not exist in table to be locked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please share your valuable inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Aspire&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 18:13:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369539#M1839627</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-05T18:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Row level locking - Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369540#M1839628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note that i have created lock parameters same as key fields for my custom table ideally to lock a particular row by passing the key fields. I am also passing MANDT during my ENQUEUE_**** FM call. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;Is it Standard functionality that only if record exists, then it will be checked for locking. If record does not exist, then SAP does not set SUBRC other than 0?&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In my case one of the key fields for my custom table is contract account. I am passing junk data as 999999***... for Cont Account in lock parameter along with other fields &amp;amp; still see that SUBRC after FM call is set as 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Aspire&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 18:16:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369540#M1839628</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-05T18:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Row level locking - Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369541#M1839629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I read many threads where i can see that they are discussing about feasibility to do row level locking in abap. I am getting this logic &amp;amp; interested to only know,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;why SUBRC comes as '0' even if the key parameters of the database record don't exist?&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 19:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369541#M1839629</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-05T19:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Row level locking - Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369542#M1839630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Aspire,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most important thing to know is &lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #0000ff; text-decoration: underline;"&gt;&lt;EM&gt;SAP Locking mechanism doesn't physically lock the record, but does it logically.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does not matter what values you pass to the ENQUEUE module params, the lock mechanism uses them to build a logical key and stores it in the lock table. Further lock requests are checked against this key.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;I am passing junk data as 999999***... for Cont Account in lock parameter along with other fields &amp;amp; still see that SUBRC after FM call is set as 0.&lt;/P&gt;




&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try doing this -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Pass the junk values to the enqueue module &amp;amp; set the lock mode as "write"&amp;nbsp; - (E)xclusive.&lt;/LI&gt;&lt;LI&gt;After the ENQUEUE module has been executed successfully, go to SM12(trxn). You will see the lock entry.&lt;/LI&gt;&lt;LI&gt;In the sample code, try to set the 'E' lock again using the same params. You'll get an exception now! Why?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The answer to the "why" is the logical lock mechanism used by SAP &lt;SPAN __jive_emoticon_name="cool" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/877/images/emoticons/cool.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 20:00:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369542#M1839630</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2014-06-05T20:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Row level locking - Lock objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369543#M1839631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, for example, this behavior allow to lock an object during creation...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 08:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/row-level-locking-lock-objects/m-p/10369543#M1839631</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2014-06-06T08:42:09Z</dc:date>
    </item>
  </channel>
</rss>

