<?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 Internal table by Color Code in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table-by-color-code/m-p/1259472#M147160</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take one field sort in itab.&lt;/P&gt;&lt;P&gt;Modify itab like,&lt;/P&gt;&lt;P&gt;itab-sort = 1 where color = '#FF0000' &lt;/P&gt;&lt;P&gt;itab-sort = 2 where color = '#FFFF00' &lt;/P&gt;&lt;P&gt;itab-sort = 3 where color = '#008000'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort Itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Apr 2006 12:45:54 GMT</pubDate>
    <dc:creator>naimesh_patel</dc:creator>
    <dc:date>2006-04-19T12:45:54Z</dc:date>
    <item>
      <title>Sorting Internal table by Color Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table-by-color-code/m-p/1259471#M147159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I need a help in sorting the internal table by color_code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an Internal Table with the field Color_code.&lt;/P&gt;&lt;P&gt;The Color_code Contains HTML Color  values, like &lt;/P&gt;&lt;P&gt;1.'#FF0000' - Red&lt;/P&gt;&lt;P&gt;2.'#FFFF00' - Yellow &lt;/P&gt;&lt;P&gt;3.'#008000' - Green&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to sort the color code by red,yellow than green&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Sort I_PARTS by color_code (red, yellow then green boxes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls let me know how to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 12:43:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table-by-color-code/m-p/1259471#M147159</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T12:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Internal table by Color Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table-by-color-code/m-p/1259472#M147160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take one field sort in itab.&lt;/P&gt;&lt;P&gt;Modify itab like,&lt;/P&gt;&lt;P&gt;itab-sort = 1 where color = '#FF0000' &lt;/P&gt;&lt;P&gt;itab-sort = 2 where color = '#FFFF00' &lt;/P&gt;&lt;P&gt;itab-sort = 3 where color = '#008000'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort Itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 12:45:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table-by-color-code/m-p/1259472#M147160</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2006-04-19T12:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Internal table by Color Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table-by-color-code/m-p/1259473#M147161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As the color code values will NOT help you SORTING the way you want, have an additional field and assign appropriate values and SORT by that field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 12:48:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table-by-color-code/m-p/1259473#M147161</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-19T12:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Internal table by Color Code</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table-by-color-code/m-p/1259474#M147162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to use a special sort field here.  Have a field in your internal to hold the sequence that you desire.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;case itab-color .
when '#FF00000'.
itab-sortseq = 1.
 

when '#FFFF000'.
itab-sortseq = 2.
 

when '#008000'.
itab-sortseq = 3.
 
endcase.

modify itab.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sort itab ascending by sortseq.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2006 12:49:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sorting-internal-table-by-color-code/m-p/1259474#M147162</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-04-19T12:49:47Z</dc:date>
    </item>
  </channel>
</rss>

