<?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 internal table for two fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345962#M1992430</link>
    <description>&lt;P&gt;I'm guessing this question is the output of automated translation!&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2021 13:53:20 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2021-02-05T13:53:20Z</dc:date>
    <item>
      <title>sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345953#M1992421</link>
      <description>&lt;P&gt;I need to sort the it_mseg internal table in ascending order for the bwart and mkpf_budat fields.&lt;/P&gt;
  &lt;P&gt; I am trying to use this statement: &lt;/P&gt;
  &lt;P&gt;ORDER it_mseg FOR budat_mkpf bwart. &lt;/P&gt;
  &lt;P&gt;but it doesn't work because it only sorts for one field I also tried like this:&lt;/P&gt;
  &lt;P&gt; order it_mseg by bwart. &lt;/P&gt;
  &lt;P&gt;order stable it_mseg of budat_mkpf. &lt;/P&gt;
  &lt;P&gt;how do i do it? thanks&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:36:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345953#M1992421</guid>
      <dc:creator>mark_fryu</dc:creator>
      <dc:date>2021-02-05T09:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345954#M1992422</link>
      <description>&lt;P&gt;Hello  &lt;SPAN class="mention-scrubbed"&gt;mark.fryu&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;If you want to sort an internal table then what you're looking for is SORT keyword.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab.htm&lt;/A&gt;&lt;/P&gt;Kind regards,&lt;BR /&gt;Mateusz</description>
      <pubDate>Fri, 05 Feb 2021 09:38:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345954#M1992422</guid>
      <dc:creator>MateuszAdamus</dc:creator>
      <dc:date>2021-02-05T09:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345955#M1992423</link>
      <description>&lt;P&gt;I tried "sort" but it didn't work, can you give me an instruction with the sort to try?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:45:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345955#M1992423</guid>
      <dc:creator>mark_fryu</dc:creator>
      <dc:date>2021-02-05T09:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345956#M1992424</link>
      <description>&lt;P&gt;Normally the code should look like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT it_mseg BY field_a ASCENDING field_b DESCENDING.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Are you sure that you can modify the contents of your table [it_mseg]? If it is an import parameter, it might be protected against changes.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:50:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345956#M1992424</guid>
      <dc:creator>Patrick_vN</dc:creator>
      <dc:date>2021-02-05T09:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345957#M1992425</link>
      <description>&lt;P&gt;Please show us your exact code.&lt;/P&gt;&lt;P&gt;Do you mean to use to SORT statement after there already is data in it_mseg? Or are you trying to use the ORDER BY to get the data sorted already from a SELECT query?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:53:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345957#M1992425</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-02-05T09:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345958#M1992426</link>
      <description>&lt;P&gt;yes I can modify the internal table, it's my report, I also tried this instruction but it sorts only for the first field, in this example of yours it sorts only for the field field_a&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 10:01:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345958#M1992426</guid>
      <dc:creator>mark_fryu</dc:creator>
      <dc:date>2021-02-05T10:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345959#M1992427</link>
      <description>&lt;P&gt;Patricks example should work. Please update your question with your exact code and we will be able to help. Also please show us your data before and after the sort, where we can see the data not sorted properly.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 10:32:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345959#M1992427</guid>
      <dc:creator>joltdx</dc:creator>
      <dc:date>2021-02-05T10:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345960#M1992428</link>
      <description>&lt;SPAN class="mention-scrubbed"&gt;mark.fryu&lt;/SPAN&gt; Did you open and read the link? It's full of instructions and examples.</description>
      <pubDate>Fri, 05 Feb 2021 10:34:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345960#M1992428</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-02-05T10:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345961#M1992429</link>
      <description>&lt;SPAN class="mention-scrubbed"&gt;mark.fryu&lt;/SPAN&gt; You're wrong, so please give details of values in your internal table + ABAP code so that we can explain what your error is.</description>
      <pubDate>Fri, 05 Feb 2021 10:36:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345961#M1992429</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-02-05T10:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: sort internal table for two fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345962#M1992430</link>
      <description>&lt;P&gt;I'm guessing this question is the output of automated translation!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 13:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-internal-table-for-two-fields/m-p/12345962#M1992430</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-02-05T13:53:20Z</dc:date>
    </item>
  </channel>
</rss>

