A bill of materials is a document that describes the component, the products, the quantity of each component and the process required to manufacture a product, including a routing and individual steps. 

If you choose to manage your operations using work orders, you will define a bill of materials with routings. A routing may be added to multiple bills of materials, but a bill of material only has one routing.

Go to Manufacturing ‣ Master data ‣ Bill of materials ‣ Create

Select product and attach the routing on the bill of material. Fill in raw material in the components tab for this finished product. Those components will be used to manufacture the finished product and by-products.

A by-product is any product produced by a bill of material in addition to the primary product. To add by-products to a bill of material, we will first need to enable them from Manufacturing ‣ Configuration ‣ Settings

Once by-products are enabled, you can add them to your bill of materials under the Byproducts tab of the bill of materials. Cost Weight Percentage will define the proportion of raw materials to manufacture finished product and by-product. You can add any product as by-products and select product qty, cost weight percentage. By-products are produced  in the same step of the routing as the primary product of the bill of materials