CalculateMachineOrLaborHours

Calculate Machine Or Labor Hours

Minor Business Rule

Object Name: B3000220

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This function calculates the required amount of run labor or run machine hours, or both needed to 
manufacture a specified quantity of a parent item in a routing operation.  The calling program will pass 

a mode indicator which will specify whether labor or machine hours or both are to be calculated.  The 

calculated values are passed back to the calling program.


1.2Setup Notes and Prerequisites


1.3Special Logic


Calculation note:The Planned Yield Percent passed into this function is expressed as a whole 
percentage.  In order to correctly calculate extended hours, this whole percent must first be converted to a 

planned yield rate.  This is done by dividing the whole percent by 100.


2.Technical Specifications


2.4Processing 


1.0  If Mode is equal to "1" or "3", calculate Total Run Labor Hours as follows:

1.1  Run Labor Hours equals:  
a.)  Run Labor Hours passed in divided by the Time Basis Quantity;  
b.)  Take the result of 1.1a. and multiply that value by the passed in Transaction 

Quantity; 

c.)  Take the result of 1.1b. and multiply by the Crew Size.


1.2  If there are no Intermediate Parts (VC01A="0"), Run Labor Hours equals:  the Run Labor 
Hours calculated in 1.1c. divided by the Planned Yield Percent (CPYP) after adjustment of the 

Planned Yield Percent to a rate (divide CPYP by 100 first).


2.0  If Mode is equal to "2" or "3", calculate Total Run Machine Hours as follows:


2.1  Run Machine Hours equals:  
a.)  Run Machine Hours passed in divided by the Time Basis Quantity; 
b.)  Take the result of 2.1a. and multiply that value by the passed in Transaction 
Quantity.


2.2  If there are no Intermediate Parts (VC01A="0"), Run Machine Hours equals:  the Run Machine 
Hours calculated in 2.1b. divided by the Planned Yield Percent (CPYP) after adjustment of 

Planned Yield Percent to a rate (i.e. divide CPYP by 100 first).



Notes on Parameters:
1)  If Mode is equal to "1", calculate Run Labor Hours Only;  if Mode is equal to "2", 
calculate Run Machine Hours Only; if Mode is equal to "3", calculate both Run Labor and Run Machine 

Hours.


2)  The expected data source for most parameters is an operation row in the Routing Master 
Table F3003.  Run Machine Hours (IRRUNM), Run labor Hours (IRRUNL), Crew Size (IRSETC) and Planned 

Yield Percent (IRCPYP) are all available and expected to come from, these columns.


3)  Transaction quantity (TRQT) is passed from the calling program.  It can be: 

a) the Batch Quantity selected and displayed on an inquiry screen; 
b) the Requested Quantity entered by the user; 

c) the quantity of an Intermediate item produced during a routing operation, already 
grossed up by the operation's cumulative yield percent (see BF Calculate Intermediate 

Quantity With Shrink B3000290
); or 
d) the quantity on Work Order

Note: a), b) and d), could represent the parent item quantity grossed up to include shrink 
from the Branch Inventory file, if required by the calling application.


4)  The Time Basis Quantity must be passed in from the calling program.  Use business function 
ConvertTimeBasisCodeToQuantity B3000330 to obtain the quantity to pass.  If a Time Basis 

Quantity is not appropriate for the calling program, it should pass in a TB Quantity of "1".


5)  Determination of the production of intermediate parts should be made in the calling program 

before execution of this function.  The function CheckForOperationResources B3000060.C  

performs this activity.  If intermediate parts exist for the routing operation the Intermediate 

Parts-(1/0) parameter (VC01A) should be passed with a value of  "1".  If no intermediate parts exist, 

the parameter should be passed with a value of "0".


6)  The returned value for Total Hours should not be updated into the Routing Master Table.


7)  The calculation machine hours is identical to that of labor hours, with the exception that 
there is no crew size for machines.  If Crew Size (SETC) was assigned a value equal 1 (one) for 

machine hours calculations, the same calculation could be used.



^

Data Structure

D3000220 - Calculate Machine Or Labor Hours

Parameter NameData ItemData TypeReq/OptI/O/Both
mnRunLaborHoursRUNLMATH_NUMERICNONENONE

The standard hours of labor that you expect to incur in the normal production of this item. The run labor hours in the Routing Master table 
(F3003) are the total hours that it takes the specified crew size to complete the operation. The hours are multiplied by the crew size during shop 
floor release and product costing.

mnRunMachineHoursRUNMMATH_NUMERICNONENONE

The standard machine hours that you expect to incur in the normal production of this item.

mnCrewSizeSETCMATH_NUMERICNONENONE

The number of people who work in the specified work center or routing operation. The system multiplies the Run Labor value in the Routing 
Master table (F3003) by crew size during costing to generate total labor amounts. If the Prime Load Code is L or B, the system uses the total 
labor hours for backscheduling. If the Prime Load Code is C or M, the system uses the total machine hours for backscheduling without 
modification by crew size.

mnTransactionQuantityTRQTMATH_NUMERICNONENONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

mnPlannedYieldPercentCPYPMATH_NUMERICNONENONE

The cumulative planned output yield percent for a step. The system uses this value to adjust the operation step scrap percent for the 
components at that operation step. This enables the MRP system to use the operation step scrap percent along with the existing component scrap 
percent to plan component demand.

cIntermediatePartsYesVC01AcharNONENONE

This is a generic field used for video constants display.

cModeMODEcharNONENONE

The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed.

mnTimeBasisQuantityQNTYMATH_NUMERICNONENONE

The number of units that the system applies to the transaction.

Related Functions

None

Related Tables

None