Advanced Customization > Business Logic Customization > Customizing Business Logic > Customizing a Bill of Materials
  
Customizing a Bill of Materials
A Bill of Materials (BOM) is a product structure report that identifies the items required to assemble a product. Currently, the BOM report includes only items from a part structure. Two types of BOMs are supported.
A BOM Hierarchy report shows the quantity and unit attributes of the "usage" associations and visually indicates the hierarchical levels.
A Parts List report is a list of all of the components (that is, parts that do not use other parts) in the part structure hierarchy. It uses information in the "usage" associations to determine the quantity of each component. Basically, it answers the question "When a part assembly is completely disassembled, what parts and how many of each do I have?".
Both of these reports are defined to be generated as an HTML page optimized for printing from a Web browser.
Customizing Existing Reports
Global attributes on parts are displayed in the BOM reports automatically using the table view, but global attributes on part usage links cannot be displayed automatically. The global attributes on the part usage link are shown in the list of available columns, but to get the actual value to display, the corresponding report configuration class needs to be extended to indicate the specific global attributes from the part usage link to display.
As an example, if a global attribute "LinkName" was added to part usage link, the values of that attribute can be displayed in the Multi-level BOM Report by
1. Creating an extension of the MultiLevelBOMReportTreeBuilder class similar to the following
@ComponentBuilder("part.report.multiLevelBOM")
public class MultiLevelBOMReportTreeBuilderCustomAtts extends MultiLevelBOMReportTreeBuilder {

@Override
public ComponentConfig buildComponentConfig(ComponentParams params)
throws WTException {
ComponentConfig tableConfig = super.buildComponentConfig(params);
ComponentConfigFactory factory = getComponentConfigFactory();

String columnLabel = "Custom column name";
ColumnConfig col = factory.newColumnConfig("IBA|LinkName", columnLabel, true);
col.setDataUtilityId("part.report.numberText");
col.setTargetObject("link");

tableConfig.addComponent(col);

return tableConfig;
}

}
2. Register the custom ComponentBuilder in the <Windchill>/codebase/config/mvc/PartReport-configs.xml file
Add the line
<bean class="custom.MultiLevelBOMReportTreeBuilderCustomAtts"/>
And remove the line
<bean class="com.ptc.windchill.enterprise.part.reports.mvc.builders.MultiLevelBOMReportTreeBuilder"/>
3. Set up a custom table view with that column as one of the selected columns.