This function will perform Substitute processing functionality. It will read through the F3002
substitute records based on input values for the component. After calculating the qty ordered, the record
will then be written to the substitute cache. This function will process all substitutes for one
component at a time.
PROGRAM OUTLINE
1.Initialize Variables
Processing Complete Flag = '0'
Sub Component Number = 0
Continue F3002 Fetch Flag = 1
WO Qty Converted = Input Qty on WO
Full Qty Picked = 0
If the input Partials Allowed Flag = blank
Input Partials Allowed Flag = Y
End If
Open Qty = Input Component Qty Ordered
Comp % Short = Input Qty Needed / Input Component Qty Ordered
Substitute Component Number > 0
While the fetch is successful and Processing Complete Flag does not = '1'
If the fetched record is a substitute
AND the Input As of Date <= Effective Thru Date
Work Scrap = 0
Work Operation Scrap = 0
Standard Potency, Stocking Type and Commitment Method for the item.
4.3.1.1 Initialize the Work Variables
Comp To Sub UOM Conversion = 1
Sub To Comp UOM Conversion = 1
OR the Sub's UOM is not the same as the Primary UOM
AND from Sub to Primary
Sub to Comp UOM Conversion = Returned Conversion From to To Sub
to Primary UOM Conversion = Returned Conv from to Primary
End If
UOM Changed Flag = '0'
End If
4.3.2 Determine Potency
If no errors
End If
4.3.3 Get Qty Available for the entire Substitute (all lots and locations)
Call B4101220 - Calculate Qty Available
the F3002 > 0
If substitute's Fixed or Variable flag = 'V'
If the substitute's Fixed or Variable flag = '%'
AND Batch Qty = 0
Sub Qty for WO = Input Qty on WO * F3002 Qty
Else
Sub Qty for WO = F3002 Qty
End If
End If
4.3.4.2 Add in the % Scrap and the Operation Scrap % to the total qty
If the substitute's Fixed or Variable flag does not = 'F'
Sub Qty for WO = Sub Qty for WO + Work Scrap
4.3.4.3 Calculate Substitute Quantity Ordered using Partials
If the Sub Partial Flag = 'Y' And the Potency Flag does not = '1'
the Substitute's Qty for the WO
If the substitute's Fixed or Variable flag = 'F'
4.3.4.3.2.1 Load all substitutes for interactive. Stop processing only
for blind mode
If Input Auto Mode does not equal Interactive
4.3.4.3.2.2 Qty has been filled. Set Qty needed to 0
Qty Open = 0
Comp % Short = 0
Sub % Completed = Sub Qty Ordered / Work Qty Needed
Qty Open = Input Qty Needed * Sub % Completed
Comp % Short = Qty Open/Input Comp Qty Ordered
Add record to Substitute Cache - Call B3101500
the WO qty
Work Qty Needed = Sub Qty for WO
If the Qty Avail in Comp UOM >= Work Qty Needed
for blind mode
If Input Auto Mode does not equal Interactive
Qty Ordered to 0 but add the record to the cache
If the Qty Open = 0
4.3.4.4.2.3 Qty has been filled, set Qty needed to 0
Qty Open = 0
Comp % Short = 0
Full Qty Picked Flag = 1
End If
Saved Primary UOM = Substitute Primary UOM
5.Set Return Values - Number of Cache Records Added, Qty Open
If the Input Partial Flag = 'N' OR Full Qty Picked Flag = 1
If the Qty Open > 0
use any of the substitutes. Clear the cache and set number of substitutes to 0
Call B3101500 to clear all records
component. NOTE: Phas already removed the qty needed from the qty ordered, so add it back in to
the return qty needed
Return Qty Needed = Qty Open - Input Comp Qty Ordered + Comp Qty Needed
Call B3101500 to retrieve number of cache records
Else
D3101490A - Get Substitute Item
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szJobNumber | JOB | char | REQ | INPUT |
Job Number in string format to the original Parts List Cache^ | ||||
cCoByProducts | COBY | char | REQ | INPUT |
Component CoProducts Flag - F3002 Key Field^ | ||||
szBranchPlant | MMCU | char | REQ | INPUT |
Component Parent Branch Plant - F3002 Key
NOTE: Most likely this field will be populated with the WO Header Branch/Plant. In the case
| ||||
mnParentItemNumber | KIT | MATH_NUMERIC | REQ | INPUT |
Component Parent Item number - F3002 Key
NOTE: Most likely this field will be populated with the WO Header Item Number. In the case
| ||||
mnBatchQuantity | BQTY | MATH_NUMERIC | REQ | INPUT |
Component Parent Batch Quantity - F3002 Key
NOTE: Most likely this field will be populated with the WO Header Qty Ordered or 0 if a zero
| ||||
mnOperationSequence | OPSQ | MATH_NUMERIC | REQ | INPUT |
Component's Operation Sequence Number - F3002 Key Field^ | ||||
szTypeOfBill | TBM | char | REQ | INPUT |
Component Bill Type - F3002 Key field^ | ||||
jdAsOfDate | STRT | JDEDATE | REQ | INPUT |
Component As Of Date - used in effective date checking
NOTE: This field is generally the component's start date. Except in the case where
| ||||
mnCompQuantityNeeded | UORG | MATH_NUMERIC | REQ | BOTH |
Component Qty Backordered NOTE: This qty will be re-calculated in the function and returned. ^ | ||||
mnQuantityOnWorkorder | QOWO | MATH_NUMERIC | REQ | INPUT |
F4801 Work Order Header Qty Ordered^ | ||||
nNumberCacheItems | INT01 | integer | OPT | OUTPUT |
Number of cache records added to the substitutes' cache^ | ||||
cAutoMode | EV01 | char | REQ | INPUT |
Processing Option - Blind or Interactive ^ | ||||
szComponentUOM | UOM | char | REQ | INPUT |
Component's UOM^ | ||||
cPartialsAllowedYN | PRTA | char | REQ | INPUT |
F3002 Partials Allowed Flag for the component.^ | ||||
mnCompQtyOrdered | UORG | MATH_NUMERIC | REQ | BOTH |
Component's Qty Ordered NOTE: This qty will be re-calculated in the function and returned.^ | ||||
szWorkOrderUOM | UOM | char | OPT | INPUT |
F4801 Work Order Header UOM.^ | ||||
mnComponentLineNumber | CPNB | MATH_NUMERIC | REQ | INPUT |
A number that specifies how the system displays the sequence of components on a single-level bill of material. This number initially
| ||||
szOrderType | DCTO | char | OPT | NONE |
A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has
| ||||
szLotGroup | LOTGRP | char | OPT | NONE |
Lot Group is the name of a user defined list of allowed non-blank lot status codes. Entry of a Lot Group name in the Processing Option will
|
None |
None |