1.Functional Description
1.1Purpose
Determine all of the transactions in the next level of lot tracking.  These transaction will be 
stored in a link list for each level.  Another link list, TrackingLinkList, will keep track the number of 
level link lists that have been built.
1.2Setup Notes and Prerequisites
 Required Work Fields
 EV01 - RecordsFound
 EV01 - RecordsRetrieved
 INT01 - Level (Integer)
 INDL - Level
 MODE - ModeofProcessing'1' = Single Level, '2'= ..., '3'=Multi-level, '4'=Multi-Level 
Indented
 EV01 - LotTracking '1' = Lot Tracking, '0' = Lot Tracing
 M = Manufacturing Completion
 B = Bottom
 C = Top
1.3Special Logic
Required ER
FC Level = 0
FC EndofTracking = '0'
FC RecordsFound = '1'
FC Level (Integer) = '0'
If FC Mode is equal to '1'
 BF F4111GetNextLevelTracking
    FC RecordsRetrieved = '1'
    While FC RecordsFound = '1' and FC RecordsRetrieved = '1'
        BF F4111GetNextRowTracking
        If FC RecordsRetrieved = '1'
            WriteCustomGridLine
        End
    EndWhile
Else
    Do While FC EndofTracking = '0'
        Do While FC RecordsFound = '1'
                BF GetNextRecordTracking
                If FC RecordRetrieved = '1'
                    Write Custom Grid Line
                end
        FC RecordRetrieved = '0'
        Do While FC RecordRetrieved = '0' and FC Level > 0
            BF GetNextRecordTracking
            If FC RecordRetrieved = '1'
                Write Custom Grid Line
            else
        Endwhile
        If FC Level <= 0
            FC EndofTracking = '1'
        else
            FC RecordsFound = '1'
        end
    EndWhile
End
2.Technical Specifications
2.4Processing 
Work File
LEVLLevel
LOTNLot Number
MCUBranch
ITMItem Number
CRDJCreate Date
TDAYTime
PLOTParent Lot
MMCUParent Branch
KITParent Item
DOCDocument Number
AN8Address Number
TREFTransaction Reference
TREXTransaction Explanation
DCTTransaction Type
FRTOFrom/To
TRQTTransaction Quantity
EV01Transaction Classification
EV02Lot Status Code
IDUnique Key ID
EV03IsIssueTransaction
EV04IsCompeletionTransaction
EV05MultipleRecords
LOCNFrom Location
EV06To Location
Index:  LEVL, LOTN, MCU, ITM, CRDJ, TDAY
Index:  LEVL, PLOT, MMCU, KIT, CRDJ, TDAY
Index:  Unique Key ID
Index:  LEVL, LOTN, MCU, ITM, PLOT, MMCU, KIT
0.0.  Initialize DS RecordsFound = '0', WK Level = DS Level +1.
Level.
Prev Trans TrackTraceClassification
Prev Trans Parent Lot
Prev Trans Parent Item
Prev Trans Parent Branch
Prev Trans Item Number
Prev Trans Lot Number
Prev Trans Branch
Prev Trans Reference
Prev Trans Document
Prev Trans Doc Type
Prev Is WO Issue 
Prev Is WO Completion 
3.0.   If the Previous Transaction was the final level, tracking will only continue if the 
transaction has a parent lot, the transaction is a WO Completion, or the transaction is a WO issue.
 If the PrevTransTrackTraceClassification = 'C', PrevTransParentLot is equal to blank, and 
PrevIsWOCompletion = '0' , and PrevIsWOIssue = '0', exit program.
4.0.  If DS LastLevel > DS Level, 
 Add 1 to DS Level 
 If records at this level exist, assign DS RecordsFound = '1' 
 exit.
4.0  Building the next Level.
(If prev trans is a WO Issue, Search for WO Completion Transactions)
FRTO not = 'T'.
next record.
found in the Lot Track & Trace Inclusion rules UDC Table, read next record.
4.1.2.2.  Assign TrackTraceClassification = 1st char of the F005 Description (40 DC).
4.1.2.3.  If TrackTraceClassification = 'I', read next record.
4.1.2.4.  If the PrevTransParentLot is not equal to blank and PrevTransParentLot (PLOT) is 
not equal to F4111 Lot Number (LOTN), read next record.
4.1.2.5.  If the PrevTransDocumentNumber is not equal to F4111 DocumentNumber, read next 
record.
Time, read next record.
4.1.2.7. IsCurrTransWOCompletion
'0'.
(normal next level)
not=blanks) or (DS Level not= '1' and PrevIsWOCompletion = '1'), search for next level by Lot 
Number, Item Number, and Branch.
whereLOTN=DS Lot Number
 ITM= DS Item Number
 MCU=DS Branch
 FRTO not='T'
  
 select from the Item Ledger Table (F4111)
 where LOTN =PrevTransParentLot
 ITM= PrevTransParentItem
 MCU=PrevTransParentBranch
 FRTOnot='T'
 If DS Level is not equal to '1' and PrevIsWOCompletion = '1', select from the Item 
Ledger 
whereLOTN=PrevTransLotNumber
 ITM=Prev TransItemNumber
 MCU=PrevTransBranch
 FRTOnot='T'
next record.
4.2.2.1.  Determine if the document is included in Lot Tracking.  If Document Type is not 
found in the Lot Track & Trace Inclusion rules UDC Table, read next record.
to blanks, read next record.
'0'.
'0'.
1.0.  If FRTO is equal to 'F', retrieve additional information from the 'T' transaction.
This transaction can be fetched by adding 1 to the unique ID of the 'From' Transaction.  The 
following should be retrieved from the 'To' transaction and placed in the work file:  LOCN, PLOT, KIT, 
and MMCU.
2.2.  If the transaction is an WO issue, match using LEVEL, DCT, LOTN, ITM, MCU, DOC.
2.3.  If the transaction is a 'From' transation, match using LEVEL, DCT, LOTN, ITM, MCU, LOCN, 
PLOT, KIT, MMCU.
2.4.  ELSE match using LEVEL, DCT, LOTN, ITM, MCU, PLOT, KIT, MMCU.
4.0.  If record exists, add TRQT to TRQT.  Assign MultipleRecords = '1'.
^
D3001590 - F4111GetNextLevelTracking
| Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| szLevel | INDL | char | NONE | NONE | 
A number indicating the level of a child in the relationship to its parent in a hierarchy.  | ||||
| mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE | 
The job number (work station ID) which executed the particular job.  | ||||
| cRecordsFound | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| cSuppressErrorMessages | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| 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 
  | ||||
| szComputerID | CTID | char | NONE | NONE | 
| szLastLevel | INDL | char | NONE | NONE | 
A number indicating the level of a child in the relationship to its parent in a hierarchy.  | ||||
| mnShortItemNumber | 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 
  | ||||
| szLot | LOT | char | NONE | NONE | 
A lot is a quantity of items that you want to group together because they have similar characteristics.  | ||||
| szBranch | MCU | char | NONE | NONE | 
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
  | ||||
| B3100710 Get Job Number | ||||
| B9800100 Get Audit Information | ||||
| X0005 Get User Defined Codes | 
| F0101 Address Book Master | ||||
| F30UI006 Lot Tracking Work File | ||||
| F4108 Lot Master | ||||
| F4111 Item Ledger File |