Documentation >
MAC-PAC Technical Library >
Distribution >
Expert Configurator >
Programs >
Configuration Cost Rollup and Regeneration - Purpose >
Configuration Cost Rollup and Regeneration - Calculations
Configuration Cost Rollup and Regeneration - Calculations
EC180E
A. Housekeeping
1. Parameter lists and key lists are defined.
2. Work fields are defined and program constants are initialized.
3. Retrieve Reference File data.
a. Entity Name is retrieved from Reference File category 002.
b. CPF File Access Status Codes are retrieved from Reference File category 015.
c. Data Format is retrieved from Reference File category 049. If no record is found, the date format is defaulted to MM/DD/YY. Date and time is saved for a generation run time stamp.
e. The Applications Installed are retrieved from Reference File category 012.
f. The Installation Defaults are retrieved from Reference File category 133.
4. Plant/Warehouse data is loaded from the Warehouse Description file (IC170M).
B. Mainline
1. If the program is called from the Manufacturing Configuration program (EC200E) -- PMODE equals 'EC200E' -- execute cost generation.
a. Route the report to the output queue on the Configuration Cost Regeneration Request file (EC320AP).
b. Write the transaction control headings to the report (EC180A).
c. Perform the configuration cost regeneration.
(1) Save the Order Number (SPONO), Release Number (SFRLNO), Line Number (SPLNNO), and Sequence Number (SPSEQN) for the last sales order option.
(2) Retrieve the part information from the Part Master file (DE100M).
(3) If the part is configured costed (PMCFCO equals '3' or '4') set the update configuration Flag (UPDCFG) to yes.
(4) Retrieve the Manufacturing Order from the Manufacturing Order by M.O. Number file (IC100ML1).
(5) Retrieve the Configuration Code record from the Configuration Code file (EC140M) and calculate the configuration costs for the configured part on the option record.
(a) Set the Average Order Quantity (AVORQT) equal to the Manufacturing Order Quantity if the Allow New Cost Flag (CCALWC) is yes or if the part is not configured costed.
(b) Set the Average Order Quantity equal to the Accounting Order Quantity (CCSADQ) from the Configuration Code file (EC140M) if the part is configuration costed but the Allow New Cost Flag (CCALWC) is no.
(c) Retrieve the costs for each component in the Manufacturing Order as follows:
If the component part is configuration costed retrieve the configured costs from the Configuration Code file (EC140M). If the record is not found in the file, retrieve its costs from the Part Master file (DE100M).
If the component is not configuration costed look it up in the array of non-configured costed parts. If it is found, use the cost already calculated for it. If it is not found, used the standard cost from the array.
Total Cost
|
equals
|
Retrieved Cost
|
times
|
Order Quantity
|
divided by
|
Scrap Factor
|
(d) Add the component costs to total material cost if the component is consumed. Subtract the component costs from the total material cost if the component is produced.
(e) Retrieve the part's routing from the Routing file (ME120M).
(f) Retrieve the part's workcenter from the Workcenter file (ME100M).
(g) Calculate the labor and overhead costs for each record on the Labor Requirements file (IC125M) for the Manufacturing Order.
Fixed Time Calculations:
# of Batches
|
equals
|
|
Average Order Quantity
|
minus
|
|
Sensitivity. Factor
----------
100
|
times
|
Batch Quantity
|
|
|
divided by
|
Batch Quantity
|
(h) Use the Number of Batches to inflate the Labor Hours and Machine Hours.
Fixed Time Labor Hours
|
equals
|
Fixed Time Labor Hours
|
times
|
Number of Batches
|
Fixed Time Labor Hours
|
equals
|
Fixed Time Labor Hours
|
times
|
Number of Batches
|
Labor Paced Operations:
Labor Cost
|
equals
|
Fixed-Time Labor Hours
|
times
|
Labor Rate
|
Overhead Cost
|
equals
|
Fixed-Time Labor Hours
|
times
|
Labor Overhead Rate
|
Machine Paced Operations:
Labor Cost
|
equals
|
Fixed-Time Labor Hours
|
times
|
Labor Rate
|
|
Overhead Cost
|
equals
|
|
Fixed-Time Labor Hours
|
times
|
Labor Overhead Rate
|
|
plus
|
|
|
Fixed-Time Machine Hours
|
times
|
Machine Based Rate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The resulting Labor and Overhead Costs are then divided by the Average Order Quantity.
Labor Cost
|
equals
|
Labor Cost
|
Divided by
|
Average Order Quantity
|
Overhead Cost
|
equals
|
Overhead Cost
|
Divided by
|
Average Order Quantity
|
Variable Time Calculations:
Variable, Non-Crew, Labor Paced Operations: (Piece Rate in Hours per Piece)
Labor Cost
|
equals
|
Piece Rate
|
times
|
Labor Rate
|
Overhead Cost
|
equals
|
Piece Rate
|
times
|
Labor Overhead Rate
|
Variable, Crew, Labor Paced Operations: (Piece Rate in Hours per Piece)
Labor Cost
|
equals
|
Piece Rate
|
times
|
Number of Persons
|
times
|
Labor Rate
|
Overhead Cost
|
equals
|
Piece Rate
|
times
|
Number of Persons
|
times
|
Labor Overhead Rate
|
Variable, Machine Paced Operations: (Piece Rate in Hours per Piece)
Labor Cost
|
equals
|
# of Persons
|
times
|
Labor Rate
|
times
|
Piece Rate
|
Divided by
|
# of Machines
|
Overhead Cost
|
equals
|
|
Piece Rate
|
times
|
Machine Based Rate
|
|
plus
|
|
|
|
Number of Persons
|
divided by
|
Number of Machines
|
times
|
Piece Rate
|
times
|
Labor Overhead Rate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Miscellaneous Cost Workcenter (900 level or greater)
Fixed Material Cost per Order Workcenter
Miscellaneous Material Cost
|
equals
|
Workcenter Miscellaneous Cost
|
divided by
|
Average Order Quantity
|
Fixed Labor Cost per Order Workcenter
Miscellaneous Labor Cost
|
equals
|
Workcenter Miscellaneous Cost
|
divided by
|
Average Order Quantity
|
Fixed Overhead Cost per Order Workcenter
Miscellaneous Overhead Cost
|
equals
|
Workcenter Miscellaneous Cost
|
divided by
|
Average Order Quantity
|
Variable Material Cost per Unit Workcenter
Miscellaneous Material Cost
|
equals
|
Workcenter Miscellaneous Cost
|
Variable Labor Cost per Unit
Miscellaneous Labor Cost
|
equals
|
Workcenter Miscellaneous Cost
|
Variable Overhead Cost per Unit
Miscellaneous Overhead Cost
|
equals
|
Workcenter Miscellaneous Cost
|
(i) Accumulate the calculated costs in the appropriate costing buckets.
(j) Accumulate the costs in the Total Cost field. If the total costs is less than zero set it to zero and send and error message indication that the produced components cost more than the cost of producing the manufacturing order.
If this is a regeneration and the costs were calculated on the same day as the regeneration and those two costs are not the same, mark this condition as an exception to be printed on the exception report.
(k) Update the Configuration Code file (EC140M) if the configured part is configured costed and the Allow New Cost Field is Yes. If the Allow New Cost Field is No, flag that the costs are frozen.
(l) If the part is not configured costed, update the array for the part with the calculated cost.
(7) Write an exception record if the Manufacturing Order is not found.
(8) Write the detail lines of the report.
(9) Write the exception lines if any exist.
(10) Update the Configuration Code in the distribution warehouse on the Configuration Code file (EC140M) with the calculated amounts if the sales order is sourced out of a distribution warehouse and the configuration code on the sales order line matches the one on the manufacturing order.
(11) If the configuration code on the sales order line does not match that on the manufacturing order, retrieve the costs from the Configuration Code file (EC140M) and use them for the final cost.
(12) Write the final detail lines.
(13) Rollback all changes if an error is encountered.
(14) Write an exception record if no records are found.
2. If the program is running a batch regeneration, retrieve the first record in the Configuration Cost Regeneration Request file (EC320AP).
a. Set the lower limit on the Sales Order Line Item file (OP100M2) if the program is running a full regeneration.
(1) Process the sales order lines if the configuration code is not equal to blanks.
(2) Route the report to the output queue on the Configuration Cost Regeneration Request file (EC320AP).
(3) Write the report headings.
(4) Perform the configuration cost generation. See 1. c. (1) through 1. c. (14) previously in this program for a detailed description of these calculations.
b. Use the sales order if the program is running a regeneration for a specific sales order.
(1) Route the report to the output queue on the Configuration Cost Regeneration Request file (EC320AP).
(2) Write the report headings.
(3) Perform the configuration cost generation. See 1. c. (1) through 1. c. (14) previously in this program for a detailed description of these calculations.
3. Delete the report request record from the Configuration Cost Regeneration Request file (EC320AP) once it has been processed.
4. Write the ENE OF REPORT line and close the Configuration Cost Generation/Regeneration Printer file (EC180PF1).
5. Format the Total Cost field (ORDCST) that will be passed to the Manufacturing Configuration program (EC200E).