Diffractive elements are widely used in many applications now as the microstructuring technologies are making fast progresses in the wake of microelectronics. For the optimization of these elements accurate modeling methods are needed. There exists well-developed and widely used methods for one-dimensional diffraction gratings of different types. However, the methods available for solving two-dimensional periodic structures do not cover all possible grating types. The development of a method to calculate the diffraction efficiency of two dimensional metallic gratings represents the objective of this work. The one-dimensional true-mode method is based on the representation of the field inside the periodic element as a superposition of particular solutions, each one of them satisfying exactly the boundary conditions. In the developed method for the two-dimensional gratings the representation of the field within the grating in such way is used. In the present work, the existing modal methods for one-dimensional gratings can be used as the basis for the construction of the modal field distribution functions within two-dimensional gratings. The modal function distributions allow to calculate the overlap integrals of the fields outside the grating with those within the structure. The transition matrix coefficients are formed on the basis of these integrals. The final stage is the calculation of the scattering matrix based on two transition matrices. The equations for the field reconstruction are provided and accompanied by examples of results. Further equations used to calculate the overlap integrals and scattering matrix coefficients are provided