<?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: Order by in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170220#M460188</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ravinder,&lt;/P&gt;&lt;P&gt; We would get the records in a sorted order if we do it this way.&lt;/P&gt;&lt;P&gt;the problem in this approach is that it takes a lot of time.(Performance issue).&lt;/P&gt;&lt;P&gt;Regards,.&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Apr 2007 16:17:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-26T16:17:55Z</dc:date>
    <item>
      <title>Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170219#M460187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this code : &lt;/P&gt;&lt;P&gt;                  DATA T100_WA TYPE T100.&lt;/P&gt;&lt;P&gt;SELECT * FROM T100&lt;/P&gt;&lt;P&gt;INTO T100_WA&lt;/P&gt;&lt;P&gt;WHERE SPRSL = SY-LANGU AND&lt;/P&gt;&lt;P&gt;MSGNR &amp;lt; '010'&lt;/P&gt;&lt;P&gt;ORDER BY PRIMARY KEY.&lt;/P&gt;&lt;P&gt;ON CHANGE OF T100_WA-ARBGB.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;WRITE: / '**&lt;STRONG&gt;', T100_WA-ARBGB, '&lt;/STRONG&gt;**'.&lt;/P&gt;&lt;P&gt;ENDON.&lt;/P&gt;&lt;P&gt;WRITE: / T100_WA-MSGNR, T100_WA-TEXT.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What ll be the diff if we dont the order by clause.&lt;/P&gt;&lt;P&gt;And wat is the use of order by clause. &lt;/P&gt;&lt;P&gt;when exactly do we use it ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 16:11:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170219#M460187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170220#M460188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ravinder,&lt;/P&gt;&lt;P&gt; We would get the records in a sorted order if we do it this way.&lt;/P&gt;&lt;P&gt;the problem in this approach is that it takes a lot of time.(Performance issue).&lt;/P&gt;&lt;P&gt;Regards,.&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 16:17:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170220#M460188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170221#M460189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;T100 stores all messages&lt;/P&gt;&lt;P&gt;When you use SORT BY all the key field values are sorted and displayed in the alphabetical order&lt;/P&gt;&lt;P&gt;if you don't use ORDER BY&lt;/P&gt;&lt;P&gt;they will come without order, as they are stored in table.&lt;/P&gt;&lt;P&gt;menas sorting will not be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if useful&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>Thu, 26 Apr 2007 16:18:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170221#M460189</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170222#M460190</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;Sorts the lines of the selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... ORDER BY PRIMARY KEY |... &amp;lt;si&amp;gt; [ASCENDING|DESCENDING]...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorts the selection in ascending or descending order according to the primary key or the contents of the fields listed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 16:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170222#M460190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170223#M460191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Records in a DB table are not necesarily stored in an "orderly" fashion - by the primary key, for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ORDER BY clause allows you to sequence/order the returned DB records in a fashion/order that is most efficient for your application code.  It simply reduces extra application code that you might need to write.... and it makes your application prog run faster.  It is ALWAYS faster to have the DB records returned to the app prog in a pre-ordered fashion... rather than having the app prog do the ordering after receiving the records from the DB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 16:19:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170223#M460191</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170224#M460192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ravinder,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just press F1 on ORDER BY and i'm sure you will get the answer.&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>Thu, 26 Apr 2007 16:19:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170224#M460192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170225#M460193</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;  The ORDER BY clause is used to give the records in the sorted manner...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  In the database table it is not necessary the records will be stored in the sorted order..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN your case...There are just displaying the unique message IDs ...otherwise..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THE ON CHANGE OF ...will trigger for every change in the message id..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is is not sorted then it will show duplicate records in the output..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is sorted then it will not show duplicate records..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM T100&lt;/P&gt;&lt;P&gt;INTO T100_WA&lt;/P&gt;&lt;P&gt;WHERE SPRSL = SY-LANGU AND&lt;/P&gt;&lt;P&gt;MSGNR &amp;lt; '010'&lt;/P&gt;&lt;P&gt;ORDER BY PRIMARY KEY.&lt;/P&gt;&lt;P&gt;ON CHANGE OF T100_WA-ARBGB.&lt;/P&gt;&lt;P&gt;ULINE.&lt;/P&gt;&lt;P&gt;WRITE: / '**&lt;STRONG&gt;', T100_WA-ARBGB, '&lt;/STRONG&gt;**'.&lt;/P&gt;&lt;P&gt;ENDON.&lt;/P&gt;&lt;P&gt;WRITE: / T100_WA-MSGNR, T100_WA-TEXT.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 16:19:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170225#M460193</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170226#M460194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Order by is used for sorting.&lt;/P&gt;&lt;P&gt;then even the key Sort does the same job .&lt;/P&gt;&lt;P&gt;what is the diff b/w order by and sort ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 16:22:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170226#M460194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170227#M460195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Order by operates on database table.&lt;/P&gt;&lt;P&gt;sort operates on internal tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But , order by is an obsolete statement and hence use sort statement on internal tables.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 16:24:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170227#M460195</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170228#M460196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ORDER BY is performed by the Database server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT BY is performed by the Application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doing at the DB server is much faster.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 16:25:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170228#M460196</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Order by</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170229#M460197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ravi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;"But , order by is an obsolete statement "&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this statement is not true.  ORDER BY is part of SQL natively. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where have you seen that SAP has made it obsolete in OpenSQL?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 16:29:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/order-by/m-p/2170229#M460197</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-26T16:29:57Z</dc:date>
    </item>
  </channel>
</rss>

