We discuss a general approach to a realistic theory of the electronic structure in materials containing correlated d- or f- electrons. The main feature of this approach is the taking into account the energy dependence of the electron self-energy with the momentum dependence being neglected (local approximation). In the case of strong interactions (U/W>>1 - rare-earth system) the Hubbard-I approach is the most suitable. Starting from an exact atomic Green function with the constrained density matrix the band structure problem is formulated as the functional problem on Nmm for f-electrons and the standard LDA-functional for delocalized electrons. In the case of moderate correlations (U/W=1 metal-insulator regime) we start from the dynamical mean field iterative perturbation scheme (IPS) of G. Kotliar et. al. and also make use of our multiband atomic Green function. Finally for the weak interactions (U/W<1 -transition metals) the self-consistent diagrammatic fluctuation- exchange (FLEX)-approach of N. Bickers and D. Scalapino is generalized to the realistic multiband case. We presents two-band, two-dimensional model calculations for all three regimes. A realistic calculation in Hubbard-I scheme with the exact solution of the on-site multielectron problem for f(d)- shells was performed for mixed-valence 4f compound TmSe, and for the classical Mott insulator NiO.