Dear Shekhar Saxena
As per your message, since raw materials are not available the goods cannot be delivered also you have mentioned that when this scenario comes up the schedule agreement already created will be cancelled. So if that is the case the quantity contract should be created for the remaining quantity. You could create the quantity contract and maintain a text with this reason so that there is a connection between the two documents or else with the help of an ABAPer create a possibility of a message pop up before creating the quantity contract so that you could enter the schedule line agreement document number.
Regards
JNM