<?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: regarding sorting the field. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759810#M1116089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Puneet,&lt;/P&gt;&lt;P&gt;Can you show us the statement for the sorting of the internal table.&lt;/P&gt;&lt;P&gt;As of now I am writting you the sample statement for this. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SORT ITAB BY POSNR.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try this statement just remove itab and enter your internal table name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Nov 2008 08:25:47 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-05T08:25:47Z</dc:date>
    <item>
      <title>regarding sorting the field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759809#M1116088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Team.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a requirement as below mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POSNR TYPE STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value comes as follows 80 90 100 20 ...so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to sorting this field but i am getting output as follows &lt;/P&gt;&lt;P&gt;100 20 80 90 . but this is wrong i want output as follows 20 80 90 100 .  we can't change type string to any . is there any method to sort to posnr value .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;Puneet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 08:22:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759809#M1116088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T08:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: regarding sorting the field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759810#M1116089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Puneet,&lt;/P&gt;&lt;P&gt;Can you show us the statement for the sorting of the internal table.&lt;/P&gt;&lt;P&gt;As of now I am writting you the sample statement for this. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
SORT ITAB BY POSNR.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Try this statement just remove itab and enter your internal table name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 08:25:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759810#M1116089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T08:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: regarding sorting the field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759811#M1116090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its a string field and not a numeric field. Hence your result is like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you can't change the type from string to something like a type N, You could try to add leading zeroes to each value and sort then, Just choose a certain max length to do so. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example.&lt;/P&gt;&lt;P&gt;Assume your position number will not exceed a length of 6 positions, then 6 is your max length.&lt;/P&gt;&lt;P&gt;When you add leading zeroes, the values will turn into:&lt;/P&gt;&lt;P&gt;000100&lt;/P&gt;&lt;P&gt;000080&lt;/P&gt;&lt;P&gt;000090&lt;/P&gt;&lt;P&gt;000110&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw. i haven't tried this out myself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 08:33:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759811#M1116090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T08:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: regarding sorting the field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759812#M1116091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;U can add another field in that internal table of type POSNR and copy this posnr values to that field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then sort on that field...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 08:37:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759812#M1116091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T08:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: regarding sorting the field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759813#M1116092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried with SORT itab by posnr. but it's string so taking sort with first character and based on first character due to sorting output comes as follows : 100 20 80 90.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 08:38:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759813#M1116092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T08:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: regarding sorting the field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759814#M1116093</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;Refer to this thread&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1112544"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Manasa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 08:50:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759814#M1116093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T08:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: regarding sorting the field.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759815#M1116094</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;  &lt;STRONG&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;EXPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;INPUT  = I_POSNR&lt;/STRONG&gt;     &lt;/P&gt;&lt;P&gt;    &lt;STRONG&gt;IMPORTING&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;      &lt;STRONG&gt;OUTPUT = O_POSNR.&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;convert the posnr using the above FM.then append it to the internal table.&lt;/P&gt;&lt;P&gt;now you can SORT by POSNR. if you want the original value like 10,20 you can have additional field posnr1&lt;/P&gt;&lt;P&gt;for sorting or you can use FM CONVERSION_EXIT_ALPHA_OUTPUT for restore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Nov 2008 09:07:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/regarding-sorting-the-field/m-p/4759815#M1116094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-05T09:07:47Z</dc:date>
    </item>
  </channel>
</rss>

