‎2007 Jul 06 9:41 AM
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.
‎2007 Jul 06 9:45 AM
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
‎2007 Jul 06 9:43 AM
hi,
It depends on the select query u have written.
whenever the field is blank it retrieves all the fields from the dictionary.
‎2007 Jul 06 9:44 AM
hi
yes u r right..
when we give the parameter option there should be some value...
‎2007 Jul 06 9:45 AM
‎2007 Jul 06 9:45 AM
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
‎2007 Jul 06 9:51 AM
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.
‎2007 Jul 06 9:54 AM
‎2007 Jul 06 9:45 AM
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.
‎2007 Jul 06 9:46 AM
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
‎2007 Jul 06 9:48 AM
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...
‎2007 Jul 06 9:58 AM
‎2007 Jul 06 10:20 AM
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