‎2007 Feb 04 2:57 PM
hi,
can i know the difference between parameters and select-options (w/o intervals and extension)?????
thanks in advance,
sanghamitra.
‎2007 Feb 05 4:26 AM
Hi,
You have most of the differences in all the previous replies..
TO add to those
With PARAMETERS you can force a VALUE CHECK (through Foriegn key or Domain Values) Where as you cannot do this in SELECT-OPTIONS.
The KEYWORD for PARAMETERS is VALUE CHECK.
Regards,
Sesh
‎2007 Feb 04 3:08 PM
there is little difference between a parameter and a select-option without extension and interval, except the case where nothing is input.
The parameter will get the initial value, so your extraction will get records with initial value, and the select option will be empty, so extraction will get all records.
parameter: p-matnr like mara-matnr.
select-options s-matnr for mara-matnr no-extension no intervals.
select count(*) from mara where matnr eq p-matnr.
select count(*) from mara where matnr in s-matnr.
with no input, you get 0 and number of records of your MARA table
Regards.
‎2007 Feb 04 4:56 PM
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.
Hope this will help.
Regards,
Ferry Lianto
‎2007 Feb 05 3:37 AM
Hi,
Difference between Select-Options and Parameters
The main difference between select-options and parameters is that the select-option creates a selection table consisting of 4 fields.
Please go thru the following details to learn more bout it...
Description of the individual components:
SIGN
The data type of SIGN is C with length 1. The contents of SIGN determine for each row whether the result of the row condition is to be included in or excluded from the resulting set of all rows.
Possible values are I and E.
I stands for "inclusive" (inclusion criterion - operators are not inverted)
E stands for "exclusive" (exclusion criterion - operators are inverted)
OPTION
The data type of OPTION is C with length 2. OPTION contains the selection operator. The following operators are available:
If HIGH is empty, you can use EQ, NE, GT, LE, LT,CP, and NP. These operators are the same as those that are used for logical expressions. Yet operators CP and NP do not have the full functional scope they have in normal logical expressions. They are only allowed if wildcards ( '*' or '+' ) are used in the input fields.
If wildcards are entered on the selection screen, the system automatically uses the operator CP. The escape character is defined as #.
If HIGH is filled, you can use BT (BeTween) and NB (Not Between). These operators correspond to BETWEEN
and NOT BETWEEN that you use when you check if a field belongs to a range. You cannot use wildcard characters.
- LOW
The data type of LOW is the same as the column type of the database table, to which the selection criterion is linked.
If HIGH is empty, the contents of LOW define a single field comparison. In combination with the operator in OPTION, it specifies a condition for the database selection.
If HIGH is filled, the contents of LOW and HIGH specify the upper and lower limits for a range. In combination with the operator in OPTION, the range specifies a condition for the database selection.
- HIGH
The data type of HIGH is the same as the column type of the database table, to which the selection criterion is linked. The contents of HIGH specify the upper limit for a range selection.
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 .
Thanks,
Shankar
‎2007 Feb 05 3:45 AM
parameters are only taking single value so in your select query you have to compare with = parameter value.
but select option is an internal table which contains 4 coloumns
sign < I (inclusive) or E (exclusive) value>
option < relational operator like BT, NB, CP >
low <from value>
high <to value>
so you have to use IN to check the where condition in your select.
select option can contain lot of selection criteria you can exclude or include single value or range. Just click in extension button arrow mark for doing this.
regards
shiba dutta
‎2007 Feb 05 3:49 AM
Mitra,
Parameters Select-options
-
1.You can not enter range of Values 1. You can enter Range of Values.
Ex : If you want to search
record from 1 to 100
here you can enter.
2. Hold single value 2.It will hold the Data as an Internal
table
3. 3.If you want you can enter require
value not like range
Ex : 1,2,7,10 ,11
Hope this will help you.If So
Pls. Mark.
‎2007 Feb 05 4:09 AM
hi,
Using parametres you <b>can not enter values in ranges</b>.
PARAMETERS: p_matnr LIKE mara-matnr.Select-options you can enter ranges, if you dont want ranges you can specify as
SELECT-OPTIONS: s_matnr FOR mara-matnr NO-INTERVALS.If you dont wnat any extension, i.e no multiple values then u have to specify as
SELECT-OPTIONS: s_matnr FOR mara-matnr NO-EXTENSION.When u use select-option in select query or for any comparision u have to use
matnr IN s_matnr.For parameter you can use as
matnr = p_matnr.Hope this is clear.
Please reward points and close the thread.
‎2007 Feb 05 4:26 AM
Hi,
You have most of the differences in all the previous replies..
TO add to those
With PARAMETERS you can force a VALUE CHECK (through Foriegn key or Domain Values) Where as you cannot do this in SELECT-OPTIONS.
The KEYWORD for PARAMETERS is VALUE CHECK.
Regards,
Sesh