2022 Oct 26 4:05 PM
Ahoi experts,
SELECT * FROM stpo INTO TABLE lt_stpo<br>
WHERE stlty EQ 'P' AND
stlnr EQ '00191182' AND
posnr EQ '0020' AND
lkenz NE abap_true AND
aedat IS NULL.
should yield the last entry of STPO as shown below.

but results in an SY-SUBRC=4. If I omit
aedat IS NULL
query yields 3 hits (lines 1, 2 and 4).
Can u pls tell me, what is wrong with
aedat IS NULL
Regards, Hubert
2022 Oct 27 7:32 AM
Hi,
I think like this,your aedat field is value '00000000' in the table.
Could you try like this:
aedat = '00000000'
2022 Oct 26 4:41 PM
Do not confuse IS NULL (null value) with IS INITIAL (initial value of the dictionary type)
2022 Oct 26 4:54 PM
I know what you mean, but just to clarify, IS INITIAL is not valid with SELECT. Instead, we must use = followed by the corresponding initial value in the database.
2022 Oct 27 9:23 AM
sandra.rossi , since 7.53 : 4. Relational Expression IS INITIAL
2022 Oct 27 2:34 PM
2022 Oct 26 4:41 PM
2022 Oct 27 5:57 AM
2022 Oct 27 7:32 AM
Hi,
I think like this,your aedat field is value '00000000' in the table.
Could you try like this:
aedat = '00000000'
2022 Oct 27 7:47 AM
2022 Oct 27 8:45 AM
2022 Oct 27 2:39 PM
To sum up both valid answers: