We report here noncollinear magnetic configurations in the Heusler alloys Ni2MnGa and Ni2MnAl which are interesting in the context of the magnetic shape memory effect. The total energies for different spin spirals are calculated and the ground-state magnetic structures are identified. The calculated dispersion curves are used to estimate the Curie temperature which is found to be in good agreement with experiments. In addition, the variation of the magnetic moment as a function of the spiral structure is studied. Most of the variation is associated with Ni, and symmetry constraints relevant for the magnetization are identified. Based on the calculated results, the effect of the constituent atoms in determining the Curie temperature is discussed.