The Fourier transform and the mode-matching approach are used to analyze the electromagnetic scattering by finite rectangular grooves or flanged waveguides in a perfectly conducting planar boundary and also scattering by a slit in a planar, perfectly conducting thick screen. First, the rectangular grooves analysis is described by the Fourier transform and the mode-matching approach. Both transverse electric (TE) and transverse magnetic (TM) polarizations are treated. The resonance behavior of the backscattered echowidth for a rectangular groove in the TM polarization is shown to exist irrespective of the groove``s width in contrast with the TE scattering behavior, where the resonance behavior is shown to exist only when the groove``s width is more larger than a half-wavelength. For a large width rectangular groove, the closed form expressions are obtained for the echowidths and these are compared with numerical data. Their accuracy is examined as a function of width, depth, and material filling and is found to be in good agreement with exact echowidth data except for near-grazing incident angles. Using the drived simultaneous equations, closed form expressions are also given for the echowidth of the narrow groove and these are similar to the quasi-static solutions. The series solution in a closed form is useful in the scattering studies, which are encountered in optical and audio disk designs and a radar/laser calibration process. The angular behaviors of the scattered fields and diffraction efficiency versus the number of grooves for a Gaussian incident wave are presented. The results show that grating profiles designed for a 100\% efficiency when the grating is infinite are also efficient for extremely few grooves elements when an incident Gaussian beamwidth is narrow. Adding more grooves decreases the diffracted beamwidth and improves the diffraction efficiency. Second, the Fourier-transform method is also used to produce simultaneous equations for scatterin...