We consider spatial shaping of partially coherent fields in two types of optical systems: a 2F Fourier-transforming system with the beam shaping element in the input plane and a 4F imaging system with the element in the intermediate Fourier plane. Different representations of the spatially partially coherent field in terms of fully coherent fields are examined to permit reduction of the dimensionality of the propagation integrals. The standard Mercer-type coherent-mode representation of the incident cross-spectral density (CSD) function is compared to expansions of CSD in either spatially or angularly shifted elementary field modes, all sharing the same spatial profile. In Fourier-transforming systems, the angular elementary-field representation proves computationally superior, while in imaging systems the spatially shifted elementary-field expansion is the best choice. Considering the Fourier-plane element as a generalized pupil, the latter leads to the concept's generalized amplitude associated with the elementary field and to a generalized transfer function of the system. These concepts reduce to the standard point spread function and the optical transfer function in the limit of spatial incoherence at the object plane. Examples of the effects of partial coherence in spatial beam shaping are given.