  By merging single-site typical medium theory with density functional theory
we introduce a self-consistent framework for electronic structure calculations
of materials with substitutional disorder which takes into account Anderson
localization. The scheme and details of the implementation are presented and
applied to the hypothetical alloy Li$_{c}$Be$_{1-c}$, and the results are
compared with those obtained with the coherent potential approximation.
Furthermore we demonstrate that Anderson localization suppresses ferromagnetic
order for a very low concentration of (i) carbon impurities substituting oxygen
in MgO$_{1-c}$C$_{c}$, and (ii) manganese impurities substituting magnesium in
Mg$_{1-c}$Mn$_c$O for the low-spin magnetic configuration.
