Quantcast
Viewing all articles
Browse latest Browse all 8627

Re: Select statement with where condition using LIKE '%'

Hi Hajeera,

     % is useful if you want to fetch records matching some pattern (starting with/ending with/in the middle).

 

     Eg1:

     If you want to fetch all materials from MARA starting with 123, you can use

     select matnr from MARA into table itab

          where matnr like '123%' (Similar to 123* via SE16 tcode)

 

     Eg2:

     If you want to fetch all materials from MARA ending with 123, you can use

     select matnr from MARA into table itab

          where matnr like '%123'


Regards.


Viewing all articles
Browse latest Browse all 8627

Trending Articles