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 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
 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, 
 If WK AccumVariableQty = 0
 assign DS PartUseability = 1
 else
 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) 
 DS PartUseability = BatchQty
 end
 end
 end
^
D3001710 - Useability - Calculate Part Useability
| Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| mnRequestedQtyPrim | RQTE1 | MATH_NUMERIC | NONE | NONE | 
The number of parent items that you want to process. The system calculates lower level values in quantity per the number of parent items 
  | ||||
| szPrevParentBranch | MMCU | char | NONE | NONE | 
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 
  | ||||
| mnPrevParentItem | KIT | MATH_NUMERIC | NONE | NONE | 
The system provides for three separate item numbers.
   1.   Item Number (short) - An eight-digit, computer assigned, completely 
  | ||||
| mnPrevBatchQty | BQTY | MATH_NUMERIC | NONE | NONE | 
The quantity of finished units that you expect this bill of material or routing to produce. You can specify varying quantities of components 
  | ||||
| szPrevTypeOfBill | TBM | char | NONE | NONE | 
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. 
  | ||||
| szParentBranch | MMCU | char | NONE | NONE | 
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 
  | ||||
| mnParentItem | KIT | MATH_NUMERIC | NONE | NONE | 
The system provides for three separate item numbers.
   1.   Item Number (short) - An eight-digit, computer assigned, completely 
  | ||||
| mnBatchQty | BQTY | MATH_NUMERIC | NONE | NONE | 
The quantity of finished units that you expect this bill of material or routing to produce. You can specify varying quantities of components 
  | ||||
| szBatchQtyUOM | UOM | char | NONE | NONE | 
A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).  | ||||
| szTypeOfBill | TBM | char | NONE | NONE | 
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. 
  | ||||
| mnPartUseability | QNTY | MATH_NUMERIC | NONE | NONE | 
The number of units that the system applies to the transaction.  | ||||
| szPartUseabilityUOM | UM | char | NONE | NONE | 
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, 
  | ||||
| szErrorMessageID | DTAI | char | NONE | NONE | 
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 
  | ||||
| cSupressErrorMessages | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| cEndOfParentItems | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| nNumberOfBatches | INT01 | integer | NONE | NONE | 
Number of Days in Future to Query for Responses Due.  | ||||
| cRecordsFound | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| mnJobnumber | JOBS | MATH_NUMERIC | NONE | NONE | 
The job number (work station ID) which executed the particular job.  | ||||
| B3001680 Cache - Process Part Useability | 
| None |