If you follow BOM scenario, both material codes will appear in system but in output, you can control in such a way to show only the required component. This is one approach. The other approach is via Material Determination. Try both the options and choose which you feel would be better to suit Business needs.
G. Lakshmipathi