<?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: Range in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274098#M494297</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;check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-select-options-ranges.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-select-options-ranges.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 May 2007 05:04:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-14T05:04:11Z</dc:date>
    <item>
      <title>Range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274097#M494296</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;Please let me know the difference between select-option and Range???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 05:02:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274097#M494296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T05:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274098#M494297</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;check this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/difference-between-select-options-ranges.htm" target="test_blank"&gt;http://www.sap-img.com/abap/difference-between-select-options-ranges.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;bharat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 05:04:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274098#M494297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T05:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274099#M494298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reema,&lt;/P&gt;&lt;P&gt;               Select-options is used for taking input from user on selection screen while Ranges are used for defining range at selection screen so that user can enter values within that range. mainly ranges are used for restricting user from certain values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hemant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 05:07:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274099#M494298</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T05:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274100#M494299</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;Difference Between Select-Options &amp;amp; Ranges &lt;/P&gt;&lt;P&gt;What are the difference between SELECT-OPTIONS &amp;amp; RANGES? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here both SELECT-OPTIONS &amp;amp; RANGES works for the same purpose.  They both are used for the range selection from selection screen.  The main diff. between them is, while we use SELECT-OPTIONS system implicitly creates the select options internal table which contains the fields of SIGN,OPTION,LOW &amp;amp; HIGH. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; But in case of RANGES, this internal table should be defined explicitly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg. to SELECT-OPTIONS : &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT YARSELECT. 
TABLES YTXLFA1. 
SELECT-OPTIONS : VENDOR FOR YTXLFA1-LIFNR. 
INITIALIZATION. 
VENDOR-LOW    =   1000.               " It specifies the range starting value. 
VENDOR-HIGH    =   2000.               " It specifies the range ending value. 
VENDOR-OPTION  =  'BT'.                " specifies ranges value is in between. 
VENDOR-SIGN      = 'I'.                     "specifies both inclussive. 

APPEND VENDOR. 

- - - - 
- - - - 
SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB  
WHERE LIFNR IN VENDOR. 

Eg. to RANGES: 
------------------------- 

REPORT YARRANGE. 
TABLES YTXLFA1. 
RANGES: VENDOR FOR YTXFLA1-LIFNR. 

- - - -  
- - - -- 
- - - -  

SELECT LIFNR LAND1 NAME1 FROM LFA1 INTO TABLE ITAB  
WHERE LIFNR IN VENDOR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here with RANGES  user has to design an internal table with fields -  &lt;/P&gt;&lt;P&gt;SIGN,OPTION,LOW and HIGH EXPLICITLY. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;select-options: bukrs for zstock-bukrs. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Should the user fill in 'ABFI' in BUKRS on the selection screen, BUKRS will look like this: &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;IEQABFI &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;This is because BUKRS is set as a table as follows: &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;begin of bukrs occurs 0, 
  SIGN(1)    type c, 
  OPTION(2) type c, 
  LOW         like bukrs, 
  HIGH         like bukrs, 
end of bukrs.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Now, when you create the following range, it will have the exact same fields set inside its table: &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Ranges: bukrs for zstock-bukrs. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;The difference is, because ranges doesn't show on the selection screen, you will have to fill it yourself, meaning you will have to fill bukrs-sign, bukrs-option, bukrs-low &amp;amp; bukrs-high all manually. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Some tips: &lt;/P&gt;&lt;P&gt;Sign is always I (for Include) or E (for Exclude) &lt;/P&gt;&lt;P&gt;Option can be a whole range, which includes: &lt;/P&gt;&lt;P&gt;EQ        (Equal)  &lt;/P&gt;&lt;P&gt;BT        (Between))  &lt;/P&gt;&lt;P&gt;CP        (Contain Pattern) &lt;/P&gt;&lt;P&gt;So let's say you want to have the range check for all company codes not starting with AB, you will set your code as follow: &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ranges: bukrs for zstock-bukrs. 
  
bukrs-sign = 'E'.             "Exclude 
bukrs-option = 'CP'.        "Pattern 
bukrs-low = 'AB*'.            "Low Value 
bukrs-high = ''.                "High Value 
append bukrs. 
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Always remember to APPEND your range when you fill it, as the WHERE clause checks against the lines of the range table, not against the header line. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Hope this explains it well enough. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------------------------------------------------------------------------------" /&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What does SIGN "I" &amp;amp; "E" mean? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "I" stands for Include, and the "E" for Exclude. &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;The easiest way to learn how the range selections work is, create the following dummy program: &lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zdummy. 
tables: mara. 
select-options: matnr for mara-matnr. 
start-of-selection. 
loop at matnr. 
write: / matnr-sign, 
           matnr-option, 
           matnr-low, 
           matnr-high. 
endloop.&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;Reshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 05:12:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274100#M494299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T05:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274101#M494300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ranges are similar to Select-options. &lt;/P&gt;&lt;P&gt;1) in select-options it give an advantage to user to enter his selection. No display it acts as ranges but some disadvantages are there if you create variant for select options and modify the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But depending on your requirement you should use them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;SaiRam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 05:12:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274101#M494300</guid>
      <dc:creator>former_member196280</dc:creator>
      <dc:date>2007-05-14T05:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274102#M494301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Reema,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer this thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2851436"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 05:14:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274102#M494301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T05:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Range</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274103#M494302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Both Select-options and Ranges are used to accept some range of values for a particular field which we declare.&lt;/P&gt;&lt;P&gt;We declare seelct-options on selection screen where as Ranges are decalre in the program&lt;/P&gt;&lt;P&gt;syntax is same in both cases we use s_kunnr for kna1-kunnr like.&lt;/P&gt;&lt;P&gt;In both cases a selection table(internal tables) with 4 fields like SIGN, OPTION, LOW and HIGH is created and the values are stored in it.&lt;/P&gt;&lt;P&gt;Generaly we use select-options to give a sequence of values i.e from 100 to 200 like that, where as we use ranges to store some numbers which are not in sequence, like 100, 159,245,1223, 4567 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2007 05:14:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/range/m-p/2274103#M494302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-14T05:14:18Z</dc:date>
    </item>
  </channel>
</rss>

