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 options

Former Member
0 Likes
739

Hi ALL,

select lfart,lfdat,....

from likp

into..

where

lfart in s_lfart

and lfdat in s_lfdat

and..

.

when ever i select "=" option throgh multiple selection for a select option field(lfart) on selection screen.then the abov select query is failing since s_lfart is not initial.hw can i resolve it (even though i have used between in select query ).

hw to write the abv query when "=" is selected on the selection screen for that field.

Thanks&Regards,

Padma.

8 REPLIES 8
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
711

Hi,

In that case you can think of using FOR ALL ENTRIES and then use check the values agisnt LOW OR HIGH.

select lfart,lfdat,....

from likp

into..

for all entries in s_lfart

where

( lfart = s_lfart-low or lfart = s_lfart-high )

and lfdat in s_lfdat

and..

Regards,

Sesh

Read only

Former Member
0 Likes
711

Hi,

u can't use "=" when u are using select-options..... this is used when parameters is being used insted select-options.....

regards,

shardul shah

Read only

Former Member
0 Likes
711

Hi Padma,

You cannot use "=" while using Select option because, select option holds multiple values and you shall be trying to check a single value against many values.

if you would like to use "=" you should be checking it agains a single value out of Select option. i.e. either with S_LFDAT-HIGH / S_LFDAT-LOW. or use in between them.

<b>Reward points if this helps.</b>

Kiran

Read only

Former Member
0 Likes
711

Hi

When you declare Parameters then only you can use '=' in the where condition

parameters:p_lfart like likp-lfart.

select....from likp...into table itab where lfart<b> =</b> p_lfart.

When you declare SELECT-OPTIONS then only you can use 'IN' in the where condition

select-options:s_lfart for likp-lfart.

select....from likp...into table itab where lfart<b> IN</b> s_lfart.

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

0 Likes
711

hi anji,

i have declare lfart as select-option on selection screen.when i click on for multiple selection arrow button in that i will select "=" as option .that mean i have selected the "=" as value in option field of select-option table(sign,option,low,high).then i have to correct the selcet query.

Thanks&Regards,

Padma.

Read only

Former Member
0 Likes
711

select lfart,lfdat,....

from likp

into..

where

lfart <b>eq s_lfart-low</b>

and lfdat in s_lfdat

and..

Read only

Former Member
0 Likes
711

HI.

refer this code.

select lfart,lfdat,....

from likp

into..

where

lfart EQ s_lfart

and lfdat EQ s_lfdat.

Reward all helpfull answers.

Regards.

Jay

Read only

Former Member
0 Likes
711

hi,

you can't use '=' option while working with SELECT-OPTIONS.

you get that('=') option only when you provide the <b>s_field-LOW</b> value for the select-option input field in that case system performs all the iptions like EQ('=') , GT, LT ...except BT..

regards,

Ashok reddy