The BOM Procedure

Example 2.1 Bill of Material with Single Input Data Set

(View the complete code for this example.)

This example uses a single input data set for invoking the BOM procedure. It also demonstrates the use of PROC NETDRAW to draw a tree diagram for the indented bill of material contained in the Indented BOM output data set. The input data set, SlBOM1, is depicted in Output 2.1.1. Each observation of this data set contains up to 3 product structure records. It also contains part master data, namely, the part description denoted by the Desc variable and the unit of measure denoted by the Unit variable, for the item identified by the value of the Parent variable. Note that the parent item 'B100' has 4 components, causing the specification to require two observations. The values of the Parent, Desc, and Unit variables for the second observation are missing because they have the same values as the previous observation.

Output 2.1.1: The Input Data Set (SlBOM1)

ABC Lamp Company
 
PROC BOM Input Data Set

ParentDescUnitComp1Comp2Comp3Qty1Qty2Qty3
LA01Lamp LAEachB100S100A100111
B100Base assemblyEach110012001300111
   1400  4..
S100Black shadeEach   ...
A100Socket assemblyEach150016001700111
1100Finished shaftEach2100  26..
12006-Diameter steel plateEach   ...
1300HubEach   ...
14001/4-20 ScrewEach   ...
1500Steel holderEach1400  2..
1600One-way socketEach   ...
1700Wiring assemblyEach22002300 121.
21003/8 Steel tubingInches   ...
220016-Gauge lamp cordFeet   ...
2300Standard plug terminalEach   ...


The following code invokes PROC BOM to produce the indented bill of material and the summarized parts list. The indented bill of material is displayed in Output 2.1.2, and the summarized parts list, which has been sorted by the _Part_ variable, is displayed in Output 2.1.3. These are exactly the same as the indented bill of material shown in Figure 3 and the summarized parts list shown in Figure 5.

/* Create the indented BOM and the summarized parts list */
proc bom data=SlBOM1 out=IndBOM1 summaryout=SumBOM1;
   structure / part=Parent
               parent=Parent
               component=(Comp1-Comp3)
               quantity=(Qty1-Qty3)
               id=(Desc Unit);
run;

Output 2.1.2: Indented Bill of Material (IndBOM1)

ABC Lamp Company
 
Indented Bill of Material, Part LA01

_Level__Parent__Part_DescQty_PerQty_ProdUnitParen_IDPart_ID_Prod_
0 LA01Lamp LA.1Each.0LA01
1LA01B100Base assembly11Each01LA01
2B1001100Finished shaft11Each12LA01
3110021003/8 Steel tubing2626Inches23LA01
2B10012006-Diameter steel plate11Each14LA01
2B1001300Hub11Each15LA01
2B10014001/4-20 Screw44Each16LA01
1LA01S100Black shade11Each07LA01
1LA01A100Socket assembly11Each08LA01
2A1001500Steel holder11Each89LA01
3150014001/4-20 Screw22Each910LA01
2A1001600One-way socket11Each811LA01
2A1001700Wiring assembly11Each812LA01
31700220016-Gauge lamp cord1212Feet1213LA01
317002300Standard plug terminal11Each1214LA01


Output 2.1.3: Summarized Parts List (SumBOM1)

ABC Lamp Company
 
Summarized Parts List, Period 1

_Part_Low_CodeGros_ReqOn_HandNet_ReqDescUnit
11002101Finished shaftEach
120021016-Diameter steel plateEach
13002101HubEach
140036061/4-20 ScrewEach
15002101Steel holderEach
16002101One-way socketEach
17002101Wiring assemblyEach
21003260263/8 Steel tubingInches
220031201216-Gauge lamp cordFeet
23003101Standard plug terminalEach
A1001101Socket assemblyEach
B1001101Base assemblyEach
LA010101Lamp LAEach
S1001101Black shadeEach


As discussed in the section Summarized Parts Data Set, since item 'LA01' is the only master schedule item in this example, and both the quantity on hand and the scrap factor are zero for all items, the summarized parts list displayed in Output 2.1.3 is also the summarized bill of material for item 'LA01'.

The following SAS code uses PROC NETDRAW to draw a family tree diagram displaying the indented bill of material for item 'LA01'. The NETDRAW procedure requires the descriptive information for each node to be associated with the parent node in each observation. However, the Indented BOM data set contains the descriptive (part master) information for the component identified by the _Part_ variable. Thus, the following code prepares the data for PROC NETDRAW. This code first creates two data sets from the Indented BOM data set, IndBOM1. The IndBOM1a data set contains all variables in the Indented BOM data set, except for the Part_ID variable. The Part_ID variable is dropped and its value is copied to the Paren_ID variable. Each record in this data set is represented by a tree node in the diagram, which is uniquely identified by the value of the Paren_ID variable. The other data set, IndBOM1b, contains all parent-component relationships, in which each relationship is identified by the Paren_ID and Part_ID variables. Each observation in this data set is represented by a link in the diagram. These two data sets are concatenated to form the input data set for PROC NETDRAW. The tree diagram for the indented bill of material for item 'LA01' is displayed in Output 2.1.4. For further details about the NETDRAW procedure, refer to Chapter 8, The NETDRAW Procedure (SAS/OR User's Guide: Project Management).

/* Draw a tree diagram for illustrating the product structure */
/* Each record denotes a node in the tree */
data IndBOM1a(drop=Part_ID);
   set IndBOM1;
   Paren_ID=Part_ID;
run;

/* Extract the Parent - Part information */
data IndBOM1b;
   set IndBOM1(keep=Paren_ID Part_ID);
run;

/* Prepare the data set for running NETDRAW */
data TreBOM1;
   set IndBOM1a IndBOM1b;
run;

/* Specify graphics options */
goptions hpos=32 vpos=80 border;
pattern1 v=s c=blue;

title h=5 j=c 'Multilevel Bill of Material Diagram';
footnote h=2 j=l
   'Node shows ID Number, Part Number, and Quantity Required';

/* Invoke PROC NETDRAW to display BOM tree */
proc netdraw data=TreBOM1( where=(Paren_ID NE .) ) out=NetOUT;
   actnet / act=Paren_ID succ=Part_ID id=(Paren_ID _Part_ Qty_Per)
            ctext=white htext=3 font=swiss carcs=black
            ybetween=3 xbetween=8 centerid
            tree pcompress rotatetext rotate
            arrowhead=0 rectilinear nodefid nolabel;
run;

Output 2.1.4: Tree Diagram for the Bill of Material

Tree Diagram for the Bill of Material


Last updated: August 24, 2020