HI Mahesh,
Try to run the rules based on customer hierarchy or sales area if that works out.
Either way find out the difference for which customers product substitution is valid and for which customer location substitution is valid
Create two rules in /SAPAPO/RBA04, one for product substitution and another for location substitution.
Thanks,
Nihar