<?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 Select Single for Update in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update/m-p/3657899#M881129</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a function which is called at the beginning of most of our report programs.   It performs 'select single for update' on a custom table to track execution date/times.   We are seeing a lot of locking conflicts on this table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it is because no 'commit work' is performed and so the table is being held until the report finishes execution.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any opinions or other ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2008 16:48:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-04T16:48:14Z</dc:date>
    <item>
      <title>Select Single for Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update/m-p/3657899#M881129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a function which is called at the beginning of most of our report programs.   It performs 'select single for update' on a custom table to track execution date/times.   We are seeing a lot of locking conflicts on this table.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it is because no 'commit work' is performed and so the table is being held until the report finishes execution.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any opinions or other ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2008 16:48:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update/m-p/3657899#M881129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-04T16:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select Single for Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update/m-p/3657900#M881130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes..&lt;/P&gt;&lt;P&gt;Select single for update will get a lock on table until you update that table.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An exclusive lock can be set for this line using the FOR UPDATE addition when a single line is being read with SINGLE. The SELECT command is used in this case only if all primary key fields in logical expressions linked by AND are checked to make sure they are the same in the WHERE condition. Otherwise, the resulting set is empty and sy-subrc is set to 8. If the lock causes a deadlock, an exception occurs. If the FOR UPDATE addition is used, the SELECT command circumvents SAP buffering. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G@urav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2008 17:05:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update/m-p/3657900#M881130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-04T17:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select Single for Update</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update/m-p/3657901#M881131</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;A good way of dealing with such lock problem is to create a lock object for your custom table... and then lock it before updating... and when you update, check if update is successful... if so, commit work else rollback... finally unlock it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if this is fine... or you need a more detailed code help for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Tapas&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;Pls reward if useful or answered&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2008 22:13:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update/m-p/3657901#M881131</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-04T22:13:56Z</dc:date>
    </item>
  </channel>
</rss>

