<?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: data sorting problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081587#M1180107</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;PRE&gt;&lt;CODE&gt;SORT ZTABLE BY Material  Indentifier Descedning.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the first record,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2009 09:58:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-29T09:58:54Z</dc:date>
    <item>
      <title>data sorting problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081581#M1180101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DEar Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing the following problem....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got a ZTABLE in which pricing data is being maintained. the data is stored as shown below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Material           Indentifier From Batch To Batch Material Description                ZMRP  Z004

000000000000500073 1           A7095      A7111    MGL TABS 200 MG 1 X 10 SALES       4.10  0.40
000000000000500073 10          RM28001    RM28999  MGL TABS 200 MG 1 X 10 SALES       3.99  0.22
000000000000500073 11          TM28001    TM28999  MGL TABS 200 MG 1 X 10 SALES       3.99  0.22
000000000000500073 12          A2001      A5077    MGL TABS 200 MG 1 X 10 SALES       0.00  0.40
000000000000500073 13          A6217      A7094    MGL TABS 200 MG 1 X 10 SALES       0.00  0.39
000000000000500073 14          T8001      T8999    METROGYL  TABS 200 MG 1 X 10 SALES 3.99  0.22
000000000000500073 2           A7112      A8082    MGL TABS 200 MG 1 X 10 SALES       4.17  0.39
000000000000500073 3           A8083      A9999    MGL TABS 200 MG 1 X 10 SALES       3.99  0.22
000000000000500073 4           R7001      R8009    MGL TABS 200 MG 1 X 10 SALES       4.17  0.39
000000000000500073 5           R8010      R9999    MGL TABS 200 MG 1 X 10 SALES       3.99  0.22
000000000000500073 6           T7001      T7010    MGL TABS 200 MG 1 X 10 SALES       4.10  0.40
000000000000500073 7           T7011      T7015    MGL TABS 200 MG 1 X 10 SALES       4.09  0.39&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this under the column indentifer you can see the values 1,10,11,12,2,3 etc....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to call the record with the maximum indentifier i.e. in this case the 6th record with indentifier 14. But when i am sorting this data it is sorting in a different fashion. as shown above it stores entries with indentifier starting with 1 first, then it goes to the other record. As a result any way i sort in descending or ascending i do not the get the record with indentifier 14. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a critical one for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;removed_by_moderator&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jitesh M Nair&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vijay Babu Dudla on Jan 29, 2009 5:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:52:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081581#M1180101</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-29T09:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: data sorting problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081582#M1180102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Keep the identifier field as the first field in the internal table and sort it by descending order so that the largest identifier will be the first data in the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Khanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:55:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081582#M1180102</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-29T09:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: data sorting problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081583#M1180103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;just do this.&lt;/P&gt;&lt;P&gt; sort itab by identifier ascending.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081583#M1180103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-29T09:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: data sorting problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081584#M1180104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;looks like the field Identifier is defined as character. You have two options:&lt;/P&gt;&lt;P&gt;1. Define the field as integer, than the sorting will be OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Leave the field definition as it is, but when you fill up with data, use leading zeros. (01, 02, 03, ..., 10, 11)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:56:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081584#M1180104</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2009-01-29T09:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: data sorting problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081585#M1180105</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;Did u use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT ztable BY identifier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes show me ur code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:57:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081585#M1180105</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-29T09:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: data sorting problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081586#M1180106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello jbclp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

 SORT iinternal table BY indentifier DESCENDING.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;-Arun Kayal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Arun Kayal on Jan 29, 2009 11:01 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:58:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081586#M1180106</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-29T09:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: data sorting problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081587#M1180107</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;PRE&gt;&lt;CODE&gt;SORT ZTABLE BY Material  Indentifier Descedning.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the first record,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:58:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081587#M1180107</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-29T09:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: data sorting problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081588#M1180108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jitesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you have selected data from ZTABLE into internal table ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the stmt:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SORT ITAB BY MATERIAL IDENTIFIER DESCENDING. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Sorry Avinash !!! Cant help laughing it off &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Jan 29, 2009 3:29 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:58:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081588#M1180108</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-01-29T09:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: data sorting problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081589#M1180109</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;what is the type of the indentifier? if it is string or character, the sort command may result as your case. if it doesn't cause type conflict, change the data type of indentifier to integer and try it again.&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;Murat Kaya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 10:07:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-sorting-problem/m-p/5081589#M1180109</guid>
      <dc:creator>murat_kaya</dc:creator>
      <dc:date>2009-01-29T10:07:58Z</dc:date>
    </item>
  </channel>
</rss>

