<?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: Sort without BY addition &amp; Table Key in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-without-by-addition-table-key/m-p/10491833#M1851283</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 don't know if you'll imporve the performace in your case, you should do some measurement, the problem should be the table key for a standard internal table (like yours) is the set of all CHAR fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In you situation you've only one fields, but probably if the table has several char fields the performance can be improved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I suppose it's always better to explicit an option else the system will have to deduct it by itself, so the system will do an additional step: in your case without BY, the system has to deduct the key to be used for the sorting&lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Aug 2014 17:00:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-08-25T17:00:12Z</dc:date>
    <item>
      <title>Sort without BY addition &amp; Table Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-without-by-addition-table-key/m-p/10491832#M1851282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From SAP Help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;If no explicit sort key is entered using the &lt;STRONG style="font-size: 10pt; font-family: 'Courier New';"&gt;BY&lt;/STRONG&gt; addition, the internal table &lt;STRONG style="font-size: 10pt; font-family: 'Courier New';"&gt;itab&lt;/STRONG&gt; is sorted according to the &lt;A href="https://community.sap.com/"&gt;table key&lt;/A&gt;.&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have code as below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;data: lt_vkonto type table of VKONT_KK. "Cont Acc No&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;"Fetch Cont Acc no against Contract&lt;/P&gt;
&lt;P&gt;select vkonto from ever into table lt_vkonto where vertrag = wa_data-vertrag.&lt;/P&gt;
&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;
&lt;P&gt;sort lt_vkonto.&lt;/P&gt;
&lt;P&gt;endif.&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As seen above, I have sort statement without BY addition for internal table lt_vkonto which does not have a UNIQUE or NON UNIQUE key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will adding BY addition --&amp;gt; SORT lt_vkonto by vkonto imrpove the performance of sort statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please share your valuable inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Aspire&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2014 16:52:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-without-by-addition-table-key/m-p/10491832#M1851282</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-25T16:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sort without BY addition &amp; Table Key</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-without-by-addition-table-key/m-p/10491833#M1851283</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 don't know if you'll imporve the performace in your case, you should do some measurement, the problem should be the table key for a standard internal table (like yours) is the set of all CHAR fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In you situation you've only one fields, but probably if the table has several char fields the performance can be improved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway I suppose it's always better to explicit an option else the system will have to deduct it by itself, so the system will do an additional step: in your case without BY, the system has to deduct the key to be used for the sorting&lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2014 17:00:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-without-by-addition-table-key/m-p/10491833#M1851283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-08-25T17:00:12Z</dc:date>
    </item>
  </channel>
</rss>

