<?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 statement performance in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145218#M747665</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;It should work, may be because of huge amount of data it is taking lot of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to move the MANDT field into last postion and then try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if needful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreeram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Dec 2007 09:33:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-11T09:33:00Z</dc:date>
    <item>
      <title>Sort statement performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145211#M747658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sort statement is taking too much of time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT MAKT_KEYTAB BY MATNR SPRAS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any option using which we can optimise this ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sudha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 09:10:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145211#M747658</guid>
      <dc:creator>sudha_naik</dc:creator>
      <dc:date>2007-12-11T09:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sort statement performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145212#M747659</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;send me your internal table strucutre.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 09:15:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145212#M747659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-11T09:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sort statement performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145213#M747660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How did you define the table? If possible try sorted table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 09:16:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145213#M747660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-11T09:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sort statement performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145214#M747661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA: BEGIN OF MAKT_KEYTAB OCCURS 0,&lt;/P&gt;&lt;P&gt;        MANDT LIKE SYST-MANDT,&lt;/P&gt;&lt;P&gt;        MATNR LIKE MAKT-MATNR,&lt;/P&gt;&lt;P&gt;        SPRAS LIKE MAKT-SPRAS,&lt;/P&gt;&lt;P&gt;      END OF MAKT_KEYTAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 09:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145214#M747661</guid>
      <dc:creator>sudha_naik</dc:creator>
      <dc:date>2007-12-11T09:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sort statement performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145215#M747662</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;MAKE IT AS binary SEARCH &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT MAKT_KEYTAB BY MATNR SPRAS binary serach .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The binary search algorithm helps faster search of a value in an internal table. It is advisable to sort the internal table before doing a binary search. Binary search repeatedly divides the search interval in half. If the value to be searched is less than the item in the middle of the interval, the search is narrowed to the lower half, otherwise the search is narrowed to the upper half.&lt;/P&gt;&lt;P&gt;IF the int table is sorted by a key, then when BINARY SEARCH is added to a WITH KEY statement... the "read" to the int table is performed at a binary level for maximum performance.&lt;/P&gt;&lt;P&gt;if N is the number of entries in your itab, linear search is done in O(N) and binary search is done in O(logN).&lt;/P&gt;&lt;P&gt;use it if your itab is big, just don't forget to sort it if it's a standard table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 09:23:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145215#M747662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-11T09:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sort statement performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145216#M747663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA: BEGIN OF MAKT_KEYTAB OCCURS 0,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;MANDT LIKE SYST-MANDT,&amp;lt;/b&amp;gt; ==&amp;gt; you don't need this line&lt;/P&gt;&lt;P&gt;MATNR LIKE MAKT-MATNR,&lt;/P&gt;&lt;P&gt;SPRAS LIKE MAKT-SPRAS,&lt;/P&gt;&lt;P&gt;END OF MAKT_KEYTAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 09:27:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145216#M747663</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-12-11T09:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sort statement performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145217#M747664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't think that any thing can be done to increase the performance of this SORT statement. Better try to split data in different tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 09:31:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145217#M747664</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-11T09:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sort statement performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145218#M747665</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;It should work, may be because of huge amount of data it is taking lot of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to move the MANDT field into last postion and then try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if needful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sreeram.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 09:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145218#M747665</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-11T09:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sort statement performance</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145219#M747666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You dont need to use MANDT and declaration there in internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use SORT statement including ASCENDING oor DESCENDING statement after that.&lt;/P&gt;&lt;P&gt;For e.g SORT INT_TAB ASCENDING BY MATNR SPRAS .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;General Syntax :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT &amp;lt;itab&amp;gt; [ASCENDING|DESCENDING] [AS TEXT] [STABLE].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sakthi C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2007 09:38:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-statement-performance/m-p/3145219#M747666</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-11T09:38:58Z</dc:date>
    </item>
  </channel>
</rss>

