<?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: Concurrent update problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/concurrent-update-problem/m-p/3063704#M725878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gary,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to create a lock object for the same.&lt;/P&gt;&lt;P&gt;Goto SE11 &amp;amp; type the name for lock object.&lt;/P&gt;&lt;P&gt;CREATE&lt;/P&gt;&lt;P&gt;enter the primary key field &amp;amp; table names&lt;/P&gt;&lt;P&gt;Activate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLick GOTO LOCK MODULES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will find to FM&lt;/P&gt;&lt;P&gt;ENQUEUE_...  --&amp;gt; Used for locking the record&lt;/P&gt;&lt;P&gt;DEQUEUE_...  --&amp;gt; Used for unlocking the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Nov 2007 04:06:27 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-16T04:06:27Z</dc:date>
    <item>
      <title>Concurrent update problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concurrent-update-problem/m-p/3063701#M725875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any way to counter measure the issue where 2 people at the same time update the database? Is there any code that able to identify who done the job first and update the table. Help please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 02:07:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concurrent-update-problem/m-p/3063701#M725875</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T02:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrent update problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concurrent-update-problem/m-p/3063702#M725876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to ensure that nobody can update the database while one updation is going on, lock facility is provided by SAP...&lt;/P&gt;&lt;P&gt;in the standard tables it is by default there,,, but for custom table we need to design a lock for the object.. which you can design through SE11....&lt;/P&gt;&lt;P&gt;to keep track of the updation i.e. update time n responsible person.. you can add 2 fields in your database table to keep track of same.. whenever any update is done on the records capture the sy-datum n sy-uname in these fields...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:38:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concurrent-update-problem/m-p/3063702#M725876</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrent update problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concurrent-update-problem/m-p/3063703#M725877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gary,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To ensure serialized access to table you can use locking mechanism.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1. Creating lock object&lt;/P&gt;&lt;P&gt;Goto TXN 11 Create lock object E&amp;lt;table name&amp;gt;.&lt;/P&gt;&lt;P&gt;Enter table name in Primary Table.&lt;/P&gt;&lt;P&gt;Enter key fields (in-order) in Lock Parameters and activate.&lt;/P&gt;&lt;P&gt;This will create two function modules Enqueue_E&amp;lt;table name&amp;gt; and Dequeue_E&amp;lt;table name&amp;gt; which you need to call for locking and unlocking respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2. Accessing table&lt;/P&gt;&lt;P&gt;In your code before updating table call Enqueue_E&amp;lt;table name&amp;gt; to get a write lock.&lt;/P&gt;&lt;P&gt;Before reading table call Enqueue_E&amp;lt;table name&amp;gt; to get a read lock.&lt;/P&gt;&lt;P&gt;After you are finished with the table call Dequeue_E&amp;lt;table name&amp;gt; to release lock or call Dequeue_All.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Please let us know if this solves your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 03:49:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concurrent-update-problem/m-p/3063703#M725877</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T03:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Concurrent update problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/concurrent-update-problem/m-p/3063704#M725878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gary,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to create a lock object for the same.&lt;/P&gt;&lt;P&gt;Goto SE11 &amp;amp; type the name for lock object.&lt;/P&gt;&lt;P&gt;CREATE&lt;/P&gt;&lt;P&gt;enter the primary key field &amp;amp; table names&lt;/P&gt;&lt;P&gt;Activate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLick GOTO LOCK MODULES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will find to FM&lt;/P&gt;&lt;P&gt;ENQUEUE_...  --&amp;gt; Used for locking the record&lt;/P&gt;&lt;P&gt;DEQUEUE_...  --&amp;gt; Used for unlocking the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 04:06:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/concurrent-update-problem/m-p/3063704#M725878</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T04:06:27Z</dc:date>
    </item>
  </channel>
</rss>

