<?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 locking database records in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618038#M601004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i want to lock the data base table recors while i am changin in one transaction....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jul 2007 04:01:11 GMT</pubDate>
    <dc:creator>former_member799868</dc:creator>
    <dc:date>2007-07-30T04:01:11Z</dc:date>
    <item>
      <title>locking database records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618038#M601004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i want to lock the data base table recors while i am changin in one transaction....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 04:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618038#M601004</guid>
      <dc:creator>former_member799868</dc:creator>
      <dc:date>2007-07-30T04:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: locking database records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618039#M601005</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;Create a lock object in SE11 on the table .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it automatically creates two function module with the name &lt;/P&gt;&lt;P&gt;ENQUEUE_lockobjectname  and DEQUEUE_lockobjectname . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call Enqueue function module to lock the database records &lt;/P&gt;&lt;P&gt;and Dequeue function module to release the lock . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward all helpfull answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 04:02:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618039#M601005</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T04:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: locking database records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618040#M601006</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;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;This will autogenerate two function modules,Enqueue &amp;lt; lock object &amp;gt; and Dequeue &amp;lt; lock object &amp;gt;&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;Eg:&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;&amp;lt;b&amp;gt;TO LOCK&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute CALL FUNCTION statement&lt;/P&gt;&lt;P&gt;CALL FUNCTION " ENQUEUE &amp;lt;lock object "&amp;gt;&lt;/P&gt;&lt;P&gt;EXPORTING . . .&lt;/P&gt;&lt;P&gt;EXCEPTIONS . . .&lt;/P&gt;&lt;P&gt;CASE SY-SUBRC.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;TO UNLOCK&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Execute the CALL FUNCTION statement&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DEQUEUE &amp;lt;lock object &amp;gt;'&lt;/P&gt;&lt;P&gt;EXPORTING . . &lt;/P&gt;&lt;P&gt;It is important to unlock the entry so others can update it.&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;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 04:43:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618040#M601006</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T04:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: locking database records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618041#M601007</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;Close the Thread if it solved ur Problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Padmam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 04:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618041#M601007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T04:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: locking database records</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618042#M601008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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="3151736"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 04:47:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/locking-database-records/m-p/2618042#M601008</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T04:47:36Z</dc:date>
    </item>
  </channel>
</rss>

