<?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: Sorting an internal table! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109877#M982683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there try sorting using item number as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT nbseg BY item_no txgrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is notthing is mention in sort its ascending by default.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jun 2008 20:08:22 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2008-06-26T20:08:22Z</dc:date>
    <item>
      <title>Sorting an internal table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109874#M982680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ABAPers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the program there is a statement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SORT nbseg BY txgrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even though the table is already sorted by tax group, that is in my case, the first item of the invoice ahs tax group  000 and all the rest have 001.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as the sort statemet is executed, the first item remains as it is, but the rest of the items change positions. item number 329 comes second, 170 comes 3rd etc even though they have same tax group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how the sort statement works when the field has identical values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be glad to award points for helpful answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Veena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 19:56:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109874#M982680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T19:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting an internal table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109875#M982681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try sort itab by field1 ascending&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 20:03:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109875#M982681</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T20:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting an internal table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109876#M982682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, but I am not developing the program and trying to resolve the issue in an existing program. Because of this sorting pattern we do not have the last item of the invoice being read last.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 20:05:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109876#M982682</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T20:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting an internal table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109877#M982683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there try sorting using item number as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT nbseg BY item_no txgrp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is notthing is mention in sort its ascending by default.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 20:08:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109877#M982683</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-06-26T20:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting an internal table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109878#M982684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try stable sort.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 20:08:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109878#M982684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T20:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting an internal table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109879#M982685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry.. i was trying to edit my last post to reflect your real question..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it probably has something to do with the columns to the left of the field you are sorting. if you are particular about those other fields, you should sort them in sequence as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by txgrp field2 field3 .... ascending.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 20:08:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109879#M982685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T20:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting an internal table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109880#M982686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for the answers, but i still have one question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the 3 records in the internal table look like below &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                                                              Tax group&lt;/P&gt;&lt;P&gt;1	2133	1800002056	000	001	D		S&lt;/P&gt;&lt;P&gt;2	2133	1800002056	001	002	S		S&lt;/P&gt;&lt;P&gt;3	2133	1800002056	001	003	S		S&lt;/P&gt;&lt;P&gt;4	2133	1800002056	001	004	S		S&lt;/P&gt;&lt;P&gt;5	2133	1800002056	001	005	S		S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then ideally after sorting by tax group, the records should remain as they are right?  Wierdly, in some cases the records remain as they are but for some invoices they get shifted, any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 20:24:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109880#M982686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T20:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting an internal table!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109881#M982687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry in my previous post, tax group column is the one with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;000&lt;/P&gt;&lt;P&gt;001&lt;/P&gt;&lt;P&gt;001&lt;/P&gt;&lt;P&gt;001&lt;/P&gt;&lt;P&gt;001&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jun 2008 20:25:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-an-internal-table/m-p/4109881#M982687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-26T20:25:40Z</dc:date>
    </item>
  </channel>
</rss>

