CalculateIntermediateQuantity

Calculate Intermediate Quantity

Major Business Rule

Object Name: B3000620

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description
This business function will get all the Routing Master Records from the F3003 table for a given 

Parent Item, Branch, Routing Type and Batch Quantity. It will also calculate labor/machine hours for the WO 

quantity and check for Co/By products , Intermediates and Ingredients and then return data back to 

the program.


1.1Purpose

This is to be used in the copy routine in routing program (P3112).


1.2Setup Notes and Prerequisites

The first time the function is called, pass a '1' in the Type parameter so the Request is not 

released. To get the next value in the table, pass a '2' in the Type parameter. To release the request, pass 

a '3' in the Type parameter.


1.3Special Logic

This is an exclusive function to be used by P3112

Data Structure

D3000620 - Calculate Intermediate Quantity

Parameter NameData ItemData TypeReq/OptI/O/Both
mnParentItemKITMATH_NUMERICNONENONE

The system provides for three separate item numbers.    1.   Item Number (short) - An eight-digit, computer assigned, completely 
non-significant item number.    2.   2nd Item Number - The 25-digit, free form, user defined alphanumeric item number.    3.   3rd Item Number - Another 
25-digit, free form, user defined alphanumeric item number.

szBranchMMCUcharNONENONE

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

szTypeRoutingTRTcharNONENONE

A user defined code (40/TR) that indicates the type of routing. You can define different types of routing instructions for different uses. For 
example:    M    Standard Manufacturing Routing    RWK  Rework Routing    RSH  Rush Routing You define the routing type on the work order 
header. The system then uses the specific type of routing that you define in the work order routing. Product Costing and Capacity Planning systems 
use only M type routings.

mnBatchQuantityBQTYMATH_NUMERICNONENONE

The quantity of finished units that you expect this bill of material or routing to produce. You can specify varying quantities of components 
based on the amount of finished goods produced. For example, 1 ounce of solvent is required per unit up to 100 units of finished product. 
However, if 200 units of finished product is produced, 2 ounces of solvent are required per finished unit. In this example, you would set up batch 
quantities for 100 and 200 units of finished product, specifying the proper amount of solvent per unit.

mnOperationSequenceOPSQMATH_NUMERICNONENONE

A number used to indicate an order of succession. In routing instructions, a number that sequences the fabrication or assembly steps in the 
manufacture of an item. You can track costs and charge time by operation. In bills of material, a number that designates the routing step in the 
fabrication or assembly process that requires a specified component part. You define the operation sequence after you create the routing 
instructions for the item. The Shop Floor Management system uses this number in the backflush/preflush by operation process. In engineering 
change orders, a number that sequences the assembly steps for the engineering change. For repetitive manufacturing, a number that 
identifies the sequence in which an item is scheduled to be produced. Skip To fields allow you to enter an operation sequence that you want to begin 
the display of information. You can use decimals to add steps between existing steps. For example, use 12.5 to add a step between steps 
12 and 13.

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.

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

mnWorkOrderNumberDOCOMATH_NUMERICNONENONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

jdAsOfDateASDE1JDEDATENONENONE

The date used for effectivity checking. Enter a specific date to display documents (orders, bills of material, routings, as applicable) that are 
effective on or after that date. The current system date is the default, but you can enter any future or past date.

mnOrderQuantityUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

mnOrderQtyWithShrinkageTRQTMATH_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).

mnCostRunMachineHoursRUNMMATH_NUMERICNONENONE

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

mnCostRunLaborHoursRUNLMATH_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.

szIntermediateUOMUMcharNONENONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

mnWorkIntermedQtyQNTYMATH_NUMERICNONENONE

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

mnIntermediateQtyIQTYMATH_NUMERICNONENONE

The quantity that will be invoiced for this Order Line.

cIntermediateFlagEV02charNONENONE

An option that specifies the type of processing for an event.

szStandardUOMConversionTFLAcharNONENONE

Allows you to bypass the item-specific unit of measure and use the standard unit of measure. Valid values are:    blank Use the item-specific 
unit of measure    1       Bypass the item-specific unit of measure and use the standard unit of measure

cCheckPartsListEV07charOPTNONE

An option that specifies the type of processing for an event.

mnSetupCrewSizeSETCMATH_NUMERICOPTNONE

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.

cTimeBasisCodeTIMBcharOPTNONE

A user defined code (30/TB) that indicates how machine or labor hours are expressed for a product. Time basis codes identify the time 
basis or rate to be used for machine or labor hours entered for every routing step. For example, 25 hours per 1,000 pieces or 15 hours per 
10,000 pieces. You can maintain the time basis codes in Time Basis Codes. The system uses the values in the Description-2 field on the User 
Defined Codes form for costing and scheduling calculations. The description is what the code represents, but is not used in calculations.

mnCumYieldPctCPYPMATH_NUMERICOPTNONE

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.

mnNextCumYieldPctCPYPMATH_NUMERICOPTNONE

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.

szParentItemUOMUOM1charOPTNONE

A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA 
(each) or KG (kilogram).

szRoutingUOMUOMcharOPTNONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

szErrorMessageIDDTAIcharOPTNONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cSuppressErrorMessagesEV01charOPTNONE

An option that specifies the type of processing for an event.

szLineTypeLNTYcharOPTNONE

A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as 
General Ledger, Job Cost, Accounts Payable, Accounts Receivable, and Inventory Management. It also specifies the conditions under 
which a line prints on reports, and it is included in calculations. Codes include the following: S Stock item   J Job cost   N Nonstock item   F Freight  
T Text information   M Miscellaneous charges and credits   W Work order

cInventoryFlagIVIcharOPTNONE

A code that identifies the type of interface to the Inventory Management system. Valid values are:    Y The dollar or unit value of any activity 
containing this line type will be reflected in inventory. The system also edits the item that you enter to ensure that it is a valid item. Y is the 
default.    A The system recognizes the number that you enter as a G/L account number. The system uses this code in purchasing only.    B The 
system performs edits when using format 4 in purchase order entry.        The system retrieves price data from the inventory tables, but does not 
update the quantity on the purchase order. This code is valid only when you have set the G/L Interface field to Y (yes). Budget checking is 
fully functional when you use this interface code.    D The item in this line is an inventory item that will not affect availability or quantities.    N The 
item is not an inventory item. To verify whether the item exists in the Item Master file, use Inventory Interface N in conjunction with the flag, Edit 
the Item Master for Non-Stock Items.

cPotencyControlOT1YcharOPTNONE

A code that indicates whether you control the item by potency.

mnStandardPotencySTDPMATH_NUMERICOPTNONE

The percentage of active ingredients normally found in an item.

Related Functions

B3000220 Calculate Machine Or Labor Hours
B3000330 Convert Time Basis Code to Quantity
B4000260 Line Type - Activity Rules
B4000520 Get Item UoM Conversion Factor

Related Tables

F3002 Bill of Material Master File
F3111 Work Order Parts List
F4101 Item Master
F4102 Item Branch File