Hi Mallika,
Please check the Production Scheduling Profile. There is a settings which needs to be maintained (Creation of Batch at Production order creation or Release). The Production Scheduling profile shall be updated in Work Scheduling view of Material master.
Please check these settings and test it again. System should create Batch and assign it.
Regards,
Shyam