Hi,
In standard SAP this is not possible, However you can develop your custom solution. In custom solution maintain custom table. Your program at order save event check for material X is available or not, if material not found it scan custom table and provide alternate available material.
Thanks
Yogesh