<?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: diffrence between select  endselect and select. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/diffrence-between-select-endselect-and-select/m-p/9164529#M1711536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Naresh stated, SELECT ... ENDSELECT works like LOOP ... ENDLOOP, whereas SELECT retrieves all values at once. There are some important considerations though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- In your examples, statement 1 will not compile. When using the Select statement without EndSelect, you need to either specify SELECT &lt;STRONG&gt;SINGLE&lt;/STRONG&gt; ... INTO ... (meaning that only one record from the database will be returned, and it will be populated into the structure you provide) or, you need to specify SELECT ... INTO &lt;STRONG&gt;TABLE&lt;/STRONG&gt; ... (meaning that all records are returned, and populated into the internal table you provide.) You can also use &lt;STRONG&gt;APPENDING&lt;/STRONG&gt; TABLE instead of INTO TABLE if you don't want to overwrite the internal table.&lt;/P&gt;&lt;P&gt;- SELECT ... ENDSELECT uses a database cursor to interate through the rows that match your query. Because of this, you cannot use the COMMIT WORK or ROLLBACK WORK statements, because they would close the database cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general I think using the SELECT &lt;SPAN style="text-decoration: underline;"&gt;without&lt;/SPAN&gt; the ENDSELECT is the better practice. I never use SELECT ... ENDSELECT in my code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Nov 2012 19:32:17 GMT</pubDate>
    <dc:creator>alex_campbell</dc:creator>
    <dc:date>2012-11-12T19:32:17Z</dc:date>
    <item>
      <title>diffrence between select  endselect and select.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diffrence-between-select-endselect-and-select/m-p/9164527#M1711534</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;Could you tell me please that what is the difference between select and&amp;nbsp; endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1-&amp;nbsp; select a b c from table xy into itab where a = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 select a b c from table xy into itab where a = 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN lang="EN-GB" style="font-family: Arial; color: red;"&gt;Moderator message: FAQ, please search for information before posting.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Thomas Zloch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2012 17:50:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diffrence-between-select-endselect-and-select/m-p/9164527#M1711534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-11-12T17:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: diffrence between select  endselect and select.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diffrence-between-select-endselect-and-select/m-p/9164528#M1711535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endselect &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it work's like a Loop and Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where as Select will retrive all the values at once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2012 18:26:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diffrence-between-select-endselect-and-select/m-p/9164528#M1711535</guid>
      <dc:creator>former_member206439</dc:creator>
      <dc:date>2012-11-12T18:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: diffrence between select  endselect and select.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diffrence-between-select-endselect-and-select/m-p/9164529#M1711536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Naresh stated, SELECT ... ENDSELECT works like LOOP ... ENDLOOP, whereas SELECT retrieves all values at once. There are some important considerations though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- In your examples, statement 1 will not compile. When using the Select statement without EndSelect, you need to either specify SELECT &lt;STRONG&gt;SINGLE&lt;/STRONG&gt; ... INTO ... (meaning that only one record from the database will be returned, and it will be populated into the structure you provide) or, you need to specify SELECT ... INTO &lt;STRONG&gt;TABLE&lt;/STRONG&gt; ... (meaning that all records are returned, and populated into the internal table you provide.) You can also use &lt;STRONG&gt;APPENDING&lt;/STRONG&gt; TABLE instead of INTO TABLE if you don't want to overwrite the internal table.&lt;/P&gt;&lt;P&gt;- SELECT ... ENDSELECT uses a database cursor to interate through the rows that match your query. Because of this, you cannot use the COMMIT WORK or ROLLBACK WORK statements, because they would close the database cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general I think using the SELECT &lt;SPAN style="text-decoration: underline;"&gt;without&lt;/SPAN&gt; the ENDSELECT is the better practice. I never use SELECT ... ENDSELECT in my code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2012 19:32:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diffrence-between-select-endselect-and-select/m-p/9164529#M1711536</guid>
      <dc:creator>alex_campbell</dc:creator>
      <dc:date>2012-11-12T19:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: diffrence between select  endselect and select.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/diffrence-between-select-endselect-and-select/m-p/9164530#M1711537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Select * into ITAB is faster. Select Endselect is slower.&lt;/P&gt;&lt;P&gt;Also, Select Endselect locks table for the entire processing time. Hence, it is better to use Select Into ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can go to SE30 -&amp;gt; Utilities -&amp;gt; Tips and Tricks for more details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 03:54:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/diffrence-between-select-endselect-and-select/m-p/9164530#M1711537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-11-13T03:54:02Z</dc:date>
    </item>
  </channel>
</rss>

