Application Development 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: 

HI major diffrence in select-options and parameters

Former Member
0 Kudos

Hi,

Can any one explain me the major diffrence between select options and parameters.

I know that in select options we can give a range of values and in parameter one value.

Thanks

3 REPLIES 3

Former Member
0 Kudos

Hello Hari,

I'm not sure what you are expecting to be a <i>major</i> difference. But apart from what you have said,

1. Select-options is actually maintained as an internal table in the program, whereas a parameters is just like any other variable.

2. A select options is always used as a <i>field</i>, whereas, parameters can be used in case of a checkbox / radiobuttons too (I know this one sounds a but silly, but it is a difference nevertheless ).

For further information , the SAP Online Documentation can be helpful.

Regards,

Anand Mandalika.

Since you seem to be a bit new to SDN Forums, I would like to introduce you to the points system

You assign points to the replies that you have found to be useful. It's a way to say "thanks" for the effort in the replies.

See: /people/mark.finnern/blog/2004/08/10/spread-the-love for directions.

Click on the Yellow Star icon in each reply.

You can give:

1 - 10 pointer (marks it as a solved problem)

2 - 6 pointers (very helpful)

Lots of 2 pointers (helpful)

former_member214131
Active Contributor
0 Kudos

Hello Hari,

I would see following differences:

1. As you have mentioned, many values/ranges can be given in the SELECT-OPTIONS. However, the parameter can hold only one value.

2. In the run time, we see the data w.r.t a select option as an Internal table and Parameter may be accessed as a global variable.

3. Consider following statements:

a. select-options: s_matnr for mara-matnr no-extension no intervals.

b. parameters: P_MATNR like mara-matnr.

Both the statements look same on the selection screen.

consider the SQLs:

<b>select * into corresponding fields of table g_t_mara

from mara

where

matnr in s_matnr.</b>

and

<b>select * into corresponding fields of table g_t_mara

from mara

where

matnr eq p_matnr.</b>

both the SQLs give the same output if the user gives a material number on Selection screen.

If the user does NOT give any input in selection screen, the first SQL will fetch all data from DB, whereas the SQL with the PARAMETER will fail.

So I think we should keep in mind the requirement and code accordingly.

I hope this helps you.

Best Regards,

Murugesh AS

0 Kudos

Hi

I believe the most impressing difference is what Murugesh has already stated at 3 . While using in a statement defining conditions, select-option will say "all entries" if it is empty. That is why, there are options as "NO-EXTENSION" "NO INTERVALS" which make a select-option seem like a parameter, but just it seems however acts as a select-option as expected.

<u><b>e.g.</b></u>


SELECT-OPTIONS s_selobj FOR p0001-pernr 
               NO-EXTENSION NO INTERVALS .

Obviously, the second favour is that a select-option gives the opportunity to make complex selections as including or excluding sets and/or ranges.

*--Serdar