Hi,
You can have following logic:
Starting letter of material type(P=Pipes),next 2 numeric number of Diameter (12 OR 08 OR 05), next two character are of system of measurement to specify Diameter length ( IN = inches,FT=feet,YD=yards).
For example:
For material code for 12 inches Pipes is P12IN
For material code for 8 inches Pipes is P08IN
For material code for 12 inches Pipes is P05IN
Use t.codes:MMBE/ MB52 and enter corresponding material code to get your wanted report.
Regards,
Biju K