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/Parameter

kiran_k8
Active Contributor
0 Likes
1,010

Hi Folks,

I have declared two variables vendor and PO Doc Type along with the other fields in the selection screen and was not able to understand the way it behaves.

vendor and potype are declared as select-option no intervals.

In that way the select statement is selecting the data even if we leave the fields blank in the selection screen.

But,

When I declare the vendor as select option no intervals and potype as parameter

and leave the fields as blank it is not selecting the data.If I gve some value to POtype then it is working fine.

So,does it mean that if we declare a variable as parameter,is it a must to given some value in the selection screen?

Kindly let me know.

K.Kiran.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
965

Hi Kiran,

If you declare the selection screen variable as parameter and using this in the WHERE clause of query then it should have some value.

This is not the case with select option.

Why is it like this.

PARAMETER in WHERE clause - The select statement treat it as a single field so you need to fill it.

SELECT-OPTION - It is treated as the no. of fields, so nothing is filled in this ...that means select ALL

Hope it is clear.

Regards,

Atish

11 REPLIES 11
Read only

Former Member
0 Likes
965

hi,

It depends on the select query u have written.

whenever the field is blank it retrieves all the fields from the dictionary.

Read only

Former Member
0 Likes
965

hi

yes u r right..

when we give the parameter option there should be some value...

Read only

Former Member
0 Likes
965

HI Kiran.

pls post your code here.

regards.

Jay

Read only

Former Member
0 Likes
966

Hi Kiran,

If you declare the selection screen variable as parameter and using this in the WHERE clause of query then it should have some value.

This is not the case with select option.

Why is it like this.

PARAMETER in WHERE clause - The select statement treat it as a single field so you need to fill it.

SELECT-OPTION - It is treated as the no. of fields, so nothing is filled in this ...that means select ALL

Hope it is clear.

Regards,

Atish

Read only

0 Likes
965

Atish,

The logic you have given is applying the same with my program.So,if we declare a parameter and use in the where clause then we have to give some value else it will not work.Can I take it for granted?

Thanks a ton.

K.Kiran.

Read only

0 Likes
965

Yes Kiran.

Regards,

Atish

Read only

Former Member
0 Likes
965

It's not must to give a value in the selection screen.

The whole functionality is as, " When ever you give any value as parameter, the process will be based on only that parameter. If you specify a value in select-option .... no-interval, this acts similar to a parameter. But when you wont give any value in the selection screen, all the values of that field in the database table are selected".

Regards,

Pavan P.

Read only

Former Member
0 Likes
965

Hi KIran

If u declare paramater or select-option thats make no difference its all depends on your select statement.

Reward all helpfull answers

Regards

Pavan

Read only

Former Member
0 Likes
965

hi Kiran,

Yes you are correct,

For parameter when we give field as blank , it will not work , so you have to make that field as mandatory...

Read only

Former Member
0 Likes
965

yes , kiran

Read only

0 Likes
965

Hi Kiran,

Yes, U r correct.

When we r using select-options if we not give i/p it will display all values.

when we r using parameters if we not giving i/p it will ask to enter i/p.

IF Answer Is Useful Reward Points.

Regards:

Raju.R