<?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: LOCKING HELP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916878#M381282</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;    Adding to the above answer we can even lock tables also.that is lock can b applied to fields r tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Mar 2007 10:34:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-01T10:34:48Z</dc:date>
    <item>
      <title>LOCKING HELP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916875#M381279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PLZ GIMME A PROG WHICH EXPLAINS D LOCKING TECHNIQUE USED IN ABAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PLZ ALSO PROVIDE A DETAILED EXPLANATION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2007 10:27:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916875#M381279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-01T10:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: LOCKING HELP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916876#M381280</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;Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP Provide three type of Lock objects.  &lt;/P&gt;&lt;P&gt;- Read Lock(Shared Locked) &lt;/P&gt;&lt;P&gt;   protects read access to an object. The read lock allows other  transactions read access but not write access to  &lt;/P&gt;&lt;P&gt;   the locked area of  the table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Write Lock(exclusive lock) &lt;/P&gt;&lt;P&gt;   protects write access to an object. The write lock allows other  transactions neither read nor write access to  &lt;/P&gt;&lt;P&gt;    the locked area of the  table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Enhanced write lock (exclusive lock without cumulating) &lt;/P&gt;&lt;P&gt;  works like a write lock except that the enhanced write lock also  protects from further accesses from the  &lt;/P&gt;&lt;P&gt;  same transaction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technicaly: &lt;/P&gt;&lt;P&gt;When you create a lock object System automatically creat two function module. &lt;/P&gt;&lt;P&gt;1. ENQUEUE_&amp;lt;Lockobject name&amp;gt;. to insert the object in a queue. &lt;/P&gt;&lt;P&gt;2. DEQUEUE_&amp;lt;Lockobject name&amp;gt;. To remove the object is being queued through above FM. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have to use these function module in your program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this link for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sruthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2007 10:30:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916876#M381280</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-01T10:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: LOCKING HELP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916877#M381281</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;tables:vbak.&lt;/P&gt;&lt;P&gt;call function 'ENQUEUE_EZLOCK3'&lt;/P&gt;&lt;P&gt; exporting&lt;/P&gt;&lt;P&gt;   mode_vbak            = 'E'&lt;/P&gt;&lt;P&gt;   mandt                = sy-mandt&lt;/P&gt;&lt;P&gt;   vbeln                = vbak-vbeln&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  X_VBELN              = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  _SCOPE               = '2'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  _WAIT                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  _COLLECT             = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FOREIGN_LOCK         = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  SYSTEM_FAILURE       = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS               = 3&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here we are locking vbeln field in vabk table by using FM&lt;/P&gt;&lt;P&gt;'ENQUEUE_EZLOCK3.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2007 10:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916877#M381281</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-01T10:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: LOCKING HELP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916878#M381282</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;    Adding to the above answer we can even lock tables also.that is lock can b applied to fields r tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2007 10:34:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916878#M381282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-01T10:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: LOCKING HELP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916879#M381283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assume that you are trying to update a sales order through a transaction.&lt;/P&gt;&lt;P&gt;At the same time, if somebody else is also trying to update the same Order, then it may lead to inconsistensies or deadlock situations. To avoid such situations, we use the locking mechanism.&lt;/P&gt;&lt;P&gt;IN pretty simple words, we lock the ORDER which we are editing and avoid all other users from editing the same Order. we will not unlock it until we finish out updating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create our own locks, you should create a LOCK OBJECT in SE11 transaction.&lt;/P&gt;&lt;P&gt;Creating a lock objectt would give your two function modules , one for locking and the other for unlocking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your program , this must be the skeleton.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'ENQUE&lt;STRONG&gt;&amp;lt;your lock object&lt;/STRONG&gt;name'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;do all the updates&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'DEQUE&lt;STRONG&gt;&amp;lt;your lock object&lt;/STRONG&gt;name'&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;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2007 10:35:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-help/m-p/1916879#M381283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-01T10:35:33Z</dc:date>
    </item>
  </channel>
</rss>

