06-18-2011 7:31 AM
Hello friends,
I want to fetch data form a table for particular series of Material numbers like i only wanted to pull material beginning with '03*.
When i tried to use select statement like Select * from MARA WHERE matnr = '03*', I am getting an error. Could you please suggest how to restrict the data for only 03 series.
Thanks for your cooperation in advance.
Thanking you.
Meenakshi
06-18-2011 12:19 PM
Hi ,
Try this ,
Lt_matnr : internal table having only material numbers
select matnr from mara into TABLE lt_matnr
WHERE matnr like '03%' .
Make sure the number of preceding zeroes are accurately mentioned in the query .
for example : 321000000 is a material number you are looking for .
then you have to mention nine zeroes before 3 in the query ( '0000000003%' )becasue
MATNR field length is 18 .
Regards ,
Hemant