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

select option

Former Member
0 Likes
1,134

Hi experts,

I have a report which takes values from the select option.

I have defined is as I BT LOW HIGH.

but in the selection screen it is taking values in between the given values.

How do i write it such that i want the values including the range given in select option.

11 REPLIES 11
Read only

former_member386202
Active Contributor
0 Likes
1,106

Hi,

In ur INITIALIZATION event pass all the select options values.

Regards,

Prashant

Read only

former_member195698
Active Contributor
0 Likes
1,106

please explain in detail. also provide the code that you hvae used

Read only

Former Member
0 Likes
1,106

Hi Mona,

since u have given 'I', it will take the valus including the range..

just check in the database table if u have the values for the range ends.

Thank you.

Read only

Former Member
0 Likes
1,106

Hi Mona,

Define I, IN, LOW, HIGH, i.e use the <b>IN</b> option instead of <b>BT</b> and you will get the result that you want.

<b>Kindly Reward points if you found the reply helpful.</b>

Cheers,

CHAITANYA.

Read only

Former Member
0 Likes
1,106

Hi Mona,

When ever you use select options, u have to write a code against it as per your requirement.

For Example consider :::

DATA:username TYPE usr02.

SELECT-OPTIONS uname FOR username-bname NO INTERVALS.

I this case, uname will behave like an internal table, now u could do:

1) Loop on this itab uname as per you require

LOOP AT uname WHERE sign = 'I'.

if uname-option = 'EQ' OR uname-option = 'BT'.

2) use in select query using WHERE Clause as

SELECT *

  • FROM table

  • INTO CORRESPONDING FIELDS OF TABLE it_iatb

  • WHERE fieldname IN uname.

This will automatically take care of your all select options ......

<b>Kindly Reward if useful

Rohit G</b>

Read only

Former Member
0 Likes
1,106

Hi

UNDER INITIALIZATION EVENT when your declaring the default values give the values for that select options as like this

selectoption-low = '1000'.

selectoption-high = '2000'.

selectoption-option = ;i'.

selectoption-sign = 'BT'

here selectoption means your select option filed name

<b>option is I means INCLUDE

E means EXCLUDE</b>

so if you give that vlaue as I then it will take INCLUDED that range values also

Read only

Former Member
0 Likes
1,106

hi mona,

since u r giving the option BT which means between so it will take the values in between.

in order to get those values only instead of bt put EQ..

this will work.

regards,

sohi

Read only

Former Member
0 Likes
1,106

But i am giving I also so that means including rite.

Read only

0 Likes
1,106

Hi Mona,

Please refer my previous post for this thread.. i have said the same thing..

Please refer.. u may get some hint again

Read only

0 Likes
1,106

HI MONA

YES "I" MEANS IT WILL INCLUDE THAT VALUES ALSO

IF IT IS "E" THEN EXCULDE THAT VALUES

I THINK YOUR PROBLEM IS SOLVED

IF YOU HAVE ANY QUERY YOU MAY POST AGAIN

YOUR ALL WAYS WELCOME

Read only

0 Likes
1,106

if you are finding error in the select query

try to use

select * from tab_name where req_field iIN select_option.

select_option is the name of field in selection screen

tab_name is the field in table

if this does not help you i would advice you to use debugger

here use the slect ooption variable as a watchpoint and view its value one by one using F5

reward if useful