How do you generate an automatic PO after creating a PR using a particular material?

In MMR and VMR check Auto PO (MM02/XK02).

Maintain the Source List and select the indicator for the source list record as MRP relevant (ME01). If more than one source list record is generated, make one of them fixed. Run MRP and the PRs generated will beĀ  re-assigned with the source of supply (MD01). Enter ME59 for automatically creating POs from PRs.