The BOM Procedure |
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)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 2.3 and the summarized parts list shown in Figure 2.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)
|
|
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 7, "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 .) ); actnet / act=Paren_ID succ=Part_ID id=(Paren_ID _Part_ QtyPer) ctext=white font=swiss htext=3 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
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.