The BOM Procedure

Example 3.1 Bill of Material with Single Input Data Set

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 3.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 3.1.1: The Input Data Set (SlBOM1)

ABC Lamp Company
 
PROC BOM Input Data Set

Parent Desc Unit Comp1 Comp2 Comp3 Qty1 Qty2 Qty3
LA01 Lamp LA Each B100 S100 A100 1 1 1
B100 Base assembly Each 1100 1200 1300 1 1 1
      1400     4 . .
S100 Black shade Each       . . .
A100 Socket assembly Each 1500 1600 1700 1 1 1
1100 Finished shaft Each 2100     26 . .
1200 6-Diameter steel plate Each       . . .
1300 Hub Each       . . .
1400 1/4-20 Screw Each       . . .
1500 Steel holder Each 1400     2 . .
1600 One-way socket Each       . . .
1700 Wiring assembly Each 2200 2300   12 1 .
2100 3/8 Steel tubing Inches       . . .
2200 16-Gauge lamp cord Feet       . . .
2300 Standard plug terminal Each       . . .


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 3.1.2, and the summarized parts list, which has been sorted by the _Part_ variable, is displayed in Output 3.1.3. These are exactly the same as the indented bill of material shown in Figure 3.3 and the summarized parts list shown in Figure 3.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 3.1.2: Indented Bill of Material (IndBOM1)

ABC Lamp Company
 
Indented Bill of Material, Part LA01

_Level_ _Parent_ _Part_ Desc Qty_Per Qty_Prod Unit Paren_ID Part_ID _Prod_
0   LA01 Lamp LA . 1 Each . 0 LA01
1 LA01 B100 Base assembly 1 1 Each 0 1 LA01
2 B100 1100 Finished shaft 1 1 Each 1 2 LA01
3 1100 2100 3/8 Steel tubing 26 26 Inches 2 3 LA01
2 B100 1200 6-Diameter steel plate 1 1 Each 1 4 LA01
2 B100 1300 Hub 1 1 Each 1 5 LA01
2 B100 1400 1/4-20 Screw 4 4 Each 1 6 LA01
1 LA01 S100 Black shade 1 1 Each 0 7 LA01
1 LA01 A100 Socket assembly 1 1 Each 0 8 LA01
2 A100 1500 Steel holder 1 1 Each 8 9 LA01
3 1500 1400 1/4-20 Screw 2 2 Each 9 10 LA01
2 A100 1600 One-way socket 1 1 Each 8 11 LA01
2 A100 1700 Wiring assembly 1 1 Each 8 12 LA01
3 1700 2200 16-Gauge lamp cord 12 12 Feet 12 13 LA01
3 1700 2300 Standard plug terminal 1 1 Each 12 14 LA01


Output 3.1.3: Summarized Parts List (SumBOM1)

ABC Lamp Company
 
Summarized Parts List, Period 1

_Part_ Low_Code Gros_Req On_Hand Net_Req Desc Unit
1100 2 1 0 1 Finished shaft Each
1200 2 1 0 1 6-Diameter steel plate Each
1300 2 1 0 1 Hub Each
1400 3 6 0 6 1/4-20 Screw Each
1500 2 1 0 1 Steel holder Each
1600 2 1 0 1 One-way socket Each
1700 2 1 0 1 Wiring assembly Each
2100 3 26 0 26 3/8 Steel tubing Inches
2200 3 12 0 12 16-Gauge lamp cord Feet
2300 3 1 0 1 Standard plug terminal Each
A100 1 1 0 1 Socket assembly Each
B100 1 1 0 1 Base assembly Each
LA01 0 1 0 1 Lamp LA Each
S100 1 1 0 1 Black shade Each


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 3.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 3.1.4. For further details about the NETDRAW procedure, refer to Chapter 9: The NETDRAW Procedure in SAS/OR 12.3 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 3.1.4: Tree Diagram for the Bill of Material

Tree Diagram for the Bill of Material