I don't think it can be achieve through any standard configuration.
What ever you want to it is number range and we know number can be two types :
1. Internal
2. External
If you choose internal, then system will take the batch number as a sequence.
If you choose external, then you have to enter the batch number during GR.
As you want to set the batch automatically as per your logic, then you have to triggered the batch number via an exit or badi (with your own logic).