<?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: SINGLE FOR UPDATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031238#M416909</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;SAP Explanation:&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;When u are accessing a critical data which u dont want others to change while u r acessing, you make use of FOR UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is recommended to be mostly used with SINGLE, because u do not want to hold a bunch of records/values with out being changed by other users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this answers ur question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy SAP&lt;/P&gt;&lt;P&gt;Rajasekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Mar 2007 18:43:56 GMT</pubDate>
    <dc:creator>rajasekhar_matukumalli3</dc:creator>
    <dc:date>2007-03-14T18:43:56Z</dc:date>
    <item>
      <title>SINGLE FOR UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031233#M416904</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;can anybody tell me the user of "SINGLE FOR UPDATE" keywords in SELECT statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Priya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 18:29:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031233#M416904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T18:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: SINGLE FOR UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031234#M416905</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;Please check this for SAP Help ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If SINGLE is specified, the resulting set has a single line. If the remaining additions to the SELECT command select more than one line from the database, the first line that is found is entered into the resulting set. The data objects specified after INTO may not be internal tables, and the APPENDING addition may not be used. &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;Note &lt;/P&gt;&lt;P&gt;When SINGLE is being specified, the lines to be read should be clearly specified in the WHERE condition, for the sake of efficiency. When the data is read from a database table, the system does this by specifying comparison values for the primary key. &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;Ferry Lianto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 18:32:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031234#M416905</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T18:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: SINGLE FOR UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031235#M416906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As given by SAP -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... SINGLE [FOR UPDATE] &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;If SINGLE is specified, the resulting set has a single line. If the remaining additions to the SELECT command select more than one line from the database, the first line that is found is entered into the resulting set. The data objects specified after INTO may not be internal tables, and the APPENDING addition may not be used. The addition ORDER BY can also not be used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An exclusive &amp;lt;b&amp;gt;LOCK&amp;lt;/b&amp;gt; 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;LOCK - Lock protected data from being accessed by several users at the same time as a shared lock or as exclusive locks&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;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 18:33:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031235#M416906</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-03-14T18:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: SINGLE FOR UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031236#M416907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SINGLE FOR UPDATE addition to SELECT, select a single record into the specified workarea. Based on sy-subrc 0 which happens only if there is 1 record matching the criteria, you can use the actual UPDATE dbtable statement following it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 18:35:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031236#M416907</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-14T18:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: SINGLE FOR UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031237#M416908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update is addition for SINGLE .&lt;/P&gt;&lt;P&gt;if you are using "select single for update"  then the selected entry is protected against parallel updates from other transactions until the next database commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aRs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 18:37:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031237#M416908</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-03-14T18:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: SINGLE FOR UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031238#M416909</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;SAP Explanation:&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;When u are accessing a critical data which u dont want others to change while u r acessing, you make use of FOR UPDATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is recommended to be mostly used with SINGLE, because u do not want to hold a bunch of records/values with out being changed by other users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this answers ur question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy SAP&lt;/P&gt;&lt;P&gt;Rajasekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2007 18:43:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/single-for-update/m-p/2031238#M416909</guid>
      <dc:creator>rajasekhar_matukumalli3</dc:creator>
      <dc:date>2007-03-14T18:43:56Z</dc:date>
    </item>
  </channel>
</rss>

