Hello Vishnu,
Instead of Batch determination..
Here 531 movement will happen for By-Products hence you can write your own logic by using the userexit : CONFPI05
That means the batch number has to generate XXXXXXX if the material is By-Product
this logic you can give to developer
Regards,
Venkatesh..