<?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 using order by statement !! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-order-by-statement/m-p/3338237#M800228</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;I'm using following query in my RFC:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  * &lt;/P&gt;&lt;P&gt;FROM Transactions&lt;/P&gt;&lt;P&gt;UP TO 30 ROWS&lt;/P&gt;&lt;P&gt;WHERE TR_ID &amp;gt;= l_current_tid AND&lt;/P&gt;&lt;P&gt;              PHASE = l_phase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to ensure that this table Transactions is ordered by TR_ID before this query is executed..  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I achieve this? Pls help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awaiting for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Feb 2008 05:02:27 GMT</pubDate>
    <dc:creator>Amey-Mogare</dc:creator>
    <dc:date>2008-02-01T05:02:27Z</dc:date>
    <item>
      <title>using order by statement !!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-order-by-statement/m-p/3338237#M800228</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;I'm using following query in my RFC:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  * &lt;/P&gt;&lt;P&gt;FROM Transactions&lt;/P&gt;&lt;P&gt;UP TO 30 ROWS&lt;/P&gt;&lt;P&gt;WHERE TR_ID &amp;gt;= l_current_tid AND&lt;/P&gt;&lt;P&gt;              PHASE = l_phase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to ensure that this table Transactions is ordered by TR_ID before this query is executed..  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I achieve this? Pls help me on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awaiting for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 05:02:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-order-by-statement/m-p/3338237#M800228</guid>
      <dc:creator>Amey-Mogare</dc:creator>
      <dc:date>2008-02-01T05:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: using order by statement !!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-order-by-statement/m-p/3338238#M800229</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;Hope it will help you,.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pls reward if help.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT CARRID CONNID MIN( SEATSOCC ) AS MIN&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF WA&lt;/P&gt;&lt;P&gt;FROM SFLIGHT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GROUP BY CARRID CONNID&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ORDER BY&lt;/STRONG&gt; CARRID MIN DESCENDING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: / WA-CARRID, WA-CONNID, WA-MIN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 05:05:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-order-by-statement/m-p/3338238#M800229</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T05:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: using order by statement !!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-order-by-statement/m-p/3338239#M800230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for quick reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But im using UP TO statement in query so what is happening is &lt;/P&gt;&lt;P&gt;     1. it is first selecting all matched lines &lt;/P&gt;&lt;P&gt;     2. Then ordering them by ORDER By condition &lt;/P&gt;&lt;P&gt;     3. and then, returning 30 lines out of them..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I want to sort the table first and then apply the select query..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this better explains my problem..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 05:22:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-order-by-statement/m-p/3338239#M800230</guid>
      <dc:creator>Amey-Mogare</dc:creator>
      <dc:date>2008-02-01T05:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: using order by statement !!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-order-by-statement/m-p/3338240#M800231</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;1.SELECT the required rows from the database into ITAB without using ORDER BY&lt;/P&gt;&lt;P&gt;2. sort the ITAB&lt;/P&gt;&lt;P&gt;3. Fetch the required data from the ITAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:  If u use ORDER BY in SELECT , performance will go down&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Narendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Feb 2008 05:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-order-by-statement/m-p/3338240#M800231</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-01T05:22:54Z</dc:date>
    </item>
  </channel>
</rss>

