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

ABAP sql with null variable

Former Member
0 Likes
1,700

Hi

How to in SQL query add filter to get all record not NULL.

I have a field BELNR and this have value ' '

but in SQL WHERE belnr not equal ' ' OR NOT NULL

don't get me all records with not null values.

Edited by: Kosmo on Feb 23, 2009 1:01 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
605

Hi Kosmo,

What is the table you are using ?

Try it this way

SELECT *
FROM BSEG
INTO TABLE IT_BSEG UP TO 10 ROWS
WHERE BELNR NE space.

Regards

Edited by: Rajvansh Ravi on Feb 23, 2009 1:09 PM

3 REPLIES 3
Read only

Former Member
0 Likes
606

Hi Kosmo,

What is the table you are using ?

Try it this way

SELECT *
FROM BSEG
INTO TABLE IT_BSEG UP TO 10 ROWS
WHERE BELNR NE space.

Regards

Edited by: Rajvansh Ravi on Feb 23, 2009 1:09 PM

Read only

Former Member
0 Likes
605

hi:

use as

WHERE not belnr is initiai.

Regards

Shashi

Read only

Former Member
0 Likes
605

hi:

use as

WHERE not belnr is initial.

Regards

Shashi