<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033665#M717661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sandeep,&lt;/P&gt;&lt;P&gt;the first one is a better option to use because if the where condition is matched it directly get's all the values from lfa1 to itab but in the second case the query is executed every time the where condition is true it fetches from the db and appends it to the internal table.&lt;/P&gt;&lt;P&gt;so in the second case the performance is not as gud as in the 1st case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sohi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Oct 2007 07:13:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-29T07:13:01Z</dc:date>
    <item>
      <title>select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033661#M717657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just check the 2 select statements below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.select * from lfa1 into table itab where .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.select * from lfa1 into  itab where .....&lt;/P&gt;&lt;P&gt;   append itab.&lt;/P&gt;&lt;P&gt;   endselect.&lt;/P&gt;&lt;P&gt;In the both cases which one is preferrablein terms of performance and what is the Reason for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 06:33:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033661#M717657</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T06:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033662#M717658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sandeep,&lt;/P&gt;&lt;P&gt;the first 1 is good. &lt;/P&gt;&lt;P&gt;Bcoz the second one puts a hit on the database table in a loop.&lt;/P&gt;&lt;P&gt;thus reducing the performance timing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awrd points if found useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 06:35:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033662#M717658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T06:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033663#M717659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since in second, the Database hit each and everytime. It's like writing a select query in a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 06:35:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033663#M717659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T06:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033664#M717660</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;&amp;lt;b&amp;gt;Statement 1.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on the where condition , records from LFA1 table will be retrieved and saved to the internal table directly in a single process. In this case database hit is very less , we can say a single hit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Statement 2.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The controls checks each and every record based on the where condition . If the record found , it goes inside the loop and append to the internal table.&lt;/P&gt;&lt;P&gt;Here the database hits are more . Also the append statement on each sucessful conditions decrease the performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conclusion :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its better to use "into table" , ie the statement 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day.&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;Meikandan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 06:44:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033664#M717660</guid>
      <dc:creator>meikandan_krishnan2</dc:creator>
      <dc:date>2007-10-29T06:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: select</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033665#M717661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sandeep,&lt;/P&gt;&lt;P&gt;the first one is a better option to use because if the where condition is matched it directly get's all the values from lfa1 to itab but in the second case the query is executed every time the where condition is true it fetches from the db and appends it to the internal table.&lt;/P&gt;&lt;P&gt;so in the second case the performance is not as gud as in the 1st case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sohi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 07:13:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select/m-p/3033665#M717661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T07:13:01Z</dc:date>
    </item>
  </channel>
</rss>

