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 and parameter.

Former Member
0 Likes
568

I have select options and parameters in my selection screen. While extracting the data I am using both the select option and a parameter in where condition. But that select statement is not returning any data. Could any body tell me what might be the reason.

Thanks,

bsv.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
545

Bbsv,

if the parameter is left empty in selection screen it takes null as value of that parameter.So the query will run with

where <field> = ' '.So the query fails.

if the select option is left empty in selection screen,the query neglects that where clause and fetches all records.

Regards,

Will.

3 REPLIES 3
Read only

Former Member
0 Likes
545

can u provide me with code please

Read only

Former Member
0 Likes
546

Bbsv,

if the parameter is left empty in selection screen it takes null as value of that parameter.So the query will run with

where <field> = ' '.So the query fails.

if the select option is left empty in selection screen,the query neglects that where clause and fetches all records.

Regards,

Will.

Read only

Former Member
0 Likes
545

Hi,

See this example code it works.

tables spfli.

parameters p_carrid type spfli-carrid obligatory.

select-options s_connid for spfli-connid.

data itab type table of spfli with header line.

select *

from spfli into table itab

where carrid eq p_carrid

and connid in s_connid.

loop at itab.

write: / itab-carrid,

itab-connid.

endloop.

Note : Dont leave blank for parameters because it take as space and when you select from table it is unsuccessful.

Plzz Reward if it is useful,

Mahi.