<?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 what is lock table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008016#M957494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is lock table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jun 2008 04:19:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-12T04:19:32Z</dc:date>
    <item>
      <title>what is lock table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008016#M957494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is lock table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 04:19:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008016#M957494</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T04:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: what is lock table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008017#M957495</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;1)Go to se11 transaction.&lt;/P&gt;&lt;P&gt;2)Click on lock object radio button and give a lock object name starting with 'E'.For example 'ESAMPLE'.Click CREATE.&lt;/P&gt;&lt;P&gt;3)In the TABLE tab, you can give the table name for which you require a lock.In the LOCK PARAMETERS tab,you can give the table fields based on which the table should be locked.&lt;/P&gt;&lt;P&gt;4)Call a function module in your program ENQUEUE_lockobjectname to obtain a lock on the required table.In our example the FM will be ENQUEUE_ESAMPLE.&lt;/P&gt;&lt;P&gt;5)To release the lock on the table,call the function module DEQUEUE_lockobjectname.In our example the FM will be DEQUEUE_ESAMPLE.&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;&lt;STRONG&gt;testing the locking of tables...&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: varkey like rstable-varkey.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;varkey = sy-mandt.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;locking the tables............................&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'ENQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MODE_RSTABLE = 'E'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;tabname = 'MARA'&lt;/P&gt;&lt;P&gt;varkey = varkey&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;X_TABNAME = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;X_VARKEY = ' '&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 = 'X'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;exceptions&lt;/P&gt;&lt;P&gt;foreign_lock = 1&lt;/P&gt;&lt;P&gt;system_failure = 2&lt;/P&gt;&lt;P&gt;others = 3&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;case sy-subrc.&lt;/P&gt;&lt;P&gt;when 1.&lt;/P&gt;&lt;P&gt;message i184(bctrain) with 'Foreignlock'.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;message i184(bctrain) with 'system failure'.&lt;/P&gt;&lt;P&gt;when 0.&lt;/P&gt;&lt;P&gt;message i184(bctrain) with 'success'.&lt;/P&gt;&lt;P&gt;when others.&lt;/P&gt;&lt;P&gt;message i184(bctrain) with 'others'.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;unlocking the table...............&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;call function 'DEQUEUE_E_TABLE'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MODE_RSTABLE = 'E'&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;tabname = 'MARA'&lt;/P&gt;&lt;P&gt;varkey = varkey&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;X_TABNAME = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;X_VARKEY = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;_SCOPE = '3'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;_SYNCHRON = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;_COLLECT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;preet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:21 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 04:37:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008017#M957495</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T04:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: what is lock table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008018#M957496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudheer, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Search in the Forum threads &lt;/P&gt;&lt;P&gt;u will find many...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Karan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 04:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008018#M957496</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T04:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: what is lock table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008019#M957497</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;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Lock table&lt;/STRONG&gt;:This is nothing but locking the Database Table for&lt;/P&gt;&lt;P&gt;Doing some opertaions like inserting data or changing data entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Lock objects are used in SAP to avoid the inconsistancy at the time of data is being insert/change into database.&lt;/STRONG&gt; &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;&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;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;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:22 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 04:51:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008019#M957497</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T04:51:35Z</dc:date>
    </item>
    <item>
      <title>Re: what is lock table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008020#M957498</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;Two or more linked database tables can share a common lock.&lt;/P&gt;&lt;P&gt;The lock, to be applied, is specified in the lock objects in foreign key relationships. When a lock object is created two function modules are automatically generated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create a lock object, a function module with the prefix ENQUEUE_ is created to set the lock and a function module with the prefix DEQUEUE_ is created to remove the lock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lock are useful to prevent inconsistent update of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:22 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 04:58:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008020#M957498</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T04:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: what is lock table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008021#M957499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudheer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use SDN's search function for this type of questions. There are a lot of similar questions and there is no need to ask them once again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will lock this thread&lt;/P&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;Jan Stallkamp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 08:17:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/what-is-lock-table/m-p/4008021#M957499</guid>
      <dc:creator>JanStallkamp</dc:creator>
      <dc:date>2008-06-12T08:17:43Z</dc:date>
    </item>
  </channel>
</rss>

