cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use the lifnr field in the select statement with both IN and LIKE?

gulbin01
Explorer
0 Kudos

SELECT
bukrs
gjahr
budat
lifnr
waers
FROM vsak INTO TABLE lt_blg
WHERE bukrs IN s_bukrs
AND lifnr IN s_lifnr ( AND ) lifnr LIKE 'OOOO9%' *******************************
AND budat IN s_budat.

HI,

*************How can I use the lifnr field in the select statement with both IN and LIKE?
What is the correct combined code?

Many Thanks for any help..!!!!

Sandra_Rossi
Active Contributor
0 Kudos
It seems obvious, so I guess I don't get your question, what did you try and what is your issue?
View Entire Topic
raymond_giuseppi
Active Contributor

Is the number range selection related to some vendor account group (e.g. non employee vendor) in this case consider a more dynamic code using a join with LFA1 to get the group and filter on its value.

Else just remove the parenthesis ( ) 

AND lifnr IN s_lifnr AND lifnr LIKE '00009%