Apodized waveguide Bragg gratings are written using Sagnac type interferometer. As the quality of these gratings is not enough for DWDM devices, a procedure for shaping of filter profiles was developed. Obtained 10 mm long grating gives line width of 0.4 nm and almost completely suppressed side lobes.