<?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 .. EndSelect : inconsistency in selection sequence in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238966#M1912879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Navdeep - SAP selects and then sorts in order to show the display. In you program as well, you need to explicitly sort or order (as Syed suggested).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We had a similar issue where the primary keys were not sorted and our Binary READ was failing. SAP suggests, explicit sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raju.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Sep 2015 20:25:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-09-14T20:25:42Z</dc:date>
    <item>
      <title>Select .. EndSelect : inconsistency in selection sequence</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238964#M1912877</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 came across a strange behavior of select.. endselect query. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;want to know the sequence in which this will select data from DB tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from vbfa where vbeln = 'XXXXX'&lt;/P&gt;&lt;P&gt;.................&lt;/P&gt;&lt;P&gt;..................&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;there are 5 records that meets the where condition.&lt;/P&gt;&lt;P&gt;that are stored in DB table as 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&lt;/P&gt;&lt;P&gt; but its fetching first 5th record then 1-2-3-4.in sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not able to get the sequence logic in selecting these records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 14:43:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238964#M1912877</guid>
      <dc:creator>navdeep_thakur12</dc:creator>
      <dc:date>2015-09-14T14:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Select .. EndSelect : inconsistency in selection sequence</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238965#M1912878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Data in Database table will not be stored in sequence, it is the output in which it will be sorted and presented, Basically your se11 or se16 output is also a program which fetches the data and presents it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to get in sequence you can use ORDER BY Clause with select statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 14:55:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238965#M1912878</guid>
      <dc:creator>former_member183073</dc:creator>
      <dc:date>2015-09-14T14:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Select .. EndSelect : inconsistency in selection sequence</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238966#M1912879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Navdeep - SAP selects and then sorts in order to show the display. In you program as well, you need to explicitly sort or order (as Syed suggested).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We had a similar issue where the primary keys were not sorted and our Binary READ was failing. SAP suggests, explicit sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raju.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 20:25:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238966#M1912879</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-09-14T20:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select .. EndSelect : inconsistency in selection sequence</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238967#M1912880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Syed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it means select.... endselect will fetch record randomly from vbfa table??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;since for most of the time select...endselect fetches record in the same sequence as it is present in VBFA table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 06:06:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238967#M1912880</guid>
      <dc:creator>navdeep_thakur12</dc:creator>
      <dc:date>2015-09-15T06:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Select .. EndSelect : inconsistency in selection sequence</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238968#M1912881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As soon as you don't use a ORDER BY option, SQL optimizer will usually read data in an unpredictable order, can also be complexified for buffered tables. In most database the assertion "as it is present in XXX table"&amp;nbsp; is false or non-sense. In your example you are not selecting using first primary keys, so optimize may use some other secondary index, or even temporary hash table or buffer&amp;nbsp; created during previous SQL execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Hint: Also read&amp;nbsp; &lt;A href="http://service.sap.com/sap/support/notes/185530" title="185530  - Performance: Customer developments in SD"&gt;&lt;SPAN class="title"&gt;185530 - Performance: Customer developments in SD&lt;/SPAN&gt; &lt;/A&gt;if you didn't already create an index on VBELN.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 06:50:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-endselect-inconsistency-in-selection-sequence/m-p/11238968#M1912881</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2015-09-15T06:50:33Z</dc:date>
    </item>
  </channel>
</rss>

