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

List box values on selection screen

Former Member
0 Likes
1,051

Hi all,

At the selection screen, i have the start date, end date and the list box which displays the location.when the user gives the dates and selects the location of the list box. It has to give you the detailed report based on the location selected but if the list is not selected it should give the output for all the location. Please help me how to do this.

Thanks & regards

1 ACCEPTED SOLUTION
Read only

anuj_srivastava
Active Participant
0 Likes
977

Hi Manvendra ,

Just add one more criteria in your select query where you are fetching data based on date.

Select <some_data>

from <some_table>

where date in <something> and

location in s_location.

where s_location is ur select - option.

Regards,

Anuj

Hi all,

At the selection screen, i have the start date, end date and the list box which displays the location.when the user gives the dates and selects the location of the list box. It has to give you the detailed report based on the location selected but if the list is not selected it should give the output for all the location. Please help me how to do this.

Thanks & regards

5 REPLIES 5
Read only

anuj_srivastava
Active Participant
0 Likes
978

Hi Manvendra ,

Just add one more criteria in your select query where you are fetching data based on date.

Select <some_data>

from <some_table>

where date in <something> and

location in s_location.

where s_location is ur select - option.

Regards,

Anuj

Read only

0 Likes
977

Hi,

Thanks for the reply.But the location parameter is a list box .

Read only

0 Likes
977

Hi,

If you can use Select-option with no-extension no intervals

instead of using parameters then it should works.

e.g. Select-option : s_field For table-field no-extension no intervals.

Regards,

Vijay

Read only

0 Likes
977

Hi Manvendra ,

Either you can do it in the way Raymond has told you or you can put a logic to do this.

Put a if condition for the select query.

If data is inputted in the location parameter then you can fethc the data based on that value otherwise follow the same old select query.

If S_location is initial.

select <some_data>

from <some_table>

where < conditions> and

location EQ s_location.

Else.

select <some_data>

from <some_table>

where < conditions> .

Endif.

Regards,

Anuj

Read only

RaymondGiuseppi
Active Contributor
0 Likes
977

You may

- check if the listbox has been selected between two SELECT statements one with an EQ test, the other without test on location

- declare the listbox parameter as a SELECT-OPTIONS NO-EXTENSION NO INTERVALS and use a IN in the WHERE CLAUSE

Regards,

Raymond