<?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: select single   for update *...what does it do? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607723#M869043</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;The DB lock created from a SELECT SINGLE FOR UPDATE will be released only after a COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check in SM12 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Mar 2008 14:10:19 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2008-03-26T14:10:19Z</dc:date>
    <item>
      <title>select single   for update *...what does it do?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607721#M869041</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;In a standard program, a timeout is occuring because of this statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SELECT SINGLE FOR UPDATE * FROM NRIV WHERE&lt;/P&gt;&lt;P&gt;                                       OBJECT    = NRIV-OBJECT&lt;/P&gt;&lt;P&gt;                                       AND SUBOBJECT = NRIV-SUBOBJECT&lt;/P&gt;&lt;P&gt;                                         AND NRRANGENR = NRIV-NRRANGENR&lt;/P&gt;&lt;P&gt;                                           AND TOYEAR    = NRIV-TOYEAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i checked the table NRIV, there were only 2000 entries in it.There is only 1 row which corresponds to the condition.This leads me to believe that the select single for update * is causing the timeout and not the volume of the db table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What exactly does it mean and how can i correct it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 13:58:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607721#M869041</guid>
      <dc:creator>dev_parbutteea</dc:creator>
      <dc:date>2008-03-26T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: select single   for update *...what does it do?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607722#M869042</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;Check the Index settings of Table with ur &lt;STRONG&gt;BASIS team&lt;/STRONG&gt; might be due to incorrect index which could cause TIMEOUT dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balakumar.G&lt;/P&gt;&lt;P&gt;Reward Points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 14:05:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607722#M869042</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T14:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: select single   for update *...what does it do?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607723#M869043</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;The DB lock created from a SELECT SINGLE FOR UPDATE will be released only after a COMMIT WORK. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check in SM12 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 14:10:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607723#M869043</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-03-26T14:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: select single   for update *...what does it do?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607724#M869044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 'FOR UPDATE' addition on the SELECT will set write protection for NRIV.  Anytime a table needs to be locked there is the possibility that two or more processes will be fighting for that table at the same time.  This could cause the timeout in your case and eventually a deadlock.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps a little.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greg Kern&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 14:12:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607724#M869044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T14:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: select single   for update *...what does it do?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607725#M869045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&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;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 14:15:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-single-for-update-what-does-it-do/m-p/3607725#M869045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T14:15:50Z</dc:date>
    </item>
  </channel>
</rss>

