<?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: selection order in SELECT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833957#M1130925</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ranges:&lt;/P&gt;&lt;P&gt;    lr_fkart   for  vbrk-fkart,&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;  lr_fkart-sign   = 'I'.&lt;/P&gt;&lt;P&gt;  lr_fkart-option = 'EQ'.&lt;/P&gt;&lt;P&gt;  lr_fkart-low    = 'SO_low'.&lt;/P&gt;&lt;P&gt;  lr_fkart-high    = 'SO_high'.&lt;/P&gt;&lt;P&gt;  append lr_fkart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now use this lr_fkart in where condition.(OR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once fetching data into an internal table .just compare this with the order range table (lr_fkart) and append it to some another table. hope this may help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UR's&lt;/P&gt;&lt;P&gt;GSANA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Nov 2008 09:51:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-20T09:51:26Z</dc:date>
    <item>
      <title>selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833942#M1130910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ppl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a select-option field on my selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am selecting data from a database table based on the entries from this select-option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that in the select-option, the user can enter the data in any order.&lt;/P&gt;&lt;P&gt;For eg. &lt;/P&gt;&lt;P&gt;9000 to 9500, &lt;/P&gt;&lt;P&gt;8452, &lt;/P&gt;&lt;P&gt;8245, &lt;/P&gt;&lt;P&gt;8375, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SELECT statement selects entries in the internal table in ascending order ALWAYS.&lt;/P&gt;&lt;P&gt;eg. &lt;/P&gt;&lt;P&gt;8254, &lt;/P&gt;&lt;P&gt;8375, &lt;/P&gt;&lt;P&gt;8452, &lt;/P&gt;&lt;P&gt;9000 &lt;/P&gt;&lt;P&gt;to &lt;/P&gt;&lt;P&gt;9500, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me find a solution to sort this internal table according to the order of entries on the selection screen.&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, 20 Nov 2008 08:34:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833942#M1130910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T08:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833943#M1130911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can i ask u sth. WHY DO U NEED TO DO THIS ????? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 08:38:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833943#M1130911</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-11-20T08:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833944#M1130912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, I can't disclose the actual requirement.&lt;/P&gt;&lt;P&gt;But, I hope you have understood the requirement.&lt;/P&gt;&lt;P&gt;Please let me know if you have any solution to achieve this.&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, 20 Nov 2008 08:42:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833944#M1130912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T08:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833945#M1130913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have an internal table with two fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one for the entries in select option and the next field for storing the order.&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;value  order&lt;/P&gt;&lt;P&gt;8024  1&lt;/P&gt;&lt;P&gt;450    2&lt;/P&gt;&lt;P&gt;500    3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once the select query fills the internal table , refer the previous internal table for order .&lt;/P&gt;&lt;P&gt;copy the order field to ur new internal table for respective values&lt;/P&gt;&lt;P&gt;sort the table based on the newly added field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 08:54:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833945#M1130913</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T08:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833946#M1130914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a BIG doubt???&lt;/P&gt;&lt;P&gt;Do u have more than one SELECT-OPTION for an SINGLE FIELD?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 08:57:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833946#M1130914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T08:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833947#M1130915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.. You cannot do this within the select statement itself. But you can try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select field1 field2....
from database_table
into internal_table_1
where field = select-option.

loop at select-option.

read table internal_Table_1 into work_area with key field = select-option-low.
if sy-subrc = 0.
append work_area to internal_Table_2.
endif.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal_Table_2 should be of same structure as of internal_Table_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The contents of internal_table_2 will have the entries as you asked.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 08:58:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833947#M1130915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T08:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833948#M1130916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ZeroABAPer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tell me how will you handle the case for the SELECT-OPTION having LOW &amp;amp; HIGH values using yor bit of code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:09:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833948#M1130916</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-11-20T09:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833949#M1130917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ZeroAbaper,&lt;/P&gt;&lt;P&gt;This code can't handle situations where both LOW and HIGH values are entered.&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, 20 Nov 2008 09:18:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833949#M1130917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T09:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833950#M1130918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You do not require any code at all, incase, if both HIGH and LOW values are entered. Your selection will automatically fetch the necessary values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can modify the code, which i have given by introducing an IF condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
if Select-option-high is initial.
...code here.
endif.
"Proceed from here as per your requirement.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833950#M1130918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T09:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833951#M1130919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suppose you are having SY-TABIX as select-option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You enter the values as 15 to 50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need not modify anything in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you enter single entries like 15,20,25 and 50.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, execute the code which i gave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope.. it helps... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:24:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833951#M1130919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T09:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833952#M1130920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Zeroabaper,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lemme point out sth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S_SCR-LOW = 15, S_SCR-HIGH = 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After SELECT stmt IT1 contents --&amp;gt; 15, 16, 17, 18, 19, 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we use ur code IT2 will have only 15 &amp;amp; not all the entries in IT1. Correct me if i am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:31:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833952#M1130920</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-11-20T09:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833953#M1130921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right .. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt; ... but as per my previous post, you &lt;STRONG&gt;dont&lt;/STRONG&gt; have to use the code for internal table 2, if SELECT-OPTION-HIGH is having any value....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Introduce the IF condition and proceed....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what do you say..??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:35:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833953#M1130921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T09:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833954#M1130922</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;With David not disclosing his queer requirement &amp;amp; we have no option bt to work on this &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frankly i was thinking the only way to do so will be the way u ve mentioned. But then dropped the idea bcoz of the probs as mentioned by me above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833954#M1130922</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-11-20T09:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833955#M1130923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;The select-option internal table looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SIGN  OPTION LOW   HIGH&lt;/P&gt;&lt;P&gt;I           EQ       8446&lt;/P&gt;&lt;P&gt;I           BT        9260   9275&lt;/P&gt;&lt;P&gt;I           EQ       9224&lt;/P&gt;&lt;P&gt;I           EQ       8275&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need the entries in exactly the same order.&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;8446&lt;/P&gt;&lt;P&gt;9261&lt;/P&gt;&lt;P&gt;9265&lt;/P&gt;&lt;P&gt;9224&lt;/P&gt;&lt;P&gt;8275&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, 20 Nov 2008 09:42:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833955#M1130923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T09:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833956#M1130924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at s_option
if s_option = 'EQ'.
  wa_itab-entry = s_option-low.
  append wa_itab to t_itab.
  continue.
endif.
if s_option = 'BT'.
  do.
  w_count = s_option-low.
  wa_itab-entry = w_count.
  w_count = w_count + 1.
  append w_count to t_itab.
  while w_count &amp;gt; s_option-high.
endloop.
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:50:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833956#M1130924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T09:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833957#M1130925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ranges:&lt;/P&gt;&lt;P&gt;    lr_fkart   for  vbrk-fkart,&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;  lr_fkart-sign   = 'I'.&lt;/P&gt;&lt;P&gt;  lr_fkart-option = 'EQ'.&lt;/P&gt;&lt;P&gt;  lr_fkart-low    = 'SO_low'.&lt;/P&gt;&lt;P&gt;  lr_fkart-high    = 'SO_high'.&lt;/P&gt;&lt;P&gt;  append lr_fkart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now use this lr_fkart in where condition.(OR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once fetching data into an internal table .just compare this with the order range table (lr_fkart) and append it to some another table. hope this may help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UR's&lt;/P&gt;&lt;P&gt;GSANA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:51:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833957#M1130925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T09:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833958#M1130926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per the above code, you will have the entries of the select options, as you wish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then loop into this table...read the table in which you have the data.. and append that data which you get into a third internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That internal table will have the values as you wish.. &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 09:53:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833958#M1130926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T09:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833959#M1130927</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;Came up with a novel soln. But will work only for numeric values &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT  ZTEST01335.

TABLES: T001.

TYPES:
  BEGIN OF TY_T001,
    BUKRS TYPE BUKRS,
  END   OF TY_T001.

DATA:
  IT1   TYPE STANDARD TABLE OF TY_T001,
  IT2   TYPE STANDARD TABLE OF TY_T001,
  WA    TYPE TY_T001,
  V_CNT TYPE I VALUE 1.

SELECT-OPTIONS: S_OPT FOR T001-BUKRS.

SELECT BUKRS
INTO TABLE IT1
FROM T001
WHERE BUKRS IN S_OPT.

IF SY-SUBRC = 0.
  SORT IT1 BY BUKRS.
  LOOP AT S_OPT.
    IF S_OPT-OPTION = 'EQ'.

      READ TABLE IT1 INTO WA
      WITH KEY BUKRS = S_OPT-LOW BINARY SEARCH.
      IF SY-SUBRC = 0.
        APPEND WA TO IT2.
        CLEAR WA.
      ENDIF.

    ELSEIF S_OPT-OPTION = 'BT'.

      V_CNT = S_OPT-LOW.

      DO.
        READ TABLE IT1 INTO WA
        WITH KEY BUKRS = V_CNT BINARY SEARCH.
        IF SY-SUBRC = 0.
          APPEND WA TO IT2.
          CLEAR WA.
        ENDIF.

        V_CNT = V_CNT + 1.

        IF V_CNT &amp;gt; S_OPT-HIGH.
          EXIT.
        ENDIF.
      ENDDO.

    ENDIF.
  ENDLOOP.

ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 10:07:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833959#M1130927</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2008-11-20T10:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833960#M1130928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;User input is stored in an internal table such as S_USER_INPUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Entries from select query are stored in internal table S_INT_TAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now For S_USER_INPUT-OPTION EQ 'BT' then fill internal table S_USER_INPUT2 with all enties between, similary for 'EQ' fill enties in S_USE_INPUT2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then LOOP AT S_USER_INPUT2 INTO WA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE S_INT_TAB FROM WA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF SUCCESSFUL READ THEN MOVE WA to INT_TAB2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE &lt;/P&gt;&lt;P&gt;CONTINUE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 10:21:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833960#M1130928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-20T10:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: selection order in SELECT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833961#M1130929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You loop at each row of the selection-option, inside the loop you move that row to another range, do the select using that range, &lt;U&gt;appending&lt;/U&gt; to your internal result table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Nov 2008 10:24:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-order-in-select/m-p/4833961#M1130929</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-11-20T10:24:57Z</dc:date>
    </item>
  </channel>
</rss>

