We present systematic ab-initio calculations for nonmagnetic (NM), ferromagnetic (FM), and antiferromagnetic (AFM) states of fullHeusler alloys (X 2 YZ) such as Co 2 MnSi (X = Co, Y = Mn, Z = Si), Ni 2 MnAl (X = Ni, Y = Mn, Z = Al), and Ru 2 MnSi (X = Ru, Y = Mn, Z = Si). The calculations are based on the all-electron full-potential (FP) screened Korringa-Kohn-Rostoker (KKR) Green's-function method combined with the generalized-gradient approximation in the density-functional formalism. We show that the present calculations reproduce very well the experimental ground states of these alloys (FM of Co 2 MnSi and Ni 2 MnAl, AFM of Ru 2 MnSi) and the available measured values for lattice parameters and magnetic moments. It is also shown that the fundamental features of the magnetism of Co 2 MnSi (strong FM) and Ni 2 MnAl (weak FM) are understood by using the Mn spin-flip energies and the Mn-Mn exchange interaction energies in X (= Co, Ni), both of which are obtained by the present FP-KKR calculations for the impurity systems. We can show that the magnetism of Ni 2 MnAl may be changed from FM to AFM by atomic disorder (B2-structure) occurring at elevated temperatures.