The design of diffractive phase elements (DPEs) for solving the genera
l beam shaping problem where the signal wave is specified by an intens
ity distribution on a continuous support in a finite signal window is
considered. In this case serious design problems due to speckles may a
rise. After introducing a mathematical definition and description of s
peckles, the influence of the phase of the signal wave on the design p
rocess is examined. It turns out that depending on the application a p
seudo-random or a spherical phase should be used as an initial phase o
f the signal wave for an iterative design procedure. Due to its smooth
ness the spherical phase prevents the occurrence of speckles during th
e iteration process whereas the pseudo-random phase is accompanied by
speckle effects. For applications where the imaging properties of the
spherical phase are undesirable, a soft coding method is presented whi
ch significantly reduces the number of speckles of the pseudo-random p
hase. For cases where speckles still remain we finally present an appr
oach for removing these in pairs.