cancel
Showing results for 
Search instead for 
Did you mean: 

Select statement....using wild character

Former Member
0 Kudos

Hi All,

SELECT EKGRP EKNAM FROM T024 INTO TABLE IT_T024 WHERE EKGRP = S_EKGRP AND EKNAM NE 'NOT VALID%'.

My requirement is to eliminate the EKNAM (Purchasing Group Name) starting with NOT VALID string.

Any hint...

Thanks,

Kal Chand

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use NOT LIKE instead of NE

...EKNAM NOT LIKE 'NOT VALID%'.

Answers (2)

Answers (2)

JozsefSzikszai
Active Contributor
0 Kudos

hi Kal,

create a range for EKNAM and insert one line:

sign = 'E'.

option = 'CP'.

low = 'NOT VALID*'.

SELECT EKGRP EKNAM FROM T024 INTO TABLE IT_T024 WHERE EKGRP = S_EKGRP AND EKNAM <b>IN range_eknam</b>

hope this helps

ec

naimesh_patel
Active Contributor
0 Kudos

Try like this:

RANGES: R_EKNAM FOR T024-EKNAM.

R_EKNAM-SIGN = 'E'.
R_EKNAM-OPTIONS = 'CP'.
R_EKNAM-LOW = 'NOT VALID*'.
APPEND R_EKNAM.
CLEAR   R_EKNAM.

SELECT EKGRP EKNAM FROM T024 
INTO TABLE IT_T024 
WHERE EKGRP = S_EKGRP AND EKNAM IN R_EKNAM.  " <<

Regards,

Naimesh Patel