It is found that the spatial phase shift is induced by the harmonic beam in aperiodic PPLN with spatial walk off, so it can be engineered to compensate arbitrary spatial phase distortions of incident beam. By applying it to improve beam quality of diode laser beams, diffraction limited beam quality can be realized without scarifying the conversion efficiency.