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

Restrict selection using wildcards

prince_isaac
Active Participant
0 Likes
543

hie guys

I have a select statement where i need to restrict the selected items where values in a field are ZP%


  SELECT * FROM marc INTO xmarc WHERE matnr IN material
                                 and werks ne 'ZP%'.
    IF sy-subrc = 0.
      APPEND xmarc.
    ENDIF.
  ENDSELECT.

the above code is not working for me. Could anybody advise me??

regards

Prince Isaac

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
505
and werks NOT LIKE 'ZP%'.

Regards,

Rich Heilman

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
506
and werks NOT LIKE 'ZP%'.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
505

hi

use LIKE operand insted of ne

SELECT * FROM marc INTO xmarc WHERE matnr IN material

and NOT werks LIKE 'ZP%'.

reagrds,darek

Read only

prince_isaac
Active Participant
0 Likes
505

Thanx Rich,

problem solved. Donno if u still need the points tho! lol.

regards

Prince Isaac