<?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 Sorting a internal table with different keys in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067267#M427841</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 have a internal table called itab, which has to be sorted with different keys. The priorities of the keys is decided at the runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the below statement where industry, term, amt are fields of the itab:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SORT itab BY industry DESCENDING term DESCENDING amt DESCENDING.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the itab is sorted with highest priority as industry, followed by term, followed by amt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now the requirement is that this priority might change. I will have three variables deciding the priority. assuming tat p1, p2 and p3 are the priority variables, how can i use these variables to sort this itab at runtime ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Ajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2007 10:49:01 GMT</pubDate>
    <dc:creator>former_member671874</dc:creator>
    <dc:date>2007-03-28T10:49:01Z</dc:date>
    <item>
      <title>Sorting a internal table with different keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067267#M427841</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 have a internal table called itab, which has to be sorted with different keys. The priorities of the keys is decided at the runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider the below statement where industry, term, amt are fields of the itab:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;SORT itab BY industry DESCENDING term DESCENDING amt DESCENDING.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the itab is sorted with highest priority as industry, followed by term, followed by amt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now the requirement is that this priority might change. I will have three variables deciding the priority. assuming tat p1, p2 and p3 are the priority variables, how can i use these variables to sort this itab at runtime ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Ajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 10:49:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067267#M427841</guid>
      <dc:creator>former_member671874</dc:creator>
      <dc:date>2007-03-28T10:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a internal table with different keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067268#M427842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if priority = 1.&lt;/P&gt;&lt;P&gt;SORT itab BY industry DESCENDING term DESCENDING amt DESCENDING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;elseif priority = 2.&lt;/P&gt;&lt;P&gt;SORT itab BY term DESCENDING amt DESCENDING industry DESCENDING .&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT itab BY term DESCENDING industry DESCENDING amt DESCENDING .&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like that&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 10:53:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067268#M427842</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T10:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a internal table with different keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067269#M427843</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;Thanks for replying. There are 8 different possiblities rite ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 10:56:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067269#M427843</guid>
      <dc:creator>former_member671874</dc:creator>
      <dc:date>2007-03-28T10:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a internal table with different keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067270#M427844</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;Thanks for replying. There are 8 different possiblities rite ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ajit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 10:56:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067270#M427844</guid>
      <dc:creator>former_member671874</dc:creator>
      <dc:date>2007-03-28T10:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a internal table with different keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067271#M427845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i dont know what your priority variable is containing and how you want to sort them but you have to do your combination as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 11:04:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067271#M427845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T11:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting a internal table with different keys</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067272#M427846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The priority variable is containing the field name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example-&lt;/P&gt;&lt;P&gt;p1 = 'industry'&lt;/P&gt;&lt;P&gt;p2 = 'term'&lt;/P&gt;&lt;P&gt;p3 = 'amt'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so it can contain 8 combinations of values......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 11:12:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-a-internal-table-with-different-keys/m-p/2067272#M427846</guid>
      <dc:creator>former_member671874</dc:creator>
      <dc:date>2007-03-28T11:12:10Z</dc:date>
    </item>
  </channel>
</rss>

