01-21-2008 10:27 AM
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.
01-21-2008 10:30 AM
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
01-21-2008 10:30 AM
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
01-21-2008 10:51 AM
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
01-21-2008 11:06 AM
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.
01-21-2008 11:08 AM
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.