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

how to get default values on selection screen(multiple ranges)?

Former Member
0 Likes
1,397

i want to know how to maintain default ranges in selection screen...like 2000 to 3000 and 7000 to 8000 and 11000 to 15000

all the above ranges must get by default how to provide those to selection screen by default...please give me idea...with example...

i want to know how to maintain default ranges in selection screen...like 2000 to 3000 and 7000 to 8000 and 11000 to 15000

all the above ranges must get by default how to provide those to selection screen by default...please give me idea...with example...

6 REPLIES 6
Read only

Former Member
0 Likes
1,115

Hi,

By creating selection screen variants......and give the ranges you need in it..save it...

Regards

Debarshi

Read only

Former Member
0 Likes
1,115

Hi,

Check the following code:

At selection-screen output.

s_var-low = '7000'
s_var-high = '8000'.
append s_var.

Thanks & Regards,

Navneeth K.

Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
1,115

Hello,

Maintain the range table and fill the select-options under INITIALIZATION event.

Rgds,

Sandeep

Read only

peter_ruiz2
Active Contributor
0 Likes
1,115

hi suresh,

you can use a variant or you can write this on your code

select-options: v_range for t001-bukrs.

initialization.

v_range-sign = 'I'.

v_range-option = 'BT'.

v_range-low = '2000'.

v_range-high = '3000'.

append v_range.

clear v_range.

v_range-sign = 'I'.

v_range-option = 'EQ'.

v_range-low = '7000'.

v_range-high = '8000'.

append v_range.

clear v_range.

v_range-sign = 'I'.

v_range-option = 'EQ'.

v_range-low = '11000'.

v_range-high = '15000'.

append v_range.

clear v_range.

regards,

Peter

Read only

Former Member
0 Likes
1,115

Hi,

Check

Link: [Ranges|http://help.sap.com/saphelp_webas620/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/content.htm]

Read only

Former Member
0 Likes
1,115

Hi Suresh,

You can either use select-options or Ranges. If you want the selection screen to be displayed with allwoing user to enter values apart for the default ones use select options else use ranges. With ranges what ever values use hard code would be set and the end user will not be able to add any more values (or range of values).

Simply write the following code

tables : <name of the table from which the field belongs>

select-options <fieldname> for <tablename>-<fieldname>.

<fieldname>-sign = 'I'.

<fieldname>-option = 'BT'.

<fieldname>-low = '7000'.

<fieldname>-high = '8000'.

append <fieldname>..

similiarly add all the ranges that you need to include as default and in your select statement use the IN operator inthe where clause to include the range.

If using range replacethe select-option with the range statement.

Thanks.