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: 

Warning in SLIN:'Does not test for equality'

Former Member
0 Kudos

Hi i get the following error

In "SELECT SINGLE ...", the WHERE condition for the key field "MATNR" does not

test for equality. Therefore, the single record in question may not be unique.

for the following code

SELECT SINGLE * FROM zgd_phant_status

INTO t_phant_status

WHERE sellable = p_l_matnr

AND opsys = g_opsys

AND rellvl = g_rel

AND serlvl = g_ser

AND lang = g_lang.

1 ACCEPTED SOLUTION

JozsefSzikszai
Active Contributor
0 Kudos

hi,

for SELECT SINGLE you have to use (preferably) all key fields of the table, you are selecting from. This is why you get this message.

hope this helps

ec

4 REPLIES 4

JozsefSzikszai
Active Contributor
0 Kudos

hi,

for SELECT SINGLE you have to use (preferably) all key fields of the table, you are selecting from. This is why you get this message.

hope this helps

ec

0 Kudos

Thanks for the reply eric but the value i need ot retrieve is the only other key field from the table

how can i put that in where in condition

Please let me know if i could solve

0 Kudos

If you are sure, that selecting this way will always retunr only one record, than this is just a warning message, you should not bother with it too much.

0 Kudos

Hi Kitty,

Then there is no other solution (that's why it is only a WARNING message in the extended program check. Or you could bypass like this:

SELECT *

FROM zgd_phant_status

UP TO 1 ROWS

INTO t_phant_status

WHERE sellable = p_l_matnr

AND opsys = g_opsys

AND rellvl = g_rel

AND serlvl = g_ser

AND lang = g_lang.

ENDSELECT.

Regards,

John.