Hi Yasam,
If you know standard substitution process with condition A001 then this will also be same. The difference in this case is that instead of material substitution we can substitue grid values also. Example if one of the grid color with value blue then this could be replaced by red while doing ATP check.
I would suggest just check in your sand box and try to maintain the condition in VB11 and test one scenario.
The best learning by testing yourself, isn't it. I hope this gives you an idea for your issue. Though go through the below link
Customizing for Material Substitution - SAP Apparel and Footwear (SAP AFS) - SAP Library
Check accordingly and revert, else close the thread.
How to close a discussion and why
Regards
Rahul