Hi Naveed,
There are couple of solutions to it.. However would like to know how do you want to implement.
1. Is it there is a z-program where you accept range of Sales Order numbers and then create delivery documents?
2. Or Within any of your program, you are creating a deliveries based on so document.
Bassed on your answer, it will be useful for us to provide you right solution
Regards,
Venkat