Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The BOM Procedure

Example 1.1: Bill of Material with Lead Time Information

As explained in the section "Single-Level Bills of Material Data Set", most companies store the relatively constant information for parts in a part master file. In this example, you start with two different data files, Pmaster1 and ParComp1. The Pmaster1 data set, as shown in Output 1.1.1, is a simplified version of the ABC Lamp Company's part master file. Note that the data set contains the description, the lead time, and the unit of measure information for each part. The data set ParComp1 (as shown in Output 1.1.2) lists the part-component relationship of each part along with the quantity of the component item needed to make one unit of that particular part.

The SAS DATA step code to accomplish this is as follows:

      /* Part Master data */
   data PMaster1;
      input Part      $8.
            Desc      $24.
            Unit      $8.
            LeadTime  8.0
            ;

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

      /* Part-Component relationship data   */
   data ParComp1;
      input Part      $8.
            Component $8.
            QtyPer    8.0 ;
   datalines;
   LA01    B100           1
           S100           1
           A100           1
   B100    1100           1
           1200           1
           1300           1
           1400           4
   A100    1500           1
           1600           1
           1700           1
   1100    2100          26
   1500    1400           2
   1700    2200          12
           2300           1
   ;

     /* Display the part master data */
   proc print data=PMaster1 noobs;
      title 'ABC Lamp Company';
      title3 'Part Master Data';
   run;

     /* Display the part-component relationship data */ 
   proc print data=ParComp1 noobs;
      title 'ABC Lamp Company';
      title3 'Part-Component Relationship Data';
   run;

Output 1.1.1: Part Master Data Set
 
ABC Lamp Company
Part Master Data

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

Output 1.1.2: Part-Component Relationship Data Set
 
ABC Lamp Company
Part-Component Relationship Data

Part Component QtyPer
LA01 B100 1
  S100 1
  A100 1
B100 1100 1
  1200 1
  1300 1
  1400 4
A100 1500 1
  1600 1
  1700 1
1100 2100 26
1500 1400 2
1700 2200 12
  2300 1

The SlBOM1 data set is created by appending the part-component data set, ParComp1, to the end of the data set PMaster1 to form an input data set for the procedure:

     /* Append the Part-Component information to */
     /* the part master data                     */ 
   data SlBOM1;
      set PMaster1 ParComp1;
   run;

The following code produces the Indented BOM data set and displays it in Output 1.1.3. A new variable, Tot_Lead, has been added to the output data set. This variable denotes the total lead time accumulated from the product `LA01' to the item identified by the _Part_ variable:

     /* Create the indented BOM with lead time */
   proc bom data=SlBOM1 out=IndBOM1; 
      structure / part=Part 
                  leadtime=LeadTime 
                  component=Component
                  quantity=QtyPer
                  id=(Desc Unit); 
   run;

     /* Display the indented BOM data */
   proc print data=IndBOM1 noobs;
      var _Level_ _Part_ Desc QtyPer Qty_Prod 
          Unit LeadTime Tot_Lead _Parent_ _Prod_;
      title 'ABC Lamp Company';
      title3 'Indented Bill of Material, Part LA01';
   run;

Output 1.1.3: Indented Bill of Material with Lead Time
 
ABC Lamp Company
Indented Bill of Material, Part LA01

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

The following code uses the Indented BOM data set produced in the previous invocation of PROC BOM to produce a data set that can be used by the NETDRAW procedure:

     /* Prepare the data set for running NETDRAW */
   data IndBOM1a(drop=Part_ID);
      set IndBOM1;
      Paren_ID=Part_ID;
   run;

   data IndBOM1b;
      set IndBOM1(keep=Paren_ID Part_ID);
   run;

   data TreBOM1;
      set IndBOM1a IndBOM1b;
      LTnQP = put(LeadTime, f3.)||"  "||put(QtyPer, f3.);
   run;

PROC NETDRAW is invoked with the NODISPLAY option to create a data set (Layout1) 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 Offset';
   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=TreBOM1( where=(Paren_ID NE .) ) 
                out=Layout1 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:

     /* Lead time offset the X coordinate of each node */
   data TreBOM1a;
      set Layout1;
      if _seq_ = 0;
      drop _seq_;
      _x_ = Tot_Lead;
   run;

     /* display the BOM tree with lead-time offset */
   proc netdraw data=TreBOM1a;
      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;

Refer to "The NETDRAW Procedure" chapter in the SAS/OR User's Guide: Project Management, Version 8 for details.

The resulting tree diagram is shown in Output 1.1.4.

Output 1.1.4: BOM Tree Structure with Lead-time Offset
bome1gd.gif (7261 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.