‎2008 May 06 2:18 PM
All;
I have a select statement like below. On Compilation it gives a strange warning message as " The Field ABLAD / WEMPF contained in WHERE condition may contain NULL values".
select-options s_1 for resb-wempf.
select-options s_2 for resb-ablad.
select single * from resb where wempf in s_1 and ablad in
s_2.
Can anyone please suggest how to get rid of this ? Any light thrown on this discrepancy would be greatly appreciated.
Thanks,
Sathya
‎2008 May 06 2:52 PM
Hi Sathya,
tables: resb.
select-options s_1 for resb-wempf.
select-options s_2 for resb-ablad.
select single * from resb where wempf in s_1 and ablad in s_2.
If you see the Extended Program check it says that these warnings cannot be hidden.
Messages for Syntax check warnings(Warnings)
Program: ZPPP3 Row: 16
Syntax check warning
The field "ABLAD" used in the WHERE condition may contain NULL values.
Internal Message Code: MESSAGE GYT
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Program: ZPPP3 Row: 16
Syntax check warning
The field "WEMPF" used in the WHERE condition may contain NULL values.
Internal Message Code: MESSAGE GYT
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
But by using the below code, it is not showing any warnings in EPC...
tables: ebkn.
select-options s_1 for ebkn-wempf.
select-options s_2 for ebkn-ablad.
select single * from ebkn where wempf in s_1 and ablad in s_2.
Note that the Data elements is same in both Tables. Some thing strange with table RESB..
Regards,
Satya
‎2008 May 06 2:23 PM
Hi Sathya,
Its just a warning and you do not need to worry about that.
Go ahead and activate it.
Regards,
Ravi
‎2008 May 06 2:52 PM
Hi Sathya,
tables: resb.
select-options s_1 for resb-wempf.
select-options s_2 for resb-ablad.
select single * from resb where wempf in s_1 and ablad in s_2.
If you see the Extended Program check it says that these warnings cannot be hidden.
Messages for Syntax check warnings(Warnings)
Program: ZPPP3 Row: 16
Syntax check warning
The field "ABLAD" used in the WHERE condition may contain NULL values.
Internal Message Code: MESSAGE GYT
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Program: ZPPP3 Row: 16
Syntax check warning
The field "WEMPF" used in the WHERE condition may contain NULL values.
Internal Message Code: MESSAGE GYT
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
But by using the below code, it is not showing any warnings in EPC...
tables: ebkn.
select-options s_1 for ebkn-wempf.
select-options s_2 for ebkn-ablad.
select single * from ebkn where wempf in s_1 and ablad in s_2.
Note that the Data elements is same in both Tables. Some thing strange with table RESB..
Regards,
Satya
‎2008 May 07 2:37 PM
Thanks for mentioning about EBKN, which made me better understanding about the settings in RESB table.
Cheers,
Sathya.
‎2008 May 06 4:17 PM
Hi,
I think when we use select single *, In where condition we need to use the fields which are primary keys.
so better use select * from.....
Edited by: Poonam Naik on May 6, 2008 5:19 PM
‎2008 May 06 4:34 PM
Hi Satya,
This may be because of SELECT SINGLE. Use Select single only if u are passing all the keys. If u are not passing all the keys then it may not select the record u r looking for if u have multiple records for the where clause.
Thanks,
Vinod.