08-21-2007 7:51 AM
what is exact purpose of selection-screen 'ranges' and what are various advantages of using 'ranges' .its urgent please
08-21-2007 7:54 AM
Ranges is very usefull when you would like to make a SELECT with a list of values.
instead of
select ... into table ... from ... for all entries in ... where ...
you remove the "for all entries in".
It's just a problem of performance. Because for all entries make a lot of database access.
The danger with the ranges is the size, greater than 3000 entries, you will have a dump.
Fred
08-21-2007 7:54 AM
Ranges is very usefull when you would like to make a SELECT with a list of values.
instead of
select ... into table ... from ... for all entries in ... where ...
you remove the "for all entries in".
It's just a problem of performance. Because for all entries make a lot of database access.
The danger with the ranges is the size, greater than 3000 entries, you will have a dump.
Fred
08-21-2007 7:55 AM
Hi,
Ranges can be described as programatic version of select-option. They are used to filter data from database or internal table. They work similar to select-options.
Definition
RANGES : r_werks FOR mard-werks,
r_lgort FOR mard-lgort.
Filling it with data
r_werks-sign = 'I'.
r_werks-option = 'EQ'.
r_werks-low = p_werks1.
APPEND r_werks.
CLEAR r_werks.
Usage
SELECT * from marc where werks in r_werks.
Regards,
Sankar
08-21-2007 7:56 AM
SELECT-OPTIONS: Declare an internal table that is also linked to input fields on a selection screen
RANGES: Declare an internal table with the same structure as in select-options, but without linking it to a selection screen.
FOR FURTHER DOCUMENTATION PLEASE GO THROUGH THE LINK
Difference Between Select-Options & Ranges
Statical Declaration
Selection tables
<b>
Regards,
Azhar</b>
08-21-2007 7:57 AM
http://72.14.203.104/search?q=cache:btyoj86smhEJ:www.sap-img.com/abap/difference-between-select-opti...Select-optionsandrangesIN+ABAP&hl=en&gl=in&ct=clnk&cd=1
08-21-2007 7:56 AM
HI Sandeep,
Both SELECT-OPTIONS & 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 & HIGH. But in case of RANGES, this internal table should be defined explicitly.
Hope this helps.
08-21-2007 7:58 AM
HI,
Select-Options : They provides user with an option to enter value in the selection screen...... and it can be used in programs only.
Ranges : This provides a way to populate the range of values programatially and for further use.. e.g. if you want to pass a range of values to a select query to some function module then select options will not work.....then you have to go with ranges.
Thanks,CSR.
Please Reward if helpful.