Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

regardind selection screen

Former Member
0 Likes
671

what is the difference between ranges and select-options....

6 REPLIES 6
Read only

Bema
Active Participant
0 Likes
645

Both are used for range of values.

But Ranges will not appear in the selection-screen as select-options.

Read only

Former Member
0 Likes
645

Hi,

Here 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.

Select-options : s_pernr for pa0000-pernr.

(This is diaplayed on the selection screen)

Ranges : r_pernr for pa0000-pernr.

(This is not displayed on the sel. screen)

The structure for Select-options and ranges will be

the same.

Select options are mainly used in the initial selects

to filter the data based on the selection criteria.

If U already know what the values are,then ranges are

used.

Hope this info would help you out.

Thanks and Regards,

Varun.

Read only

former_member404244
Active Contributor
0 Likes
645

Hi,

plz go through the below link..

http://www.sap-img.com/abap/difference-between-select-options-ranges.htm

regards,

nagaraj

Read only

Bema
Active Participant
0 Likes
645

To be more specific,

Select-options : To declare an internal table (with fields sign,option,low high) that is also linked to input fields on a selection screen.

Ranges : To decalre an internal table with the same structure as in Select optionsbut without linking it to a selection screen.

Reward points, if helpful.

Read only

former_member196299
Active Contributor
0 Likes
645

Here are some of the basic differences between ranges and select options :

1) A select-option will appear on the selection screen, for the user to input values, whereas a range will not.

You have to populate values in a range through code. Select-option values can also be populated / modified with code, before and after user input.

There is no difference between the two except that one (select-options)gives a range input on the selection screen, and ranges must be filled programmatically.

use selct options when allowing the users to input the selections

use ranges to internally set up the data e.g. to select only limited type of FI documents on BKPF or setting up certain profit center or cost center ranges within the program.

Since the int. table generated is same select does not give any performance difference on the use of two.

2) SELECT-OPTIONS are for use on the selection screen and enable the user to enter/select input values for a Program. RANGES are for use inside the Program. In the program both SELECT-OPTION & RANGES are avialble during runtime just like any other internla table. Both of them have the same structure.

Reward if helpful !

Thanks

Ranjita

Read only

Former Member
0 Likes
645

Hi Geetha,

Both are used for range purpose only.

for Select-options is having an internal table with seltab with options high, low, option, sign.

in case of ranges u need to explicitly define those 4 parameters.

Regards,

Prasad.