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

parameter

Former Member
0 Likes
1,017

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
992

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.

10 REPLIES 10
Read only

Former Member
0 Likes
993

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.

Read only

Former Member
0 Likes
992

can you paste the select statement you are using to retrieve data?

Read only

Former Member
0 Likes
992

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

Read only

Former Member
0 Likes
992

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

Read only

Former Member
0 Likes
992

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

Read only

Former Member
0 Likes
992

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.

Read only

Former Member
0 Likes
992

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.

Read only

Former Member
0 Likes
992

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

Read only

Former Member
0 Likes
992

Praveen,

in your select in where condition, the parameter value may taking as space.

check your DB with space.

-Anu

Read only

Former Member
0 Likes
992

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