UseabilityCalculatePartUseabilit

Useability - Caclulate Part Useablility

Major Business Rule

Object Name: B3001710

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
The purpose of this business function is to calculate the amont of the top level item which can be 
built.


1.2Setup Notes and Prerequisites

• B3001690 - loads bill of material records  for calculating the part useability into cache.
• B3001680 - is the standard business function for processing the part useability cache.
• Once the records have been loaded into the part useability cache, this business function will read 
through the records where Parent Low Level Code is equal to '1'.  These records will be consolidated by 

Parent Branch, Parent Item, Parent Type, and Parent Batch Qty.  The Fixed Qty required and Variable 

Qty required will be accumulated.  After consolidation of the records, the part useability will be 

calculated.

• The calling application/function must pass a Job Number (JOBS) which uniquely identifies a cache 
being used for this inquiry session;  this Job Number is retrieved by the Component Usability application 

(P30212) from the Next Numbers table (F0010 - System 30, index 1).


1.3Special Logic


2.Technical Specifications


2.4Processing 

WK AccumVariableQty

WK AccumFixedQty

WK RemainingQty

WK NumberofBatches


1.0. If PrevParent Item is equal to blank, beginning fetching first record in the PartUseability 

Cache where LLX is equal to '1'.  If PrevParentItem is not equal to blank, begin reading where using 

previous values.  Read next set of records in Part Useability Cache where Parent Low Level Code = 1 and 

Parent Item, ParentBranch, ParentBatchQty, and ParentType are equal.  BF B3001680 Cache, 

ProcessPartUseability

       When there are no more records in cache where LLX = '1', set DS EndofParentItems = '1'.


2.0. If current = previous, Accumulate the VariableQtyRequired and FixedQtyRequired.


DS Parent Item = Cache Parent Item
DS Parent Branch = Cache Parent Branch

DS Type Of Bill= Cache Type Of Bill

DS Batch Qty = Cache Batch Qty

DS Batch Qty UOM Cache Parent Batch UOM



3.0. If current not = previous, 

Internal Function:  Calculate PartUseability

Set DS Prev ParentItem = Cache ParentItem
DS PrevParentBranch = Cache ParentBranch

DS PrevTypeofBill = Cache TypeOfBill

DS PrevBatchQty = Cache  BatchQty

DS Number Of Batch = WK Number Of Batch



CalculatePartUseability


1.0. If Cache Parent Batch Qty is equal to 0, 

WK RemainingQty = DS RequestedQtyPrim  - WK AccumFixedQty.
 If WK RemainingQty < 0 

assign DS PartUseability = 0.
Else

If WK AccumVariableQty = 0

assign DS PartUseability = 1

else

DS PartUseability = WK RemainingQty / WK AccumVariableQty (loose decimal)
end

end



2.0.  If Batch Qty is not equal to 0.

WK Remaining Qty = DS RequestedQtyPrim - WK AccumFixedQty

If WK RemainingQty < 0

assign DS PartUseability = 0

Else

If WK AccumVariableQty = 0

assign DS PartUseability = BatchQty

else

WK Number of Batches = ((WK RemainingQty / WK AccumVariableQty) 

/ BatchQty) 
If WK Number of Batches is greater than or equal to 1

DS PartUseability = BatchQty

end

end

end

^

Data Structure

D3001710 - Useability - Calculate Part Useability

Parameter NameData ItemData TypeReq/OptI/O/Both
mnRequestedQtyPrimRQTE1MATH_NUMERICNONENONE

The number of parent items that you want to process. The system calculates lower level values in quantity per the number of parent items 
requested. For instance, if it takes 3 components per a parent item, then with a requested quantity of 10, the system would plan and cost for 30 
components.

szPrevParentBranchMMCUcharNONENONE

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.

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

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

szPrevTypeOfBillTBMcharNONENONE

A user defined code (40/TB) that designates the type of bill of material. You can define different types of bills of material for different uses. 
For example:    M     Standard manufacturing bill    RWK   Rework bill    SPR   Spare parts bill  The system enters bill type M in the work order 
header when you create a work order, unless you specify another bill type. The system reads the bill type code on the work order header to 
know which bill of material to use to create the work order parts list. MRP uses the bill type code to identify the bill of material to use when it 
attaches MRP messages. Batch bills of material must be type M for shop floor management, product costing, and MRP processing.

szParentBranchMMCUcharNONENONE

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.

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.

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

szBatchQtyUOMUOMcharNONENONE

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

szTypeOfBillTBMcharNONENONE

A user defined code (40/TB) that designates the type of bill of material. You can define different types of bills of material for different uses. 
For example:    M     Standard manufacturing bill    RWK   Rework bill    SPR   Spare parts bill  The system enters bill type M in the work order 
header when you create a work order, unless you specify another bill type. The system reads the bill type code on the work order header to 
know which bill of material to use to create the work order parts list. MRP uses the bill type code to identify the bill of material to use when it 
attaches MRP messages. Batch bills of material must be type M for shop floor management, product costing, and MRP processing.

mnPartUseabilityQNTYMATH_NUMERICNONENONE

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

szPartUseabilityUOMUMcharNONENONE

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.

szErrorMessageIDDTAIcharNONENONE

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.

cSupressErrorMessagesEV01charNONENONE

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

cEndOfParentItemsEV01charNONENONE

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

nNumberOfBatchesINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

cRecordsFoundEV01charNONENONE

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

mnJobnumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

Related Functions

B3001680 Cache - Process Part Useability

Related Tables

None