I have a small query where I have to retrieve vendor details not including the vendors starting with '9'.
I have written the below query for that.
select b~lifnr " Vendor number
into corresponding fields of table gi_output_vendors
where lifnr not like '9%'.
But the output I am getting contains vendor numbers '0000950000' where I wanted to eliminate these type of numbers also. i.e, I don't want to consider leading zeroes.
So, the below code I have written for that.
The problem is with if condition or delete statement 'like' logical operator is not being allowed.
loop at gi_output_vendors into wa_output_vendors.
shift wa_output_vendors-lifnr left deleting leading '0'.
if wa_output_vendors-lifnr like '9%' " didn't work delete gi_output_vendors from wa_output_vendors where
lifnr like '9%'. "didn't work
When I use 'like' with 'if' condition or 'delete' statement, I am getting error saying that 'Like operator is not allowed'.
How could I deal with this situation.
Thanks in advance.