A three-dimensional (non-axisymmetric) model for the solar mean magnetic field generation is studied. The sources of generation are the differential rotation and mean helicity in the convective shell. The system is described by two equations of the first order in time and the fourth order in space coordinates. The solution is sought for in the form of expansion over the spherical functions Y(m)n. The modes of different m are separated. A finite-difference scheme similar to the Peaceman-Rachford scheme is constructed in order to find coefficients of the expansion depending on the time and radial coordinates. It is shown that a mode with a smaller azimuthal number m is primarily excited. The axisymmetric mode m = o describes the 22 year solar cycle oscillations. The modes of m o have no such periodicity, they oscillate with a period of rotation of the low boundary of the solar convective shell. The solutions which are symmetric relative to the equator plane are excited more easily compared with the antisymmetrical ones. The results obtained are confronted to the observational picture of the non-axisymmetric large-scale solar magnetic fields.