Skip to Content
author's profile photo Former Member
Former Member

HI major diffrence in select-options and parameters

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2004 at 06:23 AM

    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)

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 28, 2004 at 12:56 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.