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

Reg: EQ Operator for Select-Options..

Former Member
0 Likes
2,400

Normally we use IN Operator for comparing selection-screen fields for select-options, Rarely we use EQ also when working with Select-Options, why we go for this EQ operator.

Kindly let me know.

Thanx in Advance.

Akshitha.

Normally we use IN Operator for comparing selection-screen fields for select-options, Rarely we use EQ also when working with Select-Options, why we go for this EQ operator.

Kindly let me know.

Thanx in Advance.

Akshitha.

6 REPLIES 6
Read only

amit_khare
Active Contributor
0 Likes
1,426

When we know that the value cannot be more than one and is only store either in low or high of select options then we can use like this EQ s_matnr-low.

Regards,

Amit

Read only

Former Member
0 Likes
1,426

Hi,

When you declare a field using select-options, it is always IN is used in the Where conditon.

for Parametrs declarations we use EQ in the where condition.

If you are tallking about the Ranges: SIGN,OPTION,LOW and HIgh

EQ is used to for OPTION statement.

reward if useful

regards,

Anji

Read only

Former Member
0 Likes
1,426

when we compare with low or high values in select option we go for EQ

select matnr ..... wher matnr <b>eq s_matnr-low</b>

Read only

Former Member
0 Likes
1,426

normally select option has low & high values...even more options....

rarely we exclude high option and even extra options which shows the selection screen field as select option with only low value field....

now, when user enters a value here, we need to check bu using EQ instead of IN....

Read only

Former Member
0 Likes
1,426

Hi!

Using EQ with a select option is not correct, use always the IN operator.

I think it is only a bug in the program. The select option was a parameter before, and a parameter is using the EQ operator. Meanwhile the parameter has been changed to select option, but in the select it was not corrected from EQ to IN.

Unfortunately it will not throw a syntax error, but the program will work badly (semantic error).

Regards

Tamá

Read only

Former Member
0 Likes
1,426

Hi there. You should use IN when you know that there will be or may be multiple values chosen for the select-option. For instance, if the user is going to enter a range of personnel numbers on the selection screen, you could use something like:

IF ws_pernr IN p_pernr

(where p_pernr is your select-option selection screen field).

But if you know that the select-option field will only have one value assigned to it (or you are referencing either the high value or the low value of the select-option) then you can use EQ; the term EQ checks for equality against a single value.

- April King