<?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: Query regarding UPDATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465679#M553713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddhesh,&lt;/P&gt;&lt;P&gt;       In case of UPDATE statement it is always advisable to UPDATE the data at one go itself, rather than making it inside the loop.&lt;/P&gt;&lt;P&gt;       However, when you want to update any of the primary key fields of the database table, you will always have to use the UPDATE with SET addition inside a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       So, basically, your problem depends on the requirement. Please see if you can use the UPDATE at one go depending on the fields to be updated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2007 10:53:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-26T10:53:50Z</dc:date>
    <item>
      <title>Query regarding UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465675#M553709</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;I have one query regarding UPDATE.&lt;/P&gt;&lt;P&gt;If I want to update only one field of a database table from my internal table..what is preferable &amp;amp; Why in terms of performance, standards ?&lt;/P&gt;&lt;P&gt;(1) Loop at internal table. update the database table with SET statment.&lt;/P&gt;&lt;P&gt;Problem: Multiple database touch.&lt;/P&gt;&lt;P&gt;(2) update the database table with internal table at one go, with use of UPDATE statement.&lt;/P&gt;&lt;P&gt;Problem: I am updating all fields even if I want to update only one field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddhesh Sanghvi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 10:46:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465675#M553709</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T10:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465676#M553710</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;Instead of UPDATE use MODIFY statement.Now this statement will modify only the field u required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 10:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465676#M553710</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-06-26T10:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465677#M553711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;First fetch the data from DB table into internal table&lt;/P&gt;&lt;P&gt;loop that itab.&lt;/P&gt;&lt;P&gt;modify that field in itab&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;use modify statement to update the db table&lt;/P&gt;&lt;P&gt;MODIFY DB  from table ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points for useful Answers&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 10:50:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465677#M553711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T10:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465678#M553712</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;It is preferred to loop at internal table and update the table field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Update TABLE &amp;lt;table&amp;gt; set field = value..... where &amp;lt;condition&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Second option is not preferred&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 10:50:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465678#M553712</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T10:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465679#M553713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddhesh,&lt;/P&gt;&lt;P&gt;       In case of UPDATE statement it is always advisable to UPDATE the data at one go itself, rather than making it inside the loop.&lt;/P&gt;&lt;P&gt;       However, when you want to update any of the primary key fields of the database table, you will always have to use the UPDATE with SET addition inside a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       So, basically, your problem depends on the requirement. Please see if you can use the UPDATE at one go depending on the fields to be updated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 10:53:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465679#M553713</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T10:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding UPDATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465680#M553714</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;Use Modify statement to update the database table by putting that statement in loop throught proper condition.&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;Sasidhar Reddy Matli.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 11:00:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/query-regarding-update/m-p/2465680#M553714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T11:00:51Z</dc:date>
    </item>
  </channel>
</rss>

