<?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 Sort logic in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229800#M479607</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;I have the following known values on the left hand side&lt;/P&gt;&lt;P&gt;1----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;(1)&lt;/P&gt;&lt;P&gt;10----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;(5)&lt;/P&gt;&lt;P&gt;10.5-------(6)&lt;/P&gt;&lt;P&gt;1.5----&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;(2)&lt;/P&gt;&lt;P&gt;2----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt; (3)&lt;/P&gt;&lt;P&gt;2.5----&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;(4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and would want to give a number in parentheses to the corresponding number on the left hand side, so when sorting the number in parentheses the number will be sorted in the following order:&lt;/P&gt;&lt;P&gt;1----&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;(1)&lt;/P&gt;&lt;P&gt;1.5----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;(2)&lt;/P&gt;&lt;P&gt;2----&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;(3)&lt;/P&gt;&lt;P&gt;2.5----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;(4)&lt;/P&gt;&lt;P&gt;10----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;(5)&lt;/P&gt;&lt;P&gt;10.5----&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;(6)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I write a logic to assign the numbers in paraentheses to the number on the left hand side?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2007 21:55:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-24T21:55:02Z</dc:date>
    <item>
      <title>Sort logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229800#M479607</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;I have the following known values on the left hand side&lt;/P&gt;&lt;P&gt;1----&lt;/P&gt;&lt;HR originaltext="-------" /&gt;&lt;P&gt;(1)&lt;/P&gt;&lt;P&gt;10----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;(5)&lt;/P&gt;&lt;P&gt;10.5-------(6)&lt;/P&gt;&lt;P&gt;1.5----&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;(2)&lt;/P&gt;&lt;P&gt;2----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt; (3)&lt;/P&gt;&lt;P&gt;2.5----&lt;/P&gt;&lt;HR originaltext="----" /&gt;&lt;P&gt;(4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and would want to give a number in parentheses to the corresponding number on the left hand side, so when sorting the number in parentheses the number will be sorted in the following order:&lt;/P&gt;&lt;P&gt;1----&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;(1)&lt;/P&gt;&lt;P&gt;1.5----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;(2)&lt;/P&gt;&lt;P&gt;2----&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt;(3)&lt;/P&gt;&lt;P&gt;2.5----&lt;/P&gt;&lt;HR originaltext="-----" /&gt;&lt;P&gt;(4)&lt;/P&gt;&lt;P&gt;10----&lt;/P&gt;&lt;HR originaltext="------" /&gt;&lt;P&gt;(5)&lt;/P&gt;&lt;P&gt;10.5----&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;(6)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I write a logic to assign the numbers in paraentheses to the number on the left hand side?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 21:55:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229800#M479607</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T21:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sort logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229801#M479608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;concatenate '(' lv_number ')' into lv_paranthesis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;increment the lv_number for every record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward the points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 22:06:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229801#M479608</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T22:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sort logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229802#M479609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Each number in the parentheses does not necessarily have to be in parentheses per your suggestion; it is just an example to explain my approach. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I shoud rephrase the question:&lt;/P&gt;&lt;P&gt;I have the following know numbers&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10.5&lt;/P&gt;&lt;P&gt;1.5&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and would want to sort them in the following order. How would I write a logic to get the sorted results?:&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;1.5&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2.5&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 22:20:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229802#M479609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T22:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sort logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229803#M479610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if that field type is character it will sort automatically. what is the field type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 22:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229803#M479610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T22:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Sort logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229804#M479611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first sort tne  table by ascending order and &lt;/P&gt;&lt;P&gt;loop through each record incrementing the counter and concatenate the braces to it for the second field &lt;/P&gt;&lt;P&gt;i hope this should help you .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Srinu reddy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 22:39:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229804#M479611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T22:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sort logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229805#M479612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a type CHAR and I want to sort it to be of type number in sequence 1, 1.5, 2, 2.5...10 and not of tyoe CHAR in the following order&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;10.5&lt;/P&gt;&lt;P&gt;1.5&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;2.5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 22:45:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229805#M479612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T22:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sort logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229806#M479613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this field should be type P and give decimals as per your requirement then it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if it is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phanindra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 23:07:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229806#M479613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-24T23:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sort logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229807#M479614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's the main purpose of this question. The type must be CHAR, and the values are numbers. So I trying to find a way to somehow give the sequence of indexes for these numbers and sort by the index. I am trying to see if anyone has done this and can give me some pseudo code. This was explained originally when I posted the question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table of these value numbers but the field is type CHAR. When I sort the column field, it will sort according to type CHAR, but I want to see the numeric sort for this column. I was thinking that I would add another field to this table and give the column field the type P, but how would I write a program to determine what index of type P to assign to the field column of type CHAR. Each field of type CHAR will have the index value of type P, and I would sort using the index field and not the field type CHAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 00:00:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229807#M479614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T00:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sort logic</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229808#M479615</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;As you said, have an another column with type P..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then when you move the values to the character field move the same value to the type P field also..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you sort ...sort by the type P column..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 00:09:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sort-logic/m-p/2229808#M479615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-25T00:09:38Z</dc:date>
    </item>
  </channel>
</rss>

