<?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: Internal table sort problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878351#M675853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;703000000009&lt;/P&gt;&lt;P&gt;10002039975&lt;/P&gt;&lt;P&gt;10002039968&lt;/P&gt;&lt;P&gt;2000022608&lt;/P&gt;&lt;P&gt;2000022607&lt;/P&gt;&lt;P&gt;2000022196&lt;/P&gt;&lt;P&gt;2000005193&lt;/P&gt;&lt;P&gt;100054788&lt;/P&gt;&lt;P&gt;100054787&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;sb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Oct 2007 10:03:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-10-02T10:03:44Z</dc:date>
    <item>
      <title>Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878342#M675844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a problem sorting an internal table. The table declaration is something like this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ITAB OCCURS 0,&lt;/P&gt;&lt;P&gt;        DOKNR LIKE DRAW-DOKNR,&lt;/P&gt;&lt;P&gt;        DOKAR LIKE DRAW-DOKAR,&lt;/P&gt;&lt;P&gt;        DOKVR LIKE DRAW-DOKVR,&lt;/P&gt;&lt;P&gt;        DOKTL LIKE DRAW-DOKTL,&lt;/P&gt;&lt;P&gt;        DKTXT LIKE DRAT-DKTXT,&lt;/P&gt;&lt;P&gt;        DTCRI LIKE DRAP-DATUM,&lt;/P&gt;&lt;P&gt;        DATA LIKE ZDMS_T_DOC-DATA,&lt;/P&gt;&lt;P&gt;        HORA LIKE ZDMS_T_DOC-HORA,&lt;/P&gt;&lt;P&gt;        ... &lt;/P&gt;&lt;P&gt;      END OF ITAB. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to sort the table by doknr &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ITAB BY DOKNR DESCENDING. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result after the sort command is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;703000000009&lt;/P&gt;&lt;P&gt;2000022608&lt;/P&gt;&lt;P&gt;2000022607&lt;/P&gt;&lt;P&gt;2000022196&lt;/P&gt;&lt;P&gt;2000005193&lt;/P&gt;&lt;P&gt;100054788&lt;/P&gt;&lt;P&gt;100054787&lt;/P&gt;&lt;P&gt;10002039975&lt;/P&gt;&lt;P&gt;10002039968. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance, &lt;/P&gt;&lt;P&gt;sb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:32:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878342#M675844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T09:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878343#M675845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;everything is correct, what's the problem - want do you want to get ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want have ist the other way round you have to code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab by doknr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards henner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:36:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878343#M675845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T09:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878344#M675846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, &lt;/P&gt;&lt;P&gt;DRAW-DOKNR is a char field, so the sort is correct, no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:42:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878344#M675846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T09:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878345#M675847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If u want sort to work.....take a field of type N  and move this value to that field and sort by that field in descending order.&lt;/P&gt;&lt;P&gt;U'll get required output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vasu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:44:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878345#M675847</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T09:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878346#M675848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rather than using one field in the sorting statement try to use two field name in the sorting statement but you have to check in the debug mode that with two field ll give you the exact output as per your requirement.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:47:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878346#M675848</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T09:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878347#M675849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henner, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you see the sort from CV04N, the output is different and just like I need. In fact, for a char type the result that I get is correct. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;sb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:50:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878347#M675849</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T09:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878348#M675850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vasu, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with the N type I get the following result &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10002039975&lt;/P&gt;&lt;P&gt;10002039968&lt;/P&gt;&lt;P&gt;703000000009&lt;/P&gt;&lt;P&gt;2000022608&lt;/P&gt;&lt;P&gt;2000022607&lt;/P&gt;&lt;P&gt;2000022196&lt;/P&gt;&lt;P&gt;2000005193&lt;/P&gt;&lt;P&gt;100054788&lt;/P&gt;&lt;P&gt;100054787 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;sb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:54:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878348#M675850</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T09:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878349#M675851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Sara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the order you want to have? Can you copy it here? Probably not everyone has data in transaction CV04N&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:56:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878349#M675851</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-10-02T09:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878350#M675852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Other thing I would try is :&lt;/P&gt;&lt;P&gt;SHIFT doknr RIGHT DELETING TRAILING SPACE (of course in a LOOP on each single line)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;than the SORT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 09:59:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878350#M675852</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-10-02T09:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878351#M675853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;703000000009&lt;/P&gt;&lt;P&gt;10002039975&lt;/P&gt;&lt;P&gt;10002039968&lt;/P&gt;&lt;P&gt;2000022608&lt;/P&gt;&lt;P&gt;2000022607&lt;/P&gt;&lt;P&gt;2000022196&lt;/P&gt;&lt;P&gt;2000005193&lt;/P&gt;&lt;P&gt;100054788&lt;/P&gt;&lt;P&gt;100054787&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;sb.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 10:03:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878351#M675853</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T10:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878352#M675854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;than check the values in debug and if they are not right aligned (in the field), than do what I suggested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT doknr RIGHT DELETING TRAILING SPACE (of course in a LOOP on each single line)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;than the SORT itab BY ... DESCENDING.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 10:08:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878352#M675854</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2007-10-02T10:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Internal table sort problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878353#M675855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all, problem resolved with type N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 10:12:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-sort-problem/m-p/2878353#M675855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-02T10:12:25Z</dc:date>
    </item>
  </channel>
</rss>

