<?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: Lock Objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095933#M436366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muttu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you are clear with the part of creating the lock object,  the rest involves locking the desired table through this lock object. This is achieved by creating a report in se38. Call the function Enqueue_&amp;lt;lockobject&amp;gt;, give your table name, if you want to lock the entire table give the names of key fields of the table in the function module and give their values as blank. If you want to lock a particular record of the table, give the values of that record.&lt;/P&gt;&lt;P&gt;After coming out of the function, check with the following stmnt:&lt;/P&gt;&lt;P&gt;if sy-subrc = 0&lt;/P&gt;&lt;P&gt;   &amp;lt;your table is locked and you can work on it&amp;gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;   &amp;lt;using the wait statement , wait for few seconds and again check whether the table is locked or not&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you have finished working on the table, release your lock by using the FM Dequeue_&amp;lt;lockobject&amp;gt;.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Apr 2007 10:35:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-16T10:35:10Z</dc:date>
    <item>
      <title>Lock Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095928#M436361</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;  I knew a little bit about lock objects .  Suppose I have created a Z table. For this table How can I create a Lock Objects ? . In which situtaion we create a lock objects ? Can I have any real time example ? because sap itself maintain luw.&lt;/P&gt;&lt;P&gt;so,What  is the use of lock objects ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye,&lt;/P&gt;&lt;P&gt;Muttu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:03:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095928#M436361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095929#M436362</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;&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;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;GO TO SE11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the radio button "Lock object"..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give the name starts with EZ or EY..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: EYTEST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Press Create button..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Give the short description..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: Lock object for table ZTABLE..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the tables tab..Give the table name..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: ZTABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save and generate..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your lock object is now created..You can see the LOCK MODULES..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the menu ..GOTO -&amp;gt; LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lock objects: &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm" target="test_blank"&gt;http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm&lt;/A&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;&lt;/P&gt;&lt;P&gt;Match Code Objects:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm" target="test_blank"&gt;http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm&lt;/A&gt;&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;Priyanka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:06:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095929#M436362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095930#M436363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check these links -&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3036414"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2912662"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3005172"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:07:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095930#M436363</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-04-16T08:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095931#M436364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;lock object are used to lock the table you are updating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you ahev locked the table no1else can update or change the entries in the table your program is working ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence to make sure no data chane happens, its is always recommended to lock the tables before updating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can creat a lock for table in se11, give the name EZ(table name). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in program u can lock the table with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function ENQUEUE_(lock object craete above)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and unlock the table after updating using&lt;/P&gt;&lt;P&gt;call function DENQUEUE_(lock object craete above)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:10:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095931#M436364</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095932#M436365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Priyanak,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Thank you very much. How can and where can we use these function moudules in the program ? And what type of code we write in the FM ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Can you give any example  like you have given previously .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By,&lt;/P&gt;&lt;P&gt;Muttu,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095932#M436365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095933#M436366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Muttu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you are clear with the part of creating the lock object,  the rest involves locking the desired table through this lock object. This is achieved by creating a report in se38. Call the function Enqueue_&amp;lt;lockobject&amp;gt;, give your table name, if you want to lock the entire table give the names of key fields of the table in the function module and give their values as blank. If you want to lock a particular record of the table, give the values of that record.&lt;/P&gt;&lt;P&gt;After coming out of the function, check with the following stmnt:&lt;/P&gt;&lt;P&gt;if sy-subrc = 0&lt;/P&gt;&lt;P&gt;   &amp;lt;your table is locked and you can work on it&amp;gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;   &amp;lt;using the wait statement , wait for few seconds and again check whether the table is locked or not&amp;gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After you have finished working on the table, release your lock by using the FM Dequeue_&amp;lt;lockobject&amp;gt;.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 10:35:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095933#M436366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T10:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Lock Objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095934#M436367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The R/3 System synchronizes simultaneous access of several users to the same data records with a lock mechanism. When interactive transactions are programmed, locks are set and released by calling function modules (see Function Modules for Lock Requests). These function modules are automatically generated from the definition of lock objects in the ABAP Dictionary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chk out these links, u will find lot of info:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/7b/f9813712f7434be10000009b38f8cf/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/7b/f9813712f7434be10000009b38f8cf/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm" target="test_blank"&gt;http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm&lt;/A&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;keerthi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 10:46:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lock-objects/m-p/2095934#M436367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T10:46:58Z</dc:date>
    </item>
  </channel>
</rss>

