Hi,
Alternatively you can try following:
You can create STO PR automatically by MRP by keeping MRP group in material master(MM02/MM03) and link STO PR document type to MRP group and Plant ( OMDT)
Later you can create STO PO from STO PR.
Regards,
Biju K