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

Hi

Former Member
0 Likes
1,193

What are the diferences between Parameter and select option...except the range difference?????

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,172

hi

For the select-options (complex selection), you will be using IN operator in the SQL..If there is no record in the select-options the field value in the where clause is not considered.

But for parameters (single selection), you will be using EQ operator in the SQL..if there is no value in the parameter which means blank..Then if you are selecting with a blank value you will not get any record..unless there is a record available in the database with a blank value.

It is because of the select-options property that when it is leave empty all values will be selected. and when parameter is empty no value will be selected.

plz go through the below link...

http://www.sap-basis-abap.com/abap/difference-between-select-options-and-parameters.htm

regards

Kumar

plz reward points if helpful

hi

For the select-options (complex selection), you will be using IN operator in the SQL..If there is no record in the select-options the field value in the where clause is not considered.

But for parameters (single selection), you will be using EQ operator in the SQL..if there is no value in the parameter which means blank..Then if you are selecting with a blank value you will not get any record..unless there is a record available in the database with a blank value.

It is because of the select-options property that when it is leave empty all values will be selected. and when parameter is empty no value will be selected.

plz go through the below link...

http://www.sap-basis-abap.com/abap/difference-between-select-options-and-parameters.htm

regards

Kumar

plz reward points if helpful

9 REPLIES 9
Read only

Former Member
0 Likes
1,172

Hi

Once you create select options it defines an internal table sel with a fixed structure which consists of the fields sel-SIGN, sel-OPTION, sel-LOW and sel-HIGH. While sel-SIGN and sel-OPTION have a fixed format (type character, length 1 and 2 respectively), sel-LOW and sel-HIGH inherit the type and length of their reference field f in variant 1, where as in parameters no internal table will be created.

Regards

Haritha.

Read only

Former Member
0 Likes
1,173

hi

For the select-options (complex selection), you will be using IN operator in the SQL..If there is no record in the select-options the field value in the where clause is not considered.

But for parameters (single selection), you will be using EQ operator in the SQL..if there is no value in the parameter which means blank..Then if you are selecting with a blank value you will not get any record..unless there is a record available in the database with a blank value.

It is because of the select-options property that when it is leave empty all values will be selected. and when parameter is empty no value will be selected.

plz go through the below link...

http://www.sap-basis-abap.com/abap/difference-between-select-options-and-parameters.htm

regards

Kumar

plz reward points if helpful

Read only

Former Member
0 Likes
1,172

HI Reema,

For the select-options (complex selection), you will be using IN operator in the SQL..If there is no record in the select-options the field value in the where clause is not considered.

But for parameters (single selection), you will be using EQ operator in the SQL..if there is no value in the parameter which means blank..Then if you are selecting with a blank value you will not get any record..unless there is a record available in the database with a blank value.

Hope this will help.

Regards,

Jayant Sahu.

Read only

Former Member
0 Likes
1,172

Hi,,

- The main difference between select-options and parameters is that the select-option creates a selection table consisting of 4 fields.

- The parameter statement does not create a selection table .

-- The second thing is select-option gives us a range for selection, whereas parameter doesn't

-- Using the parameter you can define radio buttons and checkboxes where as select-options can't .

Regards

Sudheer

Read only

Former Member
0 Likes
1,172

Parameters are:

1. referted with EQ/NE...

2. Generally contains only one value

sel opts:

1. refered with BETWEEN ... IN

2. Generally contains ranges, set of values

Read only

Former Member
0 Likes
1,172

Hi,

**For a parameter we can write

parameter: p_data type mara-matnr obligatory. without declaring a work area for

the table MARA (ie, no need of statement TABLES: MARA).

but for a select-option we need to declare the work area to use like this

tables: mara.

select-options: p_data for mara-matnr obligatory.

    • Parameter can have inline comments but select-options can not have inline

comments (On the screen, if we want to dispplay some information related to

the field were we enter the data, we use comments)

    • In select-options we can have extensions, but not in parameter.

    • In parameter declaration we use TYPE or LIKE,

but for select-option we use FOR

Read only

Former Member
0 Likes
1,172

Is this a joke?

I'm sorry but doing an F1 before hitting sdn sometimes helps.

SDN was a forum where questions of a specific level were posted - let's keep it that way and not turn it in to an abap-fans.

Thank you,

C.

Read only

Former Member
0 Likes
1,172

Hi,

Parameter:

PARAMETERS <p>[(<length>)] [TYPE <type>|LIKE <obj>] [DECIMALS <d>]

[DEFAULT <f>]

[MEMORY ID <pid>]

[LOWER CASE]

[OBLIGATORY]

[VALUE CHECK]

[AS CHECKBOX]

[RADIOBUTTON GROUP <radi>]

[NO-DISPLAY]

[MODIF ID <key>].

Declares a variable <p>, as in the DATA statement. For <p>, an input field appears on the corresponding selection screen. The additions allow you to define default values, accept lowercase input, define the field as required, check values, define a checkbox or radio button, prevent the field from being displayed on the selection screen, or modify the field

Select-Option:

SELECT-OPTIONS <sel> FOR <f>

[DEFAULT <g> [to <h>] [OPTION <op>] SIGN <s>]

[MEMORY ID <pid>]

[LOWER CASE]

[OBLIGATORY]

[NO-DISPLAY]

[MODIF ID <key>]

[NO-EXTENSION]

[NO INTERVALS]

[NO DATABASE SELECTION].

Declares a selection table <sel> for the field <f>. For <sel>, places input fields on the corresponding selection screen. The additions allow you to set a default value, accept input in lowercase, define a required field, suppress or modify the display on the selection screen, restrict the selection table to a line or a selection to a single field, or prevent input from being passed to a logical database.

Regards,

Bhaskar

Read only

Former Member
0 Likes
1,172

1.select options internally uses a internal table with the following options

low- starting value

high- ending value(highest value)

sign- operator to be evaluated bt,in,like,eq,ne........

option- include or exclude

ii.parameter stores a single value.

2.default operator used for parameter is equal(=)

default operator used for select-options is between