The BOM Procedure |
As in Example 2.1, this example also uses a single input data set with each observation containing product structure data and part master data. Unlike the SlBOM1 data set (shown in Output 2.1.1) in which each observation contains three product structure records, each observation in the input data set SlBOM2, as depicted in Output 2.2.1, contains only one product structure record. The observations in both input data sets also contain one part master record. However, in the previous example, the variable Parent contains the part number for the part master record, whereas in the current example, the part number for the part master record is contained in the variable Component. In addition, in this example, each part master record also contains requirement (contained in the Gros_Req variable) and quantity on hand (contained in the On_Hand variable) information.
Output 2.2.1: The Input Data Set (SlBOM2)The following code produces the Indented BOM data set and the Summarized Parts data set. The Indented BOM data set, IndBOM2, is displayed in Output 2.2.2. The "PART=Component" specification in the STRUCTURE statement indicates that the Component variable contains the part number for the part master record in each observation. Since the LEADTIME= option is specified, a new variable, Tot_Lead, has been added to the Indented BOM data set. This variable denotes the total lead time accumulated from the root record (the top-most record) to the record identified by the value of the Part_ID variable.
/* Create the indented BOM and the summarized parts list */ proc bom data=SlBOM2 out=IndBOM2 summaryout=SumBOM2; structure / part=Component leadtime=LeadTime parent=Parent component=Component quantity=QtyPer qtyonhand=On_hand requirement=Gros_Req id=(Desc Unit); run;Output 2.2.2: Indented Bill of Material with Lead Time (IndBOM2)
|
|
The data set SumBOM2 displayed in Output 2.2.3 contains the sorted summarized parts list for the production plan, in which 50 units of 'Lamp LA' are planned (say, in period 2). Based on the input data, 'Lamp LA' has 20 units and 'Base assembly' has 50 units currently on hand. The gross requirements of 30 units for 'B100', 'S100', and 'A100' are from the net requirement of 'LA01' (computed as Gros_Req - On_Hand). Since item 'B100' has 50 units on hand, which is more than its gross requirement, the net requirement of this item is 0. This implies that the gross requirements for '1100', '1200', and '1300' (components of the item 'B100') are all 0. However, the gross requirement for item '1400', which is also a component of 'B100', is not 0 but 60. This is due to the fact that item '1400' is also used in item '1500'.
The following code uses the Indented BOM data set produced in the previous invocation of PROC BOM to create a data set that can be used by the NETDRAW procedure.
/* Prepare the data set for running NETDRAW */ data IndBOM2a(drop=Part_ID); set IndBOM2; Paren_ID=Part_ID; run; data IndBOM2b; set IndBOM2(keep=Paren_ID Part_ID); run; data TreBOM2; set IndBOM2a IndBOM2b; LTnQP = put(LeadTime, f3.)||" "||put(QtyPer, f3.); run;
PROC NETDRAW is invoked with the NODISPLAY option to create a data set (Layout2) that contains all the layout information for the tree structure. The OUT= option specifies the name of the layout data set:
/* Specify graphics options */ title h=1 j=c 'Multilevel Bill of Material with Lead-time Offsetting'; footnote h=0.5 j=l 'Node shows Part Number, Lead-time, and Quantity Required'; pattern1 v=e c=blue; /* Get the layout information for the BOM tree */ proc netdraw data=TreBOM2( where=(Paren_ID NE .) ) out=Layout2 nodisplay; actnet / act=Paren_ID succ=Part_ID id=(_Part_ LTnQP Tot_Lead) ybetween=3 xbetween=15 tree rectilinear nodefid nolabel; run;
In the next invocation, PROC NETDRAW uses a modified layout of the nodes to produce a diagram where the nodes are aligned according to the total lead time. The resulting tree diagram is shown in Output 2.2.4. Refer to Chapter 7, "The NETDRAW Procedure," (SAS/OR User's Guide: Project Management) for details about the NETDRAW procedure.
/* Lead time offset the X coordinate of each node */ data TreBOM2a; set Layout2; if _seq_ = 0; drop _seq_; _x_ = Tot_Lead; run; /* Display the BOM tree with lead-time offsetting */ proc netdraw data=TreBOM2a; actnet / id=(_Part_ LTnQP) font=swiss ctext=black htext=3 carcs=black align=Tot_Lead frame pcompress xbetween=15 ybetween=3 arrowhead=0 rectilinear nodefid nolabel; run;Output 2.2.4: Bill of Material Diagram with Lead-time Offsetting
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.