pre cutover push
This commit is contained in:
@ -389,394 +389,402 @@ RETURN
|
||||
Delete:
|
||||
* * * * * * *
|
||||
|
||||
Modules = ''
|
||||
Routines = ''
|
||||
RoutineParams = ''
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<8> = 'Begin COMM_NCR("Delete")'
|
||||
LogData<9> = @User4
|
||||
Logging_Services('AppendLog', RemNCRObjLog, LogData, @RM, @FM)
|
||||
|
||||
GoSub FQAVerify
|
||||
SAPBatchNo = Get_Property(@Window:'.SAP_BATCH_NO', 'TEXT')
|
||||
|
||||
If Not(Authorized) then Return 0
|
||||
If SAPBatchNo EQ '' then
|
||||
|
||||
NCRNo = Get_Property(@WINDOW:'.NCR_NO','DEFPROP')
|
||||
RejCnt = Get_Property(@WINDOW:'.TOT_REJ','TEXT')
|
||||
Modules = ''
|
||||
Routines = ''
|
||||
RoutineParams = ''
|
||||
|
||||
IF RejCnt > 5 THEN
|
||||
IF MemberOf( @USER4, 'ENGINEERING' ) OR (MemberOf(@USER4,'SUPERVISOR') OR (MemberOf( @USER4, 'LEAD'))) ELSE
|
||||
MsgInfo = ''
|
||||
MsgInfo<micon$> = '!'
|
||||
MsgInfo<mtext$> = 'There are more than 5 rejects, therefor an engineer must Remove NCR.'
|
||||
Void = msg( '', MsgInfo )
|
||||
RETURN
|
||||
END
|
||||
END ELSE
|
||||
IF MemberOf( @USER4, 'ENGINEERING' ) OR MemberOf( @USER4, 'SUPERVISOR' ) OR MemberOf( @USER4, 'LEAD' ) OR MemberOf( @USER4, 'FINAL_QA' ) ELSE
|
||||
MsgInfo = ''
|
||||
MsgInfo<micon$> = '!'
|
||||
MsgInfo<mtext$> = 'You must be a Supervisor, Lead or Engineer to Remove NCR.'
|
||||
Void = Msg( '', MsgInfo )
|
||||
RETURN
|
||||
END
|
||||
END
|
||||
GoSub FQAVerify
|
||||
|
||||
NCRNo = Get_Property(@WINDOW:'.NCR_NO','DEFPROP')
|
||||
LossStage = Get_Property(@WINDOW:'.LOSS_STAGE','DEFPROP')
|
||||
If Not(Authorized) then Return 0
|
||||
|
||||
IF Get_Property(@WINDOW:'.SLOT_REJECT','VISIBLE') THEN
|
||||
|
||||
* Non-EpiPro
|
||||
|
||||
WONo = Get_Property(@WINDOW:'.WO_NO','DEFPROP')
|
||||
WOMatCassNo = Get_Property(@WINDOW:'.WO_MAT_CASS_NO','DEFPROP')
|
||||
WOMatKey = WONo:'*':WOMatCassNo
|
||||
SlotList = Get_Property(@WINDOW:'.SLOT_REJECT','LIST')
|
||||
SlotCnt = COUNT(SlotList,@FM) + (SlotList NE '')
|
||||
|
||||
SlotNos = ''
|
||||
RejWaferIDs = ''
|
||||
PrevNCRNos = ''
|
||||
|
||||
FOR I = 1 TO SlotCnt
|
||||
IF SlotList<I,1> NE '' THEN
|
||||
SlotNos<1,-1> = SlotList<I,1>
|
||||
RejWaferIDs<1,-1> = SlotList<I,2>
|
||||
PrevNCRNos<1,-1> = SlotList<I,3>
|
||||
END
|
||||
NEXT I
|
||||
|
||||
LogData<2> = WONo
|
||||
LogData<3> = WOMatCassNo
|
||||
LogData<4> = NCRNo
|
||||
LogData<5> = SlotNos
|
||||
LogData<6> = RejWaferIDs
|
||||
LogData<7> = PrevNCRNos
|
||||
LogData<8> = 'COMM_NCR("Delete") - Line 430'
|
||||
Logging_Services('AppendLog', RemNCRObjLog, LogData, @RM, @FM)
|
||||
NCRNo = Get_Property(@WINDOW:'.NCR_NO','DEFPROP')
|
||||
RejCnt = Get_Property(@WINDOW:'.TOT_REJ','TEXT')
|
||||
|
||||
IF RejWaferIDs NE '' THEN
|
||||
|
||||
* Need to check if makeup wafers are in the cassette associated with
|
||||
* the NCR that the user is attempting to delete. If so, do not allow NCR to be removed/deleted.
|
||||
WOMatNCRs = Xlate('WO_MAT', WOMatKey, 'SLOT_NCR', 'X')
|
||||
WOMatMUWfrs = Xlate('WO_MAT', WOMatKey, 'SLOT_REP_WAFER_ID', 'X')
|
||||
|
||||
MUWfrFound = False$
|
||||
For each NCR in WOMatNCRs using @VM setting vPos
|
||||
If (NCR EQ NCRNo) and (WOMatMUWfrs<1, vPos> NE '') then
|
||||
MUWfrFound = True$
|
||||
end
|
||||
Until MUWfrFound EQ True$
|
||||
Next NCR
|
||||
|
||||
If MUWfrFound EQ True$ then
|
||||
ErrMsg('Makeup wafers must be returned before an NCR can be deleted.')
|
||||
// Stop the event handler from progressing to system event handler.
|
||||
return 0
|
||||
end else
|
||||
|
||||
LogData<8> = 'COMM_NCR("Delete") - Line 454'
|
||||
Logging_Services('AppendLog', RemNCRObjLog, LogData, @RM, @FM)
|
||||
|
||||
// Subroutine call moved to the end of this event after the user confirms the delete prompt.
|
||||
Modules = 'OBJ_WO_MAT' : @RM
|
||||
Routines = 'RemNCR' : @RM
|
||||
RoutineParams = WONo:@FM:WOMatCassNo:@FM:NCRNo:@FM:SlotNos:@FM:RejWaferIDs:@FM:PrevNCRNos:@RM
|
||||
|
||||
* obj_WO_Mat('RemNCR',WONo:@RM:WOMatCassNo:@RM:NCRNo:@RM:SlotNos:@RM:RejWaferIDs:@RM:PrevNCRNos)
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
IF RejCnt > 5 THEN
|
||||
IF MemberOf( @USER4, 'ENGINEERING' ) OR (MemberOf(@USER4,'SUPERVISOR') OR (MemberOf( @USER4, 'LEAD'))) ELSE
|
||||
MsgInfo = ''
|
||||
MsgInfo<micon$> = '!'
|
||||
MsgInfo<mtext$> = 'There are more than 5 rejects, therefor an engineer must Remove NCR.'
|
||||
Void = msg( '', MsgInfo )
|
||||
RETURN
|
||||
END
|
||||
END ELSE
|
||||
IF MemberOf( @USER4, 'ENGINEERING' ) OR MemberOf( @USER4, 'SUPERVISOR' ) OR MemberOf( @USER4, 'LEAD' ) OR MemberOf( @USER4, 'FINAL_QA' ) ELSE
|
||||
MsgInfo = ''
|
||||
MsgInfo<micon$> = '!'
|
||||
MsgInfo<mtext$> = 'You must be a Supervisor, Lead or Engineer to Remove NCR.'
|
||||
Void = Msg( '', MsgInfo )
|
||||
RETURN
|
||||
END
|
||||
END
|
||||
|
||||
NCRNo = Get_Property(@WINDOW:'.NCR_NO','DEFPROP')
|
||||
LossStage = Get_Property(@WINDOW:'.LOSS_STAGE','DEFPROP')
|
||||
|
||||
IF Get_Property(@WINDOW:'.SLOT_REJECT','VISIBLE') THEN
|
||||
|
||||
* Non-EpiPro
|
||||
|
||||
WONo = Get_Property(@WINDOW:'.WO_NO','DEFPROP')
|
||||
WOMatCassNo = Get_Property(@WINDOW:'.WO_MAT_CASS_NO','DEFPROP')
|
||||
WOMatKey = WONo:'*':WOMatCassNo
|
||||
SlotList = Get_Property(@WINDOW:'.SLOT_REJECT','LIST')
|
||||
SlotCnt = COUNT(SlotList,@FM) + (SlotList NE '')
|
||||
|
||||
SlotNos = ''
|
||||
RejWaferIDs = ''
|
||||
PrevNCRNos = ''
|
||||
|
||||
FOR I = 1 TO SlotCnt
|
||||
IF SlotList<I,1> NE '' THEN
|
||||
SlotNos<1,-1> = SlotList<I,1>
|
||||
RejWaferIDs<1,-1> = SlotList<I,2>
|
||||
PrevNCRNos<1,-1> = SlotList<I,3>
|
||||
END
|
||||
END
|
||||
END
|
||||
END
|
||||
NEXT I
|
||||
|
||||
LogData<2> = WONo
|
||||
LogData<3> = WOMatCassNo
|
||||
LogData<4> = NCRNo
|
||||
LogData<5> = SlotNos
|
||||
LogData<6> = RejWaferIDs
|
||||
LogData<7> = PrevNCRNos
|
||||
LogData<8> = 'COMM_NCR("Delete") - Line 430'
|
||||
Logging_Services('AppendLog', RemNCRObjLog, LogData, @RM, @FM)
|
||||
|
||||
|
||||
* * * GaN added 8/14/2016 JCH * * *
|
||||
|
||||
|
||||
ReactType = Get_Property(@WINDOW:'.REACTOR_TYPE','DEFPROP')
|
||||
|
||||
IF ReactType = 'GAN' THEN
|
||||
|
||||
* GaN
|
||||
|
||||
NCRRec = Database_Services('ReadDataRow', 'NCR', NCRNo)
|
||||
RejWfrIDs = NCRRec<NCR_WFR_ID$>
|
||||
For each WfrID in RejWfrIDs using @VM setting WfrIndex
|
||||
// Determine NCR type (i.e. WMI, RDS, or WMO)
|
||||
WOWfrRec = Database_Services('ReadDataRow', 'WO_WFR', WfrID)
|
||||
WmiNCRNo = WOWfrRec<WO_WFR_WMI_NCR_NO$>
|
||||
RdsNCRNo = WOWfrRec<WO_WFR_RDS_NCR_NO$>
|
||||
WmoNCRNo = WOWfrRec<WO_WFR_WMO_NCR_NO$>
|
||||
// Remove NCR_NO from the WO_WFR record
|
||||
Begin Case
|
||||
IF RejWaferIDs NE '' THEN
|
||||
|
||||
Case WmiNCRNo NE ''
|
||||
|
||||
// Remove WMI NCR Key
|
||||
WOWfrRec<WO_WFR_WMI_NCR_NO$> = ''
|
||||
// Update WO_MAT_WFR wafer IDs (i.e. GaN Inbound Material)
|
||||
WONo = Field(WfrID, '*', 1)
|
||||
CassNo = Field(WfrID, '*', 2)
|
||||
SlotIndex = Field(WfrID, '*', 3)
|
||||
WOMatWfrKey = WONo:'*':CassNo
|
||||
WOMatWfrRec = Database_Services('ReadDataRow', 'WO_MAT_WFR', WOMatWfrKey)
|
||||
AvailWfrs = WOMatWfrRec<WO_MAT_WFR_IN_WFR_ID$>
|
||||
ConsumedWfrs = WOMatWfrRec<WO_MAT_WFR_IN_PREV_WFR_ID$>
|
||||
AvailWfrs<0, SlotIndex> = WfrID
|
||||
ConsumedWfrs<0, SlotIndex> = ''
|
||||
WOMatWfrRec<WO_MAT_WFR_IN_WFR_ID$> = AvailWfrs
|
||||
WOMatWfrRec<WO_MAT_WFR_IN_PREV_WFR_ID$> = ConsumedWfrs
|
||||
Database_Services('WriteDataRow', 'WO_MAT_WFR', WOMatWfrKey, WOMatWfrRec, True$, False$, True$)
|
||||
|
||||
Case RdsNCRNo NE ''
|
||||
|
||||
// Remove RDS NCR Key
|
||||
WOWfrRec<WO_WFR_RDS_NCR_NO$> = ''
|
||||
// Remove Grade from the REACT_RUN (RDS) record
|
||||
! RDS NCRs no longer stored in the RDS for GaN
|
||||
RDSNo = Xlate('WO_WFR', WfrID, 'RDS_NO', 'X')
|
||||
If RDSNo NE '' then
|
||||
ReactRunRec = Database_Services('ReadDataRow', 'REACT_RUN', RDSNo)
|
||||
InWfrIDs = ReactRunRec<REACT_RUN_IN_WFR_ID$>
|
||||
Locate WfrID in InWfrIDs using @VM setting vPos then
|
||||
ReactRunRec<REACT_RUN_CARR_WFR_GRADE$, vPos> = ''
|
||||
Database_Services('WriteDataRow', 'REACT_RUN', RDSNo, ReactRunRec, True$, False$, True$)
|
||||
end
|
||||
* Need to check if makeup wafers are in the cassette associated with
|
||||
* the NCR that the user is attempting to delete. If so, do not allow NCR to be removed/deleted.
|
||||
WOMatNCRs = Xlate('WO_MAT', WOMatKey, 'SLOT_NCR', 'X')
|
||||
WOMatMUWfrs = Xlate('WO_MAT', WOMatKey, 'SLOT_REP_WAFER_ID', 'X')
|
||||
|
||||
MUWfrFound = False$
|
||||
For each NCR in WOMatNCRs using @VM setting vPos
|
||||
If (NCR EQ NCRNo) and (WOMatMUWfrs<1, vPos> NE '') then
|
||||
MUWfrFound = True$
|
||||
end
|
||||
Until MUWfrFound EQ True$
|
||||
Next NCR
|
||||
|
||||
If MUWfrFound EQ True$ then
|
||||
ErrMsg('Makeup wafers must be returned before an NCR can be deleted.')
|
||||
// Stop the event handler from progressing to system event handler.
|
||||
return 0
|
||||
end else
|
||||
|
||||
LogData<8> = 'COMM_NCR("Delete") - Line 454'
|
||||
Logging_Services('AppendLog', RemNCRObjLog, LogData, @RM, @FM)
|
||||
|
||||
Case WmoNCRNo NE ''
|
||||
// Subroutine call moved to the end of this event after the user confirms the delete prompt.
|
||||
Modules = 'OBJ_WO_MAT' : @RM
|
||||
Routines = 'RemNCR' : @RM
|
||||
RoutineParams = WONo:@FM:WOMatCassNo:@FM:NCRNo:@FM:SlotNos:@FM:RejWaferIDs:@FM:PrevNCRNos:@RM
|
||||
|
||||
// WMO NCR Key
|
||||
WOWfrRec<WO_WFR_WMO_NCR_NO$> = ''
|
||||
// Update WO_MAT_WFR wafer IDs (i.e. GaN Inbound Outbound Wafers)
|
||||
WONo = Field(WfrID, '*', 1)
|
||||
CassNo = Field(WfrID, '*', 2)
|
||||
SlotIndex = Field(WfrID, '*', 3)
|
||||
WOMatWfrKey = WONo:'*':CassNo
|
||||
WOMatWfrRec = Database_Services('ReadDataRow', 'WO_MAT_WFR', WOMatWfrKey)
|
||||
OutWfrIDs = WOMatWfrRec<WO_MAT_WFR_OUT_WFR_ID$>
|
||||
PrevOutWfrIDs = WOMatWfrRec<WO_MAT_WFR_OUT_PREV_WFR_ID$>
|
||||
OutWfrIDs<0, SlotIndex> = ''
|
||||
PrevOutWfrIDs<0, SlotIndex> = WfrID
|
||||
WOMatWfrRec<WO_MAT_WFR_OUT_WFR_ID$> = OutWfrIDs
|
||||
WOMatWfrRec<WO_MAT_WFR_OUT_PREV_WFR_ID$> = PrevOutWfrIDs
|
||||
Database_Services('WriteDataRow', 'WO_MAT_WFR', WOMatWfrKey, WOMatWfrRec, True$, False$, True$)
|
||||
* obj_WO_Mat('RemNCR',WONo:@RM:WOMatCassNo:@RM:NCRNo:@RM:SlotNos:@RM:RejWaferIDs:@RM:PrevNCRNos)
|
||||
|
||||
End Case
|
||||
|
||||
Database_Services('WriteDataRow', 'WO_WFR', WfrID, WOWfrRec, True$, False$, True$)
|
||||
|
||||
Next WfrID
|
||||
|
||||
GaNProdVis = Get_Property('WO_PROD_GAN', 'VISIBLE')
|
||||
If GaNProdVis EQ True$ then Send_Event('WO_PROD_GAN', 'READ')
|
||||
|
||||
InboundMatVis = Get_Property('NDW_GAN_INBOUND_MATERIAL', 'VISIBLE')
|
||||
If InboundMatVis EQ True$ then Send_Event('NDW_GAN_INBOUND_MATERIAL', 'OMNIEVENT')
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg('Unable to Remove NCR from GaN RDS ':QUOTE(RDSNo):'.')
|
||||
END
|
||||
END
|
||||
|
||||
IF Get_Property(@WINDOW:'.CASS_NO','VISIBLE') THEN
|
||||
|
||||
* EpiPro
|
||||
CassList = Get_Property(@WINDOW:'.CASS_NO','LIST')
|
||||
InCassNos = ''
|
||||
InSlotNos = ''
|
||||
RDSNos = ''
|
||||
PocketNos = ''
|
||||
Zones = ''
|
||||
OutCassNos = ''
|
||||
OutSlotNos = ''
|
||||
PrevNCRs = ''
|
||||
MUWONos = ''
|
||||
MUSteps = ''
|
||||
MUCassIDs = ''
|
||||
MUSlots = ''
|
||||
|
||||
FOR I = 1 TO COUNT(CassList,@FM) + (CassList NE '')
|
||||
IF CassList<I,1> NE '' THEN
|
||||
InCassNos<1,-1> = CassList<I,COL$IN_CASS>
|
||||
InSlotNos<1,-1> = CassList<I,COL$IN_SLOT>
|
||||
RDSNos<1,-1> = CassList<I,COL$RDS>
|
||||
PocketNos<1,-1> = CassList<I,COL$POCKET>
|
||||
Zones<1,-1> = CassList<I,COL$ZONE>
|
||||
OutCassNos<1,-1> = CassList<I,COL$OUT_CASS>
|
||||
OutSlotNos<1,-1> = CassList<I,COL$OUT_SLOT>
|
||||
PrevNCRs<1,-1> = CassList<I,COL$PREV_NCR>
|
||||
MUWONos<1,-1> = CassList<I,COL$MU_WO_NO>
|
||||
MUSteps<1,-1> = CassList<I,COL$MU_STEP>
|
||||
MUCassIDs<1,-1> = CassList<I,COL$MU_CASS>
|
||||
MUSlots<1,-1> = CassList<I,COL$MU_SLOT>
|
||||
|
||||
|
||||
END
|
||||
NEXT I
|
||||
|
||||
IF InCassNos NE '' THEN
|
||||
|
||||
RDSNo = Get_Property(@WINDOW:'.RDS_ID','DEFPROP')
|
||||
|
||||
IF LossStage = 'PRE' THEN
|
||||
|
||||
WONo = Get_Property(@WINDOW:'.WO_NO','DEFPROP')
|
||||
WOStep = Get_Property(@WINDOW:'.WO_STEP','DEFPROP')
|
||||
EventDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
FOR N = 1 TO COUNT(InCassNos,@VM) + (InCassNos NE '')
|
||||
obj_WM_In('AddWafer',WONo:@RM:WOStep:@RM:InCassNos<1,N>:@RM:InSlotNos<1,N>)
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
End
|
||||
|
||||
* * * * Added 3/23/2016 JCH - wafer history * * * *
|
||||
|
||||
EventWfrID = WONo:'*':InCassNos<1,N>:'*':InSlotNos<1,N>
|
||||
|
||||
Parms = EventWfrID:@RM ;* WfrID
|
||||
Parms := 'NCR':@RM ;* Event to remove
|
||||
Parms := NCRNo ;* NCR No for locate
|
||||
|
||||
obj_WO_Wfr('RemEvent',Parms)
|
||||
|
||||
NEXT N
|
||||
END
|
||||
IF LossStage = 'POST' THEN
|
||||
|
||||
WONo = Get_Property(@WINDOW:'.WO_NO','DEFPROP')
|
||||
WOStep = Get_Property(@WINDOW:'.WO_STEP','DEFPROP')
|
||||
EventDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
IF OutCassNos<1,1> = '' THEN
|
||||
|
||||
* This is material rejected from the reactor during EpiPRO Unload (This should be dead************)
|
||||
|
||||
obj_RDS2('RemovePocketNCR',RDSNo:@RM:NCRNo)
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
|
||||
END ELSE
|
||||
|
||||
* This is material rejected from the WM_OUT box
|
||||
|
||||
WMOutKey = WONo:'*':WOStep:'*':OutCassNos<1,1>
|
||||
WMOutRec = XLATE('WM_OUT',WMOutKey,'','X')
|
||||
|
||||
osCnt = COUNT(OutSlotNos,@VM) + (OutSlotNos NE '')
|
||||
|
||||
FOR N = 1 TO osCnt
|
||||
OutSlotNo = OutSlotNos<1,N>
|
||||
IF WMOutRec<WM_OUT_RDS$,OutSlotNo> NE '' AND WMOutRec<WM_OUT_POCKET$,OutSlotNo> NE '' THEN
|
||||
* Make Up Wafers already in the box
|
||||
ErrorMsg = 'Makeup Wafers have already been placed in the cassette.':CRLF$:CRLF$
|
||||
ErrorMsg := 'This NCR cannot be canceled until they are removed.'
|
||||
|
||||
ErrMsg(ErrorMsg)
|
||||
|
||||
RETURN
|
||||
END
|
||||
NEXT N
|
||||
|
||||
|
||||
|
||||
FOR N = 1 TO COUNT(OutSlotNos,@VM) + (OutSlotNos NE '')
|
||||
|
||||
wmoParms = WONo:@RM
|
||||
wmoParms := WOStep:@RM
|
||||
wmoParms := OutCassNos<1,1>:@RM ;* These are all the same for this material
|
||||
wmoParms := OutSlotNos<1,N>:@RM
|
||||
wmoParms := RDSNos<1,N>:@RM
|
||||
wmoParms := PocketNos<1,N>:@RM
|
||||
wmoParms := Zones<1,N>:@RM
|
||||
wmoParms := InCassNos<1,N>:@RM
|
||||
wmoParms := InSlotNos<1,N>:@RM
|
||||
wmoParms := PrevNCRs<1,N>:@RM
|
||||
wmoParms := MUWONos<1,N>:@RM
|
||||
wmoParms := MUSteps<1,N>:@RM
|
||||
wmoParms := MUCassIDs<1,N>:@RM
|
||||
wmoParms := MUSlots<1,N>:@RM
|
||||
|
||||
// Add wafer data back to WM_OUT record
|
||||
Modules := 'obj_WM_Out' : @RM
|
||||
Routines := 'AddWafer' : @RM
|
||||
Swap @RM with @FM in wmoParms
|
||||
RoutineParams := wmoParms : @RM
|
||||
|
||||
* * * * Added 3/23/2016 JCH - wafer history * * * *
|
||||
// Remove NCR event from WO_WFR record
|
||||
EventWfrID = WONo:'*':InCassNos<1,N>:'*':InSlotNos<1,N>
|
||||
|
||||
Parms = EventWfrID:@RM ;* WfrID
|
||||
Parms := 'NCR':@RM ;* Event to remove
|
||||
Parms := NCRNo
|
||||
|
||||
Modules := 'obj_WO_Wfr' : @RM
|
||||
Routines := 'RemEvent' : @RM
|
||||
Swap @RM with @FM in Parms
|
||||
RoutineParams := Parms : @RM
|
||||
|
||||
// Remove NCR data from RDS record
|
||||
RDSNo = RDSNos<1, N>
|
||||
Modules := 'obj_RDS2' : @RM
|
||||
Routines := 'RemovePocketNCR' : @RM
|
||||
RoutineParams := RDSNo : @FM : NCRNo : @RM
|
||||
|
||||
NEXT N
|
||||
END
|
||||
END
|
||||
|
||||
END
|
||||
END ;* End of check for EpiPRO rejects
|
||||
|
||||
Forward_Event()
|
||||
EventCode = ''
|
||||
Get_EventStatus(EventCode)
|
||||
|
||||
If EventCode<0, 1> NE 'EV107' then
|
||||
// User pressed ok on delete prompt
|
||||
// Commit related delete events
|
||||
If Assigned(Modules) and Assigned(Routines) and Assigned(RoutineParams) then
|
||||
Swap @RM with '~' in Modules
|
||||
Swap @RM with '~' in Routines
|
||||
Swap @RM with '~' in RoutineParams
|
||||
For each Row in Modules using '~' setting Pos
|
||||
ServiceModule = Field(Modules, '~', Pos)
|
||||
Service = Field(Routines, '~', Pos)
|
||||
ServiceParams = Field(RoutineParams, '~', Pos)
|
||||
Swap @FM with @RM in ServiceParams
|
||||
If ( (ServiceModule NE '') and (Service NE '') and (ServiceParams NE '') ) then
|
||||
Convert @Lower.Case to @Upper.Case in ServiceModule
|
||||
Ans = Function(@ServiceModule(Service, ServiceParams))
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
end
|
||||
Next Row
|
||||
END
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
* * * GaN added 8/14/2016 JCH * * *
|
||||
|
||||
|
||||
ReactType = Get_Property(@WINDOW:'.REACTOR_TYPE','DEFPROP')
|
||||
|
||||
IF ReactType = 'GAN' THEN
|
||||
|
||||
* GaN
|
||||
|
||||
NCRRec = Database_Services('ReadDataRow', 'NCR', NCRNo)
|
||||
RejWfrIDs = NCRRec<NCR_WFR_ID$>
|
||||
For each WfrID in RejWfrIDs using @VM setting WfrIndex
|
||||
// Determine NCR type (i.e. WMI, RDS, or WMO)
|
||||
WOWfrRec = Database_Services('ReadDataRow', 'WO_WFR', WfrID)
|
||||
WmiNCRNo = WOWfrRec<WO_WFR_WMI_NCR_NO$>
|
||||
RdsNCRNo = WOWfrRec<WO_WFR_RDS_NCR_NO$>
|
||||
WmoNCRNo = WOWfrRec<WO_WFR_WMO_NCR_NO$>
|
||||
// Remove NCR_NO from the WO_WFR record
|
||||
Begin Case
|
||||
|
||||
Case WmiNCRNo NE ''
|
||||
|
||||
// Remove WMI NCR Key
|
||||
WOWfrRec<WO_WFR_WMI_NCR_NO$> = ''
|
||||
// Update WO_MAT_WFR wafer IDs (i.e. GaN Inbound Material)
|
||||
WONo = Field(WfrID, '*', 1)
|
||||
CassNo = Field(WfrID, '*', 2)
|
||||
SlotIndex = Field(WfrID, '*', 3)
|
||||
WOMatWfrKey = WONo:'*':CassNo
|
||||
WOMatWfrRec = Database_Services('ReadDataRow', 'WO_MAT_WFR', WOMatWfrKey)
|
||||
AvailWfrs = WOMatWfrRec<WO_MAT_WFR_IN_WFR_ID$>
|
||||
ConsumedWfrs = WOMatWfrRec<WO_MAT_WFR_IN_PREV_WFR_ID$>
|
||||
AvailWfrs<0, SlotIndex> = WfrID
|
||||
ConsumedWfrs<0, SlotIndex> = ''
|
||||
WOMatWfrRec<WO_MAT_WFR_IN_WFR_ID$> = AvailWfrs
|
||||
WOMatWfrRec<WO_MAT_WFR_IN_PREV_WFR_ID$> = ConsumedWfrs
|
||||
Database_Services('WriteDataRow', 'WO_MAT_WFR', WOMatWfrKey, WOMatWfrRec, True$, False$, True$)
|
||||
|
||||
Case RdsNCRNo NE ''
|
||||
|
||||
// Remove RDS NCR Key
|
||||
WOWfrRec<WO_WFR_RDS_NCR_NO$> = ''
|
||||
// Remove Grade from the REACT_RUN (RDS) record
|
||||
! RDS NCRs no longer stored in the RDS for GaN
|
||||
RDSNo = Xlate('WO_WFR', WfrID, 'RDS_NO', 'X')
|
||||
If RDSNo NE '' then
|
||||
ReactRunRec = Database_Services('ReadDataRow', 'REACT_RUN', RDSNo)
|
||||
InWfrIDs = ReactRunRec<REACT_RUN_IN_WFR_ID$>
|
||||
Locate WfrID in InWfrIDs using @VM setting vPos then
|
||||
ReactRunRec<REACT_RUN_CARR_WFR_GRADE$, vPos> = ''
|
||||
Database_Services('WriteDataRow', 'REACT_RUN', RDSNo, ReactRunRec, True$, False$, True$)
|
||||
end
|
||||
end
|
||||
|
||||
Case WmoNCRNo NE ''
|
||||
|
||||
// WMO NCR Key
|
||||
WOWfrRec<WO_WFR_WMO_NCR_NO$> = ''
|
||||
// Update WO_MAT_WFR wafer IDs (i.e. GaN Inbound Outbound Wafers)
|
||||
WONo = Field(WfrID, '*', 1)
|
||||
CassNo = Field(WfrID, '*', 2)
|
||||
SlotIndex = Field(WfrID, '*', 3)
|
||||
WOMatWfrKey = WONo:'*':CassNo
|
||||
WOMatWfrRec = Database_Services('ReadDataRow', 'WO_MAT_WFR', WOMatWfrKey)
|
||||
OutWfrIDs = WOMatWfrRec<WO_MAT_WFR_OUT_WFR_ID$>
|
||||
PrevOutWfrIDs = WOMatWfrRec<WO_MAT_WFR_OUT_PREV_WFR_ID$>
|
||||
OutWfrIDs<0, SlotIndex> = ''
|
||||
PrevOutWfrIDs<0, SlotIndex> = WfrID
|
||||
WOMatWfrRec<WO_MAT_WFR_OUT_WFR_ID$> = OutWfrIDs
|
||||
WOMatWfrRec<WO_MAT_WFR_OUT_PREV_WFR_ID$> = PrevOutWfrIDs
|
||||
Database_Services('WriteDataRow', 'WO_MAT_WFR', WOMatWfrKey, WOMatWfrRec, True$, False$, True$)
|
||||
|
||||
End Case
|
||||
|
||||
Database_Services('WriteDataRow', 'WO_WFR', WfrID, WOWfrRec, True$, False$, True$)
|
||||
|
||||
Next WfrID
|
||||
|
||||
GaNProdVis = Get_Property('WO_PROD_GAN', 'VISIBLE')
|
||||
If GaNProdVis EQ True$ then Send_Event('WO_PROD_GAN', 'READ')
|
||||
|
||||
InboundMatVis = Get_Property('NDW_GAN_INBOUND_MATERIAL', 'VISIBLE')
|
||||
If InboundMatVis EQ True$ then Send_Event('NDW_GAN_INBOUND_MATERIAL', 'OMNIEVENT')
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg('Unable to Remove NCR from GaN RDS ':QUOTE(RDSNo):'.')
|
||||
END
|
||||
END
|
||||
|
||||
IF Get_Property(@WINDOW:'.CASS_NO','VISIBLE') THEN
|
||||
|
||||
* EpiPro
|
||||
CassList = Get_Property(@WINDOW:'.CASS_NO','LIST')
|
||||
InCassNos = ''
|
||||
InSlotNos = ''
|
||||
RDSNos = ''
|
||||
PocketNos = ''
|
||||
Zones = ''
|
||||
OutCassNos = ''
|
||||
OutSlotNos = ''
|
||||
PrevNCRs = ''
|
||||
MUWONos = ''
|
||||
MUSteps = ''
|
||||
MUCassIDs = ''
|
||||
MUSlots = ''
|
||||
|
||||
FOR I = 1 TO COUNT(CassList,@FM) + (CassList NE '')
|
||||
IF CassList<I,1> NE '' THEN
|
||||
InCassNos<1,-1> = CassList<I,COL$IN_CASS>
|
||||
InSlotNos<1,-1> = CassList<I,COL$IN_SLOT>
|
||||
RDSNos<1,-1> = CassList<I,COL$RDS>
|
||||
PocketNos<1,-1> = CassList<I,COL$POCKET>
|
||||
Zones<1,-1> = CassList<I,COL$ZONE>
|
||||
OutCassNos<1,-1> = CassList<I,COL$OUT_CASS>
|
||||
OutSlotNos<1,-1> = CassList<I,COL$OUT_SLOT>
|
||||
PrevNCRs<1,-1> = CassList<I,COL$PREV_NCR>
|
||||
MUWONos<1,-1> = CassList<I,COL$MU_WO_NO>
|
||||
MUSteps<1,-1> = CassList<I,COL$MU_STEP>
|
||||
MUCassIDs<1,-1> = CassList<I,COL$MU_CASS>
|
||||
MUSlots<1,-1> = CassList<I,COL$MU_SLOT>
|
||||
|
||||
|
||||
END
|
||||
NEXT I
|
||||
|
||||
IF InCassNos NE '' THEN
|
||||
|
||||
RDSNo = Get_Property(@WINDOW:'.RDS_ID','DEFPROP')
|
||||
|
||||
IF LossStage = 'PRE' THEN
|
||||
|
||||
WONo = Get_Property(@WINDOW:'.WO_NO','DEFPROP')
|
||||
WOStep = Get_Property(@WINDOW:'.WO_STEP','DEFPROP')
|
||||
EventDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
FOR N = 1 TO COUNT(InCassNos,@VM) + (InCassNos NE '')
|
||||
obj_WM_In('AddWafer',WONo:@RM:WOStep:@RM:InCassNos<1,N>:@RM:InSlotNos<1,N>)
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
End
|
||||
|
||||
* * * * Added 3/23/2016 JCH - wafer history * * * *
|
||||
|
||||
EventWfrID = WONo:'*':InCassNos<1,N>:'*':InSlotNos<1,N>
|
||||
|
||||
Parms = EventWfrID:@RM ;* WfrID
|
||||
Parms := 'NCR':@RM ;* Event to remove
|
||||
Parms := NCRNo ;* NCR No for locate
|
||||
|
||||
obj_WO_Wfr('RemEvent',Parms)
|
||||
|
||||
NEXT N
|
||||
END
|
||||
IF LossStage = 'POST' THEN
|
||||
|
||||
WONo = Get_Property(@WINDOW:'.WO_NO','DEFPROP')
|
||||
WOStep = Get_Property(@WINDOW:'.WO_STEP','DEFPROP')
|
||||
EventDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
IF OutCassNos<1,1> = '' THEN
|
||||
|
||||
* This is material rejected from the reactor during EpiPRO Unload (This should be dead************)
|
||||
|
||||
obj_RDS2('RemovePocketNCR',RDSNo:@RM:NCRNo)
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
RETURN
|
||||
END
|
||||
|
||||
END ELSE
|
||||
|
||||
* This is material rejected from the WM_OUT box
|
||||
|
||||
WMOutKey = WONo:'*':WOStep:'*':OutCassNos<1,1>
|
||||
WMOutRec = XLATE('WM_OUT',WMOutKey,'','X')
|
||||
|
||||
osCnt = COUNT(OutSlotNos,@VM) + (OutSlotNos NE '')
|
||||
|
||||
FOR N = 1 TO osCnt
|
||||
OutSlotNo = OutSlotNos<1,N>
|
||||
IF WMOutRec<WM_OUT_RDS$,OutSlotNo> NE '' AND WMOutRec<WM_OUT_POCKET$,OutSlotNo> NE '' THEN
|
||||
* Make Up Wafers already in the box
|
||||
ErrorMsg = 'Makeup Wafers have already been placed in the cassette.':CRLF$:CRLF$
|
||||
ErrorMsg := 'This NCR cannot be canceled until they are removed.'
|
||||
|
||||
ErrMsg(ErrorMsg)
|
||||
|
||||
RETURN
|
||||
END
|
||||
NEXT N
|
||||
|
||||
|
||||
|
||||
FOR N = 1 TO COUNT(OutSlotNos,@VM) + (OutSlotNos NE '')
|
||||
|
||||
wmoParms = WONo:@RM
|
||||
wmoParms := WOStep:@RM
|
||||
wmoParms := OutCassNos<1,1>:@RM ;* These are all the same for this material
|
||||
wmoParms := OutSlotNos<1,N>:@RM
|
||||
wmoParms := RDSNos<1,N>:@RM
|
||||
wmoParms := PocketNos<1,N>:@RM
|
||||
wmoParms := Zones<1,N>:@RM
|
||||
wmoParms := InCassNos<1,N>:@RM
|
||||
wmoParms := InSlotNos<1,N>:@RM
|
||||
wmoParms := PrevNCRs<1,N>:@RM
|
||||
wmoParms := MUWONos<1,N>:@RM
|
||||
wmoParms := MUSteps<1,N>:@RM
|
||||
wmoParms := MUCassIDs<1,N>:@RM
|
||||
wmoParms := MUSlots<1,N>:@RM
|
||||
|
||||
// Add wafer data back to WM_OUT record
|
||||
Modules := 'obj_WM_Out' : @RM
|
||||
Routines := 'AddWafer' : @RM
|
||||
Swap @RM with @FM in wmoParms
|
||||
RoutineParams := wmoParms : @RM
|
||||
|
||||
* * * * Added 3/23/2016 JCH - wafer history * * * *
|
||||
// Remove NCR event from WO_WFR record
|
||||
EventWfrID = WONo:'*':InCassNos<1,N>:'*':InSlotNos<1,N>
|
||||
|
||||
Parms = EventWfrID:@RM ;* WfrID
|
||||
Parms := 'NCR':@RM ;* Event to remove
|
||||
Parms := NCRNo
|
||||
|
||||
Modules := 'obj_WO_Wfr' : @RM
|
||||
Routines := 'RemEvent' : @RM
|
||||
Swap @RM with @FM in Parms
|
||||
RoutineParams := Parms : @RM
|
||||
|
||||
// Remove NCR data from RDS record
|
||||
RDSNo = RDSNos<1, N>
|
||||
Modules := 'obj_RDS2' : @RM
|
||||
Routines := 'RemovePocketNCR' : @RM
|
||||
RoutineParams := RDSNo : @FM : NCRNo : @RM
|
||||
|
||||
NEXT N
|
||||
END
|
||||
END
|
||||
|
||||
END
|
||||
END ;* End of check for EpiPRO rejects
|
||||
|
||||
Forward_Event()
|
||||
EventCode = ''
|
||||
Get_EventStatus(EventCode)
|
||||
|
||||
If EventCode<0, 1> NE 'EV107' then
|
||||
// User pressed ok on delete prompt
|
||||
// Commit related delete events
|
||||
If Assigned(Modules) and Assigned(Routines) and Assigned(RoutineParams) then
|
||||
Swap @RM with '~' in Modules
|
||||
Swap @RM with '~' in Routines
|
||||
Swap @RM with '~' in RoutineParams
|
||||
For each Row in Modules using '~' setting Pos
|
||||
ServiceModule = Field(Modules, '~', Pos)
|
||||
Service = Field(Routines, '~', Pos)
|
||||
ServiceParams = Field(RoutineParams, '~', Pos)
|
||||
Swap @FM with @RM in ServiceParams
|
||||
If ( (ServiceModule NE '') and (Service NE '') and (ServiceParams NE '') ) then
|
||||
Convert @Lower.Case to @Upper.Case in ServiceModule
|
||||
Ans = Function(@ServiceModule(Service, ServiceParams))
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
end
|
||||
Next Row
|
||||
|
||||
end
|
||||
end
|
||||
obj_AppWindow('ReadOnly',@WINDOW:@RM:1) ;* Clear Read Only
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
end else
|
||||
ErrMsg('NCR cannot be deleted because an SAP batch number has been assigned. Contact FI for further assistance.')
|
||||
end
|
||||
obj_AppWindow('ReadOnly',@WINDOW:@RM:1) ;* Clear Read Only
|
||||
|
||||
GOSUB Refresh
|
||||
|
||||
Result = 0
|
||||
|
||||
LogData<8> = 'End COMM_NCR("Delete")'
|
||||
Logging_Services('AppendLog', RemNCRObjLog, LogData, @RM, @FM)
|
||||
|
||||
Result = 0
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@ -784,9 +792,15 @@ RETURN
|
||||
Page:
|
||||
* * * * * * *
|
||||
|
||||
obj_Appwindow('Page')
|
||||
|
||||
GOSUB Refresh
|
||||
Page = Parm1
|
||||
|
||||
IF Page = '' THEN
|
||||
Page = Get_Property(@WINDOW:'.TAB_MAIN','VALUE')
|
||||
END ELSE
|
||||
Set_Property(@WINDOW:'.TAB_MAIN','VALUE',Page)
|
||||
END
|
||||
|
||||
Set_Property(@WINDOW,'VPOSITION', Page)
|
||||
|
||||
RETURN
|
||||
|
||||
@ -1002,7 +1016,7 @@ IF INDEX(NcrKeys,@VM,1) THEN
|
||||
TypeOver<PDISPLAY$> = NcrKeys
|
||||
|
||||
NcrKeys = Popup(@WINDOW,TypeOver,'NCR_QUERY')
|
||||
|
||||
errCode = ''
|
||||
IF Get_Status(errCode) THEN DEBUG
|
||||
|
||||
Set_Property(@WINDOW,'QBFLIST',NcrKeys)
|
||||
@ -1518,7 +1532,7 @@ SlotNos = STR('1':@VM,taCnt)
|
||||
SlotNos[-1,1] = ''
|
||||
|
||||
TableArray<1> = SlotNos
|
||||
Set_Property( CtrName , 'DEFPROP' , TableArray)
|
||||
Set_Property( CtrlName , 'DEFPROP' , TableArray)
|
||||
|
||||
GOSUB CalcRejQty
|
||||
|
||||
@ -1537,19 +1551,23 @@ END ELSE
|
||||
RETURN
|
||||
END
|
||||
|
||||
SAPBatchNo = Get_Property(@Window:'.SAP_BATCH_NO', 'TEXT')
|
||||
|
||||
SlotNos = TableArray<1>
|
||||
If SAPBatchNo EQ '' then
|
||||
SlotNos = TableArray<1>
|
||||
|
||||
taCnt = COUNT(SlotNos,@VM) + (SlotNos NE '')
|
||||
taCnt = COUNT(SlotNos,@VM) + (SlotNos NE '')
|
||||
|
||||
SlotNos = STR('0':@VM,taCnt)
|
||||
SlotNos[-1,1] = ''
|
||||
SlotNos = STR('0':@VM,taCnt)
|
||||
SlotNos[-1,1] = ''
|
||||
|
||||
TableArray<1> = SlotNos
|
||||
Set_Property( CtrName , 'DEFPROP' , TableArray)
|
||||
|
||||
GOSUB CalcRejQty
|
||||
TableArray<1> = SlotNos
|
||||
Set_Property( CtrlName , 'DEFPROP' , TableArray)
|
||||
|
||||
GOSUB CalcRejQty
|
||||
end else
|
||||
ErrMsg('Slots cannot be cleared because an SAP batch number has been assigned. Contact FI for further assistance.')
|
||||
end
|
||||
|
||||
RETURN
|
||||
|
||||
|
Reference in New Issue
Block a user