Documentation >
MAC-PAC Technical Library >
Manufacturing >
Product Costing >
Programs >
Cost Generation/Simulation - Purpose >
Cost Generation/Simulation - Calculations
Cost Generation/Simulation - Calculations
PC100E
A. Housekeeping
1. The file activity flag on the data base control file record is checked. If it equals N, which indicates the integrity of the data base has been damaged, a system abort occurs.
2. Work fields are defined and program constants are initialized.
3. The company name record (COMNAM) is obtained from the System Control file (CT100M). If this information is not found, a warning message is sent to the system operator and processing continues.
4. The date format (category 049) is retrieved from the Reference file (REFERP). If it is not found, a message is sent to the system operator and the date format defaults to MM/DD/YY.
5. The applications installed (category 012) on the Reference file are checked, and the Shop Floor Installed flag is saved. If this record is not found, a system abort occurs.
6. The cost element codes (category C17) are loaded into arrays from the Reference file.
7. The first Product Costing generation request record on the Product Cost Generation Request file is checked to determine the requested cost type and generation option. There are five possibilities:
· Current Cost Generation - Full
· Current Cost Generation - Selective
· Standard Cost Generation - Selective
· Cost Simulation - Full
· Cost Simulation - Selective
B. Mainline
1. The following transaction defaults are obtained:
a. The Piece Rate Standard on the Warehouse Description file (IC170ML2) is retrieved to determine whether piece rate is hours per piece (H) or pieces per hour (P).
b. The requested output queue is checked. The output queue is changed if necessary.
c. The following transaction default processing occurs for each cost type and generation option.
(1) For a full current cost generation, the logical Part Master file (DE100ML2), in descending low-level code sequence, is opened.
(2) For a selective current cost generation, the following steps occur:
(a) The logical Part Master file (DE100ML3) is opened.
(b) The current cost activity flag (OLFLG0) is set on for the parent parts of all parts whose current cost activity flag (OLFLG0) is set on. The current to standard rollover flag (OLFLG1) is set on if the Standard Rollover flag was set to Y (yes) in the request. The Bill of Material Effectively Date field (AMCEA) is checked for parts that do not have their current cost activity flag set on. If the date is less than or equal to the requested effectively date of the cost generation, the current cost activity flags for the part and its parents are set on. The logical Product Structure file (DE120ML) is used to identify the parents of the parts.
(3) For a standard cost generation:
(a) The logical Part Master file (DE100ML4) is opened.
(b) The standard cost activity flag (OLFLG2) is set on for the parent parts of all parts whose standard cost activity flag (OLFLG2) is set on. The logical Product Structure file (DE120ML) is used to identify the parent parts of the flagged parts.
(4) In simulated cost processing:
(a) For a full simulation, the logical Part Master file (DE100ML2) is opened. For a selective simulation, the logical Part Master file (DE100ML5) is opened.
(b) The part master and part costs simulated cost fields and flags are cleared. The workcenter and workcenter rates simulated rate fields are updated with current rate fields and the simulated flags are set off.
(c) The cost codes and percentage changes are loaded into arrays.
(d) Single part/cost transactions are processed. The change in total cost for the part is calculated, the simulated cost this level is updated with the change in cost, and the simulation flag (OLFLG6) is set to 1. If the Standard Rollover flag was set to Y (yes) in the request, the Simulated Cost Rollover flag (OLFLG8) is set to 1. The simulated part cost is updated with the transaction cost and the simulated flag (PCSIM) is set to 1.
(e) In a selective simulation, the cost code for the part/cost of purchased, raw material, transfer and non-stock parts are compared to the codes on the simulated code changes array. If the cost code is specified for simulation, its simulated cost and this-level cost of the part are updated by the specified percentage change. If the cost code is not specified for simulation, but an all costs percentage was requested the costs are updated by the specified percentage. The simulation flags for the part (OLFLG6) and the part cost (PCSIM) are set to 1. If the part has already been updated by a single part/cost simulation transaction, it is not updated by any applicable cost code transaction: single part/cost simulation transactions override cost code or all costs simulation transactions.
(f) In a selective simulation generation, the simulated cost activity flags (OLFLG6) are set on for all parts associated with workcenters that have their simulated rate activity flag (WUFLG) set on. If the Standard Rollover flag was set to Y (yes) in the request, the Simulated Cost Rollover flag (OLFLG8) is set to 1.
(g) The simulated cost update flag is set on for the parent parts of all parts that have their simulated cost activity flag (OLFLG6) set on. If the Standard Rollover flag was set to Y (yes) in the request, the Simulated Cost Rollover flag (OLFLG8) is set to 1.
(5) For each current, standard, or simulation generation, five workcenter arrays are loaded. The Workcenter file is read sequentially and the workcenter number (ARW), labor rate (ARL), labor-based burden rate (LOH), machine-based burden rate (MOH), and machine/labor paced flag (ARP) arrays are updated with the workcenter information. This process is performed for only the first 100 active, non-miscellaneous cost workcenters (workcenter number less than 900). (These arrays are used to increase the efficiency of the input/output processing.) For a current cost generation, the workcenter current rate flag (WMFLG) is set off.
(a) For selective current or standard cost generations, the print product cost sheets flag (CURPCS or STDPCS) is set off for all parts from the last generation. Also, for a current cost generation, the current to standard rollover flag (OLFLG1) is set off.
2. The appropriate logical view of the Part Master file is read sequentially for all active parts. Material, labor and overhead costs are accumulated and updated. Two output report files are produced: the Cost Exception file (PC100AP) and the Cost Summary file (PC100BP).
3. Specific processing is related to the part type being processed and the selected cost option.
4. For purchased parts, , manufactured parts costed as purchased parts, raw materials, transfer parts, and non-stocked parts (part type codes 1, 2, 3, 8, and C):
a. The appropriate cost fields (current, standard or simulated) are accumulated, depending upon the option selected.
b. If the this-level material cost is zero, a warning record is written.
c. The this-level material, labor and overhead values are moved into total cost fields, the part master record is updated and a cost summary record is written.
d. For a full simulation only, any part that has not had an individual simulation transaction posted against it is further checked. The simulated changes array is accessed and if the part's cost codes are found, the simulated material cost is calculated by combining the current material cost and the percentage change. If its code is not found but ALL codes has been specified, the current cost is extended by the related percentage to indicate the simulated cost.
5. For build-thru parts and manufactured parts (part type codes 2 and 6):
a. The current, standard or simulated cost fields are accumulated, depending on the option selected.
b. The material costs for all effective, non-reference components of this parent part are accessed and accumulated. The component material costs are multiplied by the Quantity Per and divided by one minus the Product Structure Scrap Factor before being accumulated. The material costs are accumulated in a material bucket for all consumed components; part costs for produced components are accumulated in a separate bucket. The cost elements of each component part are multiplied by the quantity per and accumulated into arrays by cost code.
c. If no routing file is present, the this-level costs are also accumulated into the total costs to represent the this-level routing costs.
d. If the routing file is present, all routing records are read for the part being processed. Alternate, master and comment routings, as well as non-effective primary routings, are not costed. JIT manufactured parts may or may not have routing file. If routing record is not found for JIT manufactured parts, process parts as if Routing file is not present. (Step 4.)
e. For all other routings, the Workcenter file arrays are accessed and the labor and overhead amounts are computed. If the workcenter data is not found on the array, the Workcenter file is accessed.
(1) For JIT parts, the labor hours and machine hours are used in calculating labor and overhead costs. If the workcenter is labor paced, the labor hours are multiplied by the labor and overhead rates to determine the labor and overhead costs. If the workcenter is machine paced, the labor cost is the labor hours multiplied by the labor rate. The overhead cost is the machine load multiplied by machine-based burden rate plus labor load multiplied by labor-based burden rate:
Overhead Cost equals (Machine Load times Machine-Based Burden Rate) plus (Labor Load times Labor-Based Burden Rate).
(2) For MRP parts, if the piece rate is in pieces per hour, it is inverted to give hours per piece. The labor cost is the labor rate multiplied by the calculated labor hours per piece.
(3) For MRP parts that have a machine-paced operation the labor hours per piece is calculated by multiplying the piece rate (machine hours per piece) by the number of persons per machine.
(4) For MRP parts with a crew operation, the labor hours per piece is calculated by multiplying the piece rate by the crew size.
(5) For all other operations with MRP parts, the labor hours per piece is the piece rate.
f. For current costs, the next effectively change date on the Part Master file is updated with the date of the next effectively change on either the Product Structure file or the Routing file occurring after the selected effectively date for this run. If there are no such dates, high values (9s) are moved into the field.
g. For parts without simulated costs, the current cost values and the cost error codes are used in a full simulation.
h. The by-product material cost is subtracted from the total material cost to obtain the total material cost for the parent part. Calculated costs are then moved to the appropriate total cost fields and a summary record is written to the Summary of Total Costs file (PC100BP).
i. Total costs by cost element code, as stored in arrays, are compared to the costs on the Part Costs file (DE105M). The file is updated accordingly.
(1) For fixed-time operations with batch sensitivity equal no (N) (operation types 6 and 7), the PC labor hours and PC machine hours are used in calculating labor and overhead costs. The labor cost is the labor hours multiplied by the labor rate, divided by the average order quantity. If the work center is machine paced, the overhead cost is the machine hours multiplied by the machine-based overhead rate plus the labor hours multiplied by the labor-based overhead rate, divided by the average order quantity. If the work center is labor paced, the overhead cost is equal to the labor hours multiplied by the labor-based overhead rate. For fixed time operations with batch sensitivity equal yes (Y) (operation types 6, 7, and 8), the labor hours per batch, the machine hours per batch and the calculated number of batches are used in calculating labor and overhead costs. The number of batches is calculated as follows:
NUMBER
OF BATCHES
|
=
|
AVERAGE
ORDER QUANTITY
|
—
|
SENSITIVITY
FACTOR
100
|
x
|
BATCH
QUANTITY
|
|
|
|
|
BATCH QUANTITY
|
|
|
|
|
|
|
|
|
|
|
|
|
The number of batches is always rounded up to the nearest whole number. If the workcenter is labor paced the labor cost per batch and the overhead cost per batch are calculated by multiplying the labor hours per batch by the number of batches and by the labor and overhead rates. The labor and overhead costs are determined by dividing the results by the average order quantity. If the workcenter is machine paced the labor cost per batch is calculated by multiplying the labor hours per batch by the number of batches and by the labor rate. The labor cost is determined by dividing the labor cost per batch by the average order quantity. The overhead cost per batch is calculated by multiplying the machine hours per batch by the number of batches and by the machine-based overhead rate, plus the labor hours per batch multiplied by number of batches and labor-based overhead rate. The overhead cost is determined by dividing the overhead cost per batch by the average order quantity.
(2) For miscellaneous cost operations (workcenter numbers greater than or equal to 900), the rate code and total cost are retrieved from the Miscellaneous Cost Header file (ME160M1). The rate code is used to determine whether the cost is fixed per order or variable (fixed per unit) and which type of cost (material, labor or overhead) it is. For fixed per order costs, the miscellaneous cost is divided by the part's average order quantity before being accumulated; for variable (fixed per unit) costs, the miscellaneous cost is used directly. If the rate code specifies that the cost is a "memo charge," it is not included in the part's cost.
The detailed cost elements are retrieved from the Miscellaneous Cost Detail file (ME160M2). Depending on the rollup code for each cost element (as defined on the Reference file), the cost is rolled up into the correct bucket for the part.
(3) The workcenter rates for the workcenter are accessed. For each rate, standard labor or machine hours are multiplied by the rate, and the result is accumulated into arrays by cost code.
6. The PCCTL1 record of the System Control file (CT100M) is obtained and the requested effectively date (CZDAT7) is moved to the actual effectively date (CZDAT1, CZDAT3 or CZDAT5), according to the cost type specified (current, simulated or standard).
7. The system date is moved to the actual generation date (CZDAT2, CZDAT4 or CZDAT6) fields, according to the cost type specified.
8. The actual Routing File Present fields (CZRTCR, CZRTLP, or CZRTCS) and actual simulation trial ID (CZSIDI) are also updated.
9. The next generation request is retrieved from the Product Cost Generation file (PC130AP), and processing continues until no more request transactions exist.