Hi Ranjan,
You can not have M1 in PO and M2 in MIRO, as it is inconsistent data. System will not allow to do it. If I am not wrong 'Material Group' will get populated automatically using the material you have entered in the line item.
Thanks,
Siva Cheruvu