‎2006 Nov 20 11:36 AM
hi experts,
in selection screen when i select the value in parameter it is giving the result but when i leave the blank in the parameter field it is not giving any result. it suppose to give all the values.
can anyone tell me what is the problem for this.
thanks in advance,
praveen.
‎2006 Nov 20 11:39 AM
Dear Praveen
Your assumption is correct for SELECT-OPTIONS but not for PARAMETERS.
When you use PARAMETERS; if you don't give any value the system will consider it as NULL (nothing or black) whereas when you use SELECT-OPTION if you don't give any value the system will consider it as all.
I hope you understand the difference.
Regards
Surya.
‎2006 Nov 20 11:39 AM
Dear Praveen
Your assumption is correct for SELECT-OPTIONS but not for PARAMETERS.
When you use PARAMETERS; if you don't give any value the system will consider it as NULL (nothing or black) whereas when you use SELECT-OPTION if you don't give any value the system will consider it as all.
I hope you understand the difference.
Regards
Surya.
‎2006 Nov 20 11:39 AM
can you paste the select statement you are using to retrieve data?
‎2006 Nov 20 11:39 AM
Hi,
A PARAMETER is just like a variable, when you don't give any value then you will not be getting a result.
In case of SELECT-OPTIONS that is just like a range of values and even if you don't give any values as input it will consider the whole range available.
PS : Reward if it is helpful
‎2006 Nov 20 11:40 AM
how it will give all the data ?
<b>select matnr from mara where matnr eq p_matnr</b> . So if my p_matnr eq ' ' , then u mean to say it should get the material whose number eq SPACE ?
regards
prabhu
‎2006 Nov 20 11:41 AM
If you leave the parameters blank, it will search for blank value in that field in the database.
Your statement is true for select options.
Regards,
Ravi
Note - Please mark all the helpful answers
‎2006 Nov 20 11:41 AM
parameter is not like selct-option.
when you are keeping it blank it will not give any output
to get the output on blank, use select-option with no interval option.
‎2006 Nov 20 11:41 AM
Hi Praveen,
If you use a parameter, it is expected behavior.
Empty parameter means that it tries to get a record with a space value for that parameter.
Instead you can use this statement.
select-options: s_matnr for mara-matnr no-extension no intervals.
and in your select:
select.....
....
where matnr in s_matnr.
‎2006 Nov 20 11:44 AM
hi praveen,
SELECT-OPTIONS: PLAN FOR ztable-fieldname.
select statement:
SELECT * FROM ztable WHERE fieldname IN PLAN.
if u are not mentioninig any value then it should display the whole value in table
rgds,
shan
Message was edited by:
sivakumar palaniswamy
‎2006 Nov 20 12:34 PM
Praveen,
in your select in where condition, the parameter value may taking as space.
check your DB with space.
-Anu
‎2006 Nov 20 12:49 PM
hi praveen,
when you are using a parameter the output will be displayed for the entered value.
when you dont enter any value it doesnot get the vakue for which it has to display the result.
whereas in the case of select-option it takes the range from the beginning to the end hence it displays the result.
Regards,
sudha