1.Functional Description
1.1Purpose
This function gets useability where used.
1.2Setup Notes and Prerequisites
Convert Requested Qty to primary UOM prior to calling this business function.
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.4 Processing
WorkFields
WK CurrentLowLevelCode
WK NextLowLevelCode
WK CurrentBranch
WK CurrentItem
WK CurrentType
WK CurrentBatchQty
WK CurrentUOM
WK Select
WK RejectedForGrade
WK RejectedForPotency
WK ParentStockingType
WK PurchasedManufactured
WK ProcessItem
WK Fixed Qty
WK VariableQty
WK RequiredQtyPrimary
WK ScrapQty
WK YieldQty
WK PrevLevelVariableQty
WK PrevLevelFixedQty
1.0. Determine the low level code of the component requested.
RequestedComponent. Return the WK CurrentLowLevelCode.
2.0. Set Key fields to retrieve where used records from the Bill of Material Table (F3002).
WK CurrentType = DS RequestedType.
WK CurrentBatchQTy = 0
WK CurrentBatchUOM = blank
3.0. Set WK RejectedForGrade = '0'.
Set WK PrevLevelVariableQty = '0'
Set WK PrevLevelFixedQty = '0'.
Set WK NextLowLevelCode = 0.
4.0. Call Internal Function to Retrieve records from Bill of Material Table based on requested item.
Internal Function - RetrieveWhereUsed
5.0. Dowhile WK NextLowLevelCode is not > 0.
5.2. Wk NextLowLevel = WK NextLowLevel - 1.
fetch fails BF B3001680 Cache, ProcessPartUseability .
5.3.2. Update cache record that was just fetched. Assign Cache ImplosionComplete = '1'.
5.3.3. WK CurrentBranch = Cache ParentBranch.
5.3.5. WK CurrentType = CacheParentType
5.3.6. WK CurrentBatchQty = CacheParentBatchQty
5.3.7. WK CurrentBatchUOM = CacheParentUOM
5.3.6. WK PrevLevelFixedQty = Cache FixedQty
Internal Functions
RetrieveLowLevelCode
1.Retrieve the low level code from the Item Branch Table using the Item (ITM) and Branch (MCU).
Return Low Level Code (LLX) and Stocking Type (STKT).
RetrieveWhereUsedRecords
1.0. Retrieve Records from Bill of Material Table until fetch fails.
Index:
Where: CMCU = WK CurrentBranch
ITM = WK CurrentItem
QNTY, FORQ, SCRP, STPP, UOM.
1.1. Set WK Select = '1'.
Set WK ProcessItem = '0'.
Set WK FixedQty = 0
Set WK VariableQty = 0
1.2. Validate that record retrieved is not a Co-Product, By-Product, or Intermediate Item.
If F3002 COBY is equal to 'C', 'B', or 'I', set WK Select = '0'.
1..3. If DS AsOfDate is not equal to zero, validate date effectivity.
Thru, set WK Select = '0'.
ThruGrade(THGD), set WK Select = '0' and set WK RejectedforGrade = '1'.
potency.
ThruPotency (THRP), set WK Select = '0', and set WK RejectedforPotency = '1'.
1.7. If WK Select is equal to '1', retrieve values to store in Cache.
1.7.2. Cache Component = F3002 Item Number (ITM)
1.7.3. Cache ComponentBranch = F3002 Component Branch (CMCU)
1.7.4. Cache ParentItem = F3002 ParentItem (KIT)
1.7.5. Cache ParentBranch = F3002 ParentBranch (MMCU)
1.7.6. Cache ParentBatchQty = F3002 BatchQty (BQTY)
1.7.7. Cache ParentUOM = F3002 UOM
1.7.8. Cache ParentType = F3002 TypeofBill (TBM)
1.7.9. Cache CMP(Complete Implosion) = '0'
1.7.10. Retrieve Parent Low Level Code. Call Internal Function RetrieveLowLevelCode usine
F3002 Parent Item (KIT) and F3002 Parent Branch (MMCU). Return Cache ParentLowLevelCode and WK
ParentStockingType.
1.7.11. Determine if Manufactured or Purchased and if the item is a Process.
Use BF GetUDC to retrieve the 2nd description and Special Handling Code.
Cache PurchasedManufactured = first character of 2nd description from GetUDC
Cache ProcessItem = special handling code from GetUDC.
1.7.12. Cache ComponentBatchQty = WK CurrentBatchQty
Cache ComponentType = WK CurrentType
top-level (i.e. perform a where-used check against F3002). If the parent is at the
top-level, change the low level code in the cache data structure to 1.
ParentItemNumber
ParentBranch
ParentBatchQty
ParentType
ComponentLowLevelCode
Component
ComponentBranch
ComponentBatchQty
ComponentType
F3002 Quantity Required (QNTY)
F3002 Batch Quantity (BQTY)
F3002 Scrap Percent (SCRP)
F3002 Yield Percent (STPP)
F3002 FixedorVariable (FORQ)
WK PrevLevelFixedQty
WK PrevLevelVariableQty
the existing quantities stored. BF B3001680 Cache, ProcessPartUseability
= WK VariableQty.
(i.e. perform a where-used check against F3002). If the parent is at the top-level,
change the low level code in the cache data structure to 1.
Cache VariableQtyRequired.
17.15.3. On add or update, increment the Number of Records selected parameter to be
passed back to calling program.
ParentLowLevelCode.
CalculateQuantities
1.0. Set WK FixedQty = 0. Set WK VariableQty = 0.
1.1. Retrieve the primary UOM for the Component Item from the Item Master Table (F4101) using the
Component Item Number.
1.2. Retrieve the OT1Y and Standard Potency (STDP) from the Item Branch Table (F4102) using the
Component Branch and Component Item.
1.3. If F3002 FixedOrVariable is equal to '%', divide the F3002 Quantity Required by 100 before
converting to primary UOM.
1.4. Convert Quantity Required to Primary UOM. OT1Y and STDP are parameters passed in the Unit of
measure conversion program. WK RequiredQtyPrimary
1.5. Set WK ScrapQty = 0. Set WK YieldQty = 0.
1.6. If F3002 ScrapPercent is not equal to zero, WK ScrapQty = WK RequiredQtyPrimary * (F3002
ScrapPercent / 100).
1.7. If F3002 Yield Percent is not equal to zero, WK YieldQty = WK RequiredQtyPrimary * (F3002
YieldPercent / 100).
1.8. WK RequiredQtyPrimary = WK RequiredQtyPrimary + WK ScrapQty + WK YieldQty.
1.9. If F3002 FixedOrVariable = 'F' OR (F3002 FixedoRVariable = '%' and F3002 BatchQty not = 0)
WK VariableQty = WK PrevLevelVariableQty.
Else
if WK PrevLevelVariableQty not Equal to 0
D3001690 - Useability - Get Where Used
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szRequestedBranch | CMCU | char | NONE | NONE |
A secondary or lower-level business unit. The system uses the value that you enter to indicate that a branch or plant contains several
| ||||
mnRequestedComponent | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
mnRequestedQtyPrimary | 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
| ||||
jdAsOfDate | ASDE1 | JDEDATE | NONE | NONE |
The date used for effectivity checking. Enter a specific date to display documents (orders, bills of material, routings, as applicable) that are
| ||||
szLotGrade | LOTG | char | NONE | NONE |
A code that indicates the grade of a lot. The grade is used to indicate the quality of the lot. Examples include the following:
A1 Premium
| ||||
szRequestedType | 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.
| ||||
mnLotPotency | LOTP | MATH_NUMERIC | NONE | NONE |
A code that indicates the potency of the lot expressed as a percentage of active or useful material (for example, the percentage of alcohol
| ||||
mnJobnumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. |
B3001680 Cache - Process Part Useability | ||||
B4000520 Get Item UoM Conversion Factor | ||||
X0005 Get User Defined Codes |
F0005 User Defined Codes | ||||
F3002 Bill of Material Master File | ||||
F4101 Item Master | ||||
F4102 Item Branch File |