A subwavelength metallic grating can support horizontal surface plasmons (HSPs) at its horizontal metallic boundaries and vertical cavity modes (CMs) inside its slits. It has been shown that the coupling between these two resonant modes can enhance the absorption of the transverse magnetic polarized wave with the maximum absorption up to 75 % (Roszkiewicz et al. in Opt Lett 37(18):3759-3761, 2012). In this work, we propose and analyze a modified grating structure and show that it is possible to raise the absorption to nearly 100 %. The modified structure is a freestanding metallic grating with rectangular grooves on its front surface which can change the distribution of the HSPs on the same side, while leave those on the other side unaffected. When the HSPs on the front surface are changed to some certain situations, all incident energy can be launched into the grating slits by the CMs resonance and then be prohibited from transmitting through the grating by the HSPs on the back surface. Therefore, in such a single-layer metallic grating structure, all of the incident energy is absorbed, i.e., nearly 100 % absorption is obtained.