The interesting functional properties, such as the magnetoresistivity, giant magnetocaloric effect and huge magnetic-field-induced strains, shown by the magnetic shape memory alloys are linked to the induction of the martensitic transformation (MT). The MT temperature, the crystal structure of induced martensite, the magnetic properties of transforming phases and consequently all the above described properties depend on the microstructure (order, vacancies, defects, grain size, internal stresses, etc.) of the alloys. Their influence has been scarcely investigated. In this sense, the ball milling technique allows to modify the microstructure producing a huge number of defects and a large decrease of the average grain size and mechanically induced disorder. The aim of the proposal is to study the influence of microstructure (modified by thermo-mechanical treatments) on the magnetic ordering and the martensitic crystallographic structures in Ni-Mn-Ga and Ni-Mn-In alloys by high resolution neutron diffraction measurements.