implemented support for BatchConv SAP interface

This commit is contained in:
Infineon\StieberD 2024-09-30 13:10:50 -07:00
parent fdb12f206a
commit 95be15df83
16 changed files with 12030 additions and 3698 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -454,7 +454,7 @@ Refresh:
END END
WONo = Get_Property(@Window:'.WO_NO', 'TEXT') WONo = Get_Property(@Window:'.WO_NO', 'TEXT')
IF ( (MemberOf(@USER4,'MASTER_SCHED')) OR (MemberOf(@USER4,'SUPERVISOR')) OR (MemberOf(@USER4,'ENGINEERING')) OR (MemberOf(@USER4,'LEAD')) OR (MemberOf(@USER4,'OI_ADMIN')) ) AND (WONo NE 172758) AND (WONo NE 172739) AND (WONo NE 172767) THEN IF ( (MemberOf(@USER4,'MASTER_SCHED')) OR (MemberOf(@USER4,'SUPERVISOR')) OR (MemberOf(@USER4,'ENGINEERING')) OR (MemberOf(@USER4,'LEAD')) OR (MemberOf(@USER4,'OI_ADMIN')) ) THEN
Set_Property(@WINDOW:'.MAKEUP_BOX','ENABLED',1) Set_Property(@WINDOW:'.MAKEUP_BOX','ENABLED',1)
END ELSE END ELSE
Set_Property(@WINDOW:'.MAKEUP_BOX','ENABLED',0) Set_Property(@WINDOW:'.MAKEUP_BOX','ENABLED',0)
@ -710,16 +710,7 @@ Refresh:
NEXT Line NEXT Line
END END
NEXT I NEXT I
SAPBatchNo = XLATE('WO_MAT', WOMatKey, WO_MAT_SAP_BATCH_NO$, 'X')
SAPTXDtm = XLATE('WO_MAT', WOMatKey, WO_MAT_SAP_TX_DTM$, 'X')
IF SAPBatchNo NE '' OR SAPTXDtm NE '' then
IF MemberOf(@USER4,'OI_ADMIN') then
Set_Property(@Window : '.MAKEUP_BOX', 'ENABLED', 1)
end else
Set_Property(@Window : '.MAKEUP_BOX', 'ENABLED', 0)
end
end
RETURN RETURN
@ -1651,8 +1642,6 @@ AddMakeup:
ErrMsg('Slot No ':EmptySlot:' has an NCR.') ErrMsg('Slot No ':EmptySlot:' has an NCR.')
RETURN RETURN
END END
NEXT I NEXT I
Response = Dialog_Box('NDW_MAKEUP_WAFERS', @Window, WOMatKey) Response = Dialog_Box('NDW_MAKEUP_WAFERS', @Window, WOMatKey)
@ -1660,9 +1649,81 @@ AddMakeup:
Begin Case Begin Case
Case Response EQ True$ Case Response EQ True$
// User requested to convert the current cassette into a makeup box. // User requested to convert the current cassette into a makeup box.
AvailMU_WMOKeys = '' WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
UserResp = Response If Error_Services('NoError') then
MakeupBox = '' SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$>
SAPTXDtm = WOMatRec<WO_MAT_SAP_TX_DTM$>
AwaitingBatchNo = ( (SAPTXDtm NE '') and (SAPBatchNo EQ '') )
HasBatchNo = (SAPBatchNo NE '')
FullBoxReject = (SAPBatchNo[-1, 1] = 'R')
Begin Case
Case AwaitingBatchNo
InvalidRequest = True$
ErrMsg('WARNING: Cassette ineligible to be converted as it is awaiting a batch number from SAP.')
Return
Case FullBoxReject
InvalidRequest = True$
ErrMsg('WARNING: Cassette is ineligible to be converted as it is a full box reject.')
Return
Case HasBatchNo
// Operation limited to LEAD and SUPERVISOR groups
OverrideMsg = "Cassette has a batch number. SUPERVISOR or LEAD must override."
Response = Msg(@Window, '', 'OVERRIDE', '', OverrideMsg)
Begin Case
Case Response EQ 1
Response = True$ ; // User Clicked Override
Case Response EQ 2
Response = False$ ; // User Clicked Cancel
Case Response EQ char(27)
Response = False$ ; // User Pressed Escape Key
End Case
If Response EQ True$ then
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4:@FM:'LEAD':@VM:'SUPERVISOR')
Authorized = Response<1>
end else
Authorized = False$
end
If Not(Authorized) then Return
Case Otherwise$
Null
End Case
AvailMU_WMOKeys = ''
UserResp = Response
MakeupBox = ''
// User requested to convert the current cassette into a makeup box.
// Verify the quantity before proceeding.
If WMOutKey NE '' then
Parms = ''
Parms<1> = WMOutKey ; // Cassette to verify wafer count of.
Parms<2> = 0 ; // Wafer count adjustment - 0 because converting box.
Parms<3> = 'MU' ; // Wafer counter tool location
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
If Proceed NE True$ then Return
end else
ErrMsg('Error starting wafer counter check. WM_OUT key is missing.')
end
CheckValue = 1
FieldNo = WO_MAT_EPO_MAKEUP_BOX$
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue) ;* Set WMO_MAKEUP flag on WM_OUT
IF Get_Status(errCode) THEN ErrMsg(errCode)
Set_Property(@WINDOW:'.MAKEUP_BOX','DEFPROP',CheckValue) ;* Make this the makeup box
Send_Event(@WINDOW,'WRITE') ;* Write the record
WMOKey = WONo:'*':ProcStepNo:'*':CassNo
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WMOKey) ;* Reread the updated record
Return
end else
ErrMsg('WARNING: Error reading WO_MAT record.')
Return
end
Case Response EQ '' Case Response EQ ''
// User has cancelled this process. // User has cancelled this process.
Return Return
@ -1686,68 +1747,34 @@ AddMakeup:
Parms<2> = QtyAdj ; // Wafer count adjustment - 0 because converting box. Parms<2> = QtyAdj ; // Wafer count adjustment - 0 because converting box.
Parms<3> = 'MU' ; // Wafer counter tool location Parms<3> = 'MU' ; // Wafer counter tool location
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms) Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
If Proceed NE True$ then return If Proceed NE True$ then Return
Next MuWmoKey Next MuWmoKey
end end
* Signature block added 10/6/2010 JCH *
Valid = Dialog_Box('NDW_VERIFY_USER', @Window, @User4)
IF NOT(Valid) THEN RETURN ;* User is not worthy or can't type
Send_Event(@WINDOW,'WRITE')
obj_WM_Out('AddMakeupWafers',WMOutKey:@RM:EmptySlots:@RM:MakeupBox)
//Remove the signatures for the WO_MAT_QA record because they are changing its results.
WOMatQaKey = Field(WMOutKey, '*', 1) : '*' : Field(WMOutKey, '*', 3)
Wo_Mat_Qa_Services('ClearSignatureByStage', WOMatQaKey, 'MO_QA')
obj_Appwindow('LoadFormKeys',@WINDOW:@RM:WMOutKey)
RETURN
End Case End Case
If Response EQ True$ then
// User requested to convert the current cassette into a makeup box.
// Verify the quantity before proceeding.
If WMOutKey NE '' then
Parms = ''
Parms<1> = WMOutKey ; // Cassette to verify wafer count of.
Parms<2> = 0 ; // Wafer count adjustment - 0 because converting box.
Parms<3> = 'MU' ; // Wafer counter tool location
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
If Proceed NE True$ then return
end else
ErrMsg('Error starting wafer counter check. WM_OUT key is missing.')
end
end
IF AvailMU_WMOKeys = '' THEN
UserResp = Msg(@WINDOW,'','MAKEUP_WAFERS') ;* This box is being made into m/u wafers message
IF UserResp = CHAR(27) THEN RETURN
CheckValue = 1
FieldNo = WO_MAT_EPO_MAKEUP_BOX$
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue) ;* Set WMO_MAKEUP flag on WM_OUT
IF Get_Status(errCode) THEN ErrMsg(errCode)
Set_Property(@WINDOW:'.MAKEUP_BOX','DEFPROP',CheckValue) ;* Make this the makeup box
Send_Event(@WINDOW,'WRITE') ;* Write the record
WMOKey = WONo:'*':ProcStepNo:'*':CassNo
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WMOKey) ;* Reread the updated record
RETURN
END
* Signature block added 10/6/2010 JCH *
Valid = Dialog_Box('NDW_VERIFY_USER', @Window, @User4)
IF NOT(Valid) THEN RETURN ;* User is not worthy or can't type
Send_Event(@WINDOW,'WRITE')
obj_WM_Out('AddMakeupWafers',WMOutKey:@RM:EmptySlots:@RM:MakeupBox)
//Remove the signatures for the WO_MAT_QA record because they are changing its results.
WOMatQaKey = Field(WMOutKey, '*', 1) : '*' : Field(WMOutKey, '*', 3)
Wo_Mat_Qa_Services('ClearSignatureByStage', WOMatQaKey, 'MO_QA')
obj_Appwindow('LoadFormKeys',@WINDOW:@RM:WMOutKey)
RETURN
end else end else
// Cassette is on hold so makeup wafers cannot be added. // Cassette is on hold so makeup wafers cannot be added.
ErrorMessage = 'Add MU Wafer Denied!. The cassette must be taken off hold before adding makeup wafers.' ErrorMessage = 'Add MU Wafer Denied!. The cassette must be taken off hold before adding makeup wafers.'
Msg(@Window, '', 'OK', '', 'Error':@FM:ErrorMessage) Msg(@Window, '', 'OK', '', 'Error':@FM:ErrorMessage)
RETURN RETURN
end end
Return
* * * * * * * * * * * * * *
RemMakeup: RemMakeup:
@ -1862,8 +1889,8 @@ MakeupClick:
CtrlEnt = @WINDOW:'.MAKEUP_BOX' CtrlEnt = @WINDOW:'.MAKEUP_BOX'
CheckValue = Get_Property(CtrlEnt,'DEFPROP') CheckValue = Get_Property(CtrlEnt,'DEFPROP')
InvalidRequest = False$ InvalidRequest = False$
IF (WONo NE '') AND (CassNo NE '') AND (ProcStepNo NE '') THEN IF ( (WONo NE '') AND (CassNo NE '') AND (ProcStepNo NE '') ) THEN
WMOKey = WONo:'*':ProcStepNo:'*':CassNo WMOKey = WONo:'*':ProcStepNo:'*':CassNo
WOMatKey = WONo:'*':CassNo WOMatKey = WONo:'*':CassNo
@ -1877,58 +1904,87 @@ MakeupClick:
OR (MemberOf(@USER4,'OI_ADMIN')) THEN OR (MemberOf(@USER4,'OI_ADMIN')) THEN
If WMOKey NE '' then If WMOKey NE '' then
Parms = '' WOMatKey = Xlate('WM_OUT', WMOKey, 'WO_MAT_KEY', 'X')
Parms<1> = WMOKey ; // Cassette to verify wafer count of. If WOMatKey NE '' then
Parms<2> = 0 ; // Wafer count adjustment - 0 because converting box. WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
Parms<3> = 'MU' ; // Wafer counter tool location If Error_Services('NoError') then
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms) SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$>
If Proceed EQ True$ then SAPTXDtm = WOMatRec<WO_MAT_SAP_TX_DTM$>
Send_Event(CtrlEnt,'GOTFOCUS') FullBoxReject = (SAPBatchNo[-1, 1] = 'R')
OrgMUPart = XLATE('WM_OUT',WMOKey,'MU_PART_NO','X') AwaitingBatchNo = ( (SAPTXDtm NE '') and (SAPBatchNo EQ '') )
// Log the makeup flag change Begin Case
LogData = '' Case AwaitingBatchNo
LogData<1> = LoggingDTM ErrMsg('WARNING: Cassette ineligible to be converted as it is awaiting a batch number from SAP.')
LogData<2> = WONo:'*':ProcStepNo:'*':CassNo InvalidRequest = True$
LogData<3> = CheckValue Case FullBoxReject
LogData<4> = @User4 ErrMsg('WARNING: Cassette ineligible to be converted as it is a full box reject.')
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) InvalidRequest = True$
Case Otherwise$
Send_Event(@WINDOW,'WRITE') ;************* 6/30/2010 Null
End Case
FieldNo = WO_MAT_EPO_MAKEUP_BOX$
If Not(InvalidRequest) then
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue) Parms = ''
Parms<1> = WMOKey ; // Cassette to verify wafer count of.
IF Get_Status(errCode) THEN ErrMsg(errCode) Parms<2> = 0 ; // Wafer count adjustment - 0 because converting box.
Parms<3> = 'MU' ; // Wafer counter tool location
* Added 10/11/2010 JCH Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
NewMUPart = XLATE('WM_OUT',WMOKey,'MU_PART_NO','X') If Proceed EQ True$ then
IndexTransactionRow = 'MU_PART_NO':@FM:WMOKey:@FM:OrgMUPart:@FM:NewMUPart:@FM Send_Event(CtrlEnt,'GOTFOCUS')
OPEN "!WM_OUT" TO BangTable THEN OrgMUPart = XLATE('WM_OUT',WMOKey,'MU_PART_NO','X')
LOCK BangTable, 0 THEN // Log the makeup flag change
READ PendingTrans FROM BangTable, 0 ELSE PendingTrans = '0':@FM LogData = ''
PendingTrans := IndexTransactionRow LogData<1> = LoggingDTM
WRITE PendingTrans ON BangTable, 0 ELSE LogData<2> = WONo:'*':ProcStepNo:'*':CassNo
ErrMsg('Unable to write index transaction to !WM_OUT. ':WMOutKey) LogData<3> = CheckValue
END LogData<4> = @User4
UNLOCK BangTable, 0 ELSE ErrMsg('Unable to Unlock !WM_OUT while adding index transaction. ':WMOutKey) Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
END ELSE
ErrMsg('Unable to Lock !WM_OUT to add index transaction. ':WMOutKey) Send_Event(@WINDOW,'WRITE') ;************* 6/30/2010
END
END ELSE FieldNo = WO_MAT_EPO_MAKEUP_BOX$
ErrMsg('Unable to Open !WM_OUT to add index transaction. ':WMOutKey)
END obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
* End of 10/11/2010 update
end else IF Get_Status(errCode) THEN ErrMsg(errCode)
InvalidRequest = True$
end * Added 10/11/2010 JCH
NewMUPart = XLATE('WM_OUT',WMOKey,'MU_PART_NO','X')
IndexTransactionRow = 'MU_PART_NO':@FM:WMOKey:@FM:OrgMUPart:@FM:NewMUPart:@FM
OPEN "!WM_OUT" TO BangTable THEN
LOCK BangTable, 0 THEN
READ PendingTrans FROM BangTable, 0 ELSE PendingTrans = '0':@FM
PendingTrans := IndexTransactionRow
WRITE PendingTrans ON BangTable, 0 ELSE
ErrMsg('Unable to write index transaction to !WM_OUT. ':WMOutKey)
END
UNLOCK BangTable, 0 ELSE ErrMsg('Unable to Unlock !WM_OUT while adding index transaction. ':WMOutKey)
END ELSE
ErrMsg('Unable to Lock !WM_OUT to add index transaction. ':WMOutKey)
END
END ELSE
ErrMsg('Unable to Open !WM_OUT to add index transaction. ':WMOutKey)
END
* End of 10/11/2010 update
end else
InvalidRequest = True$
end
end
end else
InvalidRequest = True$
ErrMsg('WARNING: Error reading WO_MAT record.')
end
end else
InvalidRequest = True$
ErrMsg('WARNING: Error reading WO_MAT key.')
end
end else end else
InvalidRequest = True$ InvalidRequest = True$
ErrMsg('WARNING: Error starting wafer counter check. WM_OUT key is missing.') ErrMsg('WARNING: Error starting wafer counter check. WM_OUT key is missing.')
end end
END ELSE END ELSE
InvalidRequest = True$ InvalidRequest = True$
ErrMsg('INFO: This function is limited to authorized users only.') ErrMsg('INFO: This function is limited to members of MASTER_SCHED, SUPERVISOR, ENGINEERING, or LEAD security groups.')
END END
END else END else
InvalidRequest = True$ InvalidRequest = True$
@ -2213,5 +2269,3 @@ RefreshWaferCounterData:
return return

View File

@ -265,9 +265,6 @@ Refresh:
IF WMOKey NE '' THEN IF WMOKey NE '' THEN
Set_Property(@WINDOW:'.EPO_GROUP','ENABLED',1) Set_Property(@WINDOW:'.EPO_GROUP','ENABLED',1)
IF SAPTXDtm NE '' OR sapBatchId NE '' OR WONo EQ 172758 OR WONo EQ 172739 OR WONo EQ 172767 then
Set_Property(@Window : '.EPO_MAKEUP', 'ENABLED', 0)
end
END ELSE END ELSE
Set_Property(@WINDOW:'.EPO_GROUP','ENABLED',0) Set_Property(@WINDOW:'.EPO_GROUP','ENABLED',0)
END END
@ -277,9 +274,6 @@ Refresh:
Set_Property(@WINDOW:'.ASM_GROUP','ENABLED',1) Set_Property(@WINDOW:'.ASM_GROUP','ENABLED',1)
Set_Property(@WINDOW:'.EPO_GROUP','ENABLED',0) Set_Property(@WINDOW:'.EPO_GROUP','ENABLED',0)
Set_Property(@WINDOW:'.EPI_GROUP','ENABLED',0) Set_Property(@WINDOW:'.EPI_GROUP','ENABLED',0)
IF SAPTXDtm NE '' OR sapBatchId NE '' then
Set_Property(@Window : '.MAKEUP_BOX', 'ENABLED', 0)
end
END END
* QBF buttons * QBF buttons
@ -595,8 +589,8 @@ MakeUpClick:
FieldNo = Get_Property(CtrlEnt,'POS') FieldNo = Get_Property(CtrlEnt,'POS')
Send_Event(CtrlEnt,'GOTFOCUS') Send_Event(CtrlEnt,'GOTFOCUS')
CheckValue = Get_Property(CtrlEnt,'DEFPROP') CheckValue = Get_Property(CtrlEnt,'DEFPROP')
InvalidRequest = 0 InvalidRequest = False$
IF ((WONo NE '') AND (CassNo NE '')) THEN IF ((WONo NE '') AND (CassNo NE '')) THEN
@ -608,36 +602,79 @@ MakeUpClick:
OR (MemberOf(@USER4,'ENGINEERING')) | OR (MemberOf(@USER4,'ENGINEERING')) |
OR (MemberOf(@USER4,'LEAD')) | OR (MemberOf(@USER4,'LEAD')) |
OR (MemberOf(@USER4,'OI_ADMIN')) THEN OR (MemberOf(@USER4,'OI_ADMIN')) THEN
Set_Property(@WINDOW,'SAVEWARN','0') WOMatRec = Database_Services("ReadDataRow", 'WO_MAT', WOMatKey)
Send_Event(@WINDOW,'CLEAR') If Error_Services('NoError') then
SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$>
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue) SAPTXDtm = WOMatRec<WO_MAT_SAP_TX_DTM$>
AwaitingBatchNo = ( (SAPTXDtm NE '') and (SAPBatchNo EQ '') )
IF Get_Status(errCode) THEN FullBoxReject = (SAPBatchNo[-1, 1] = 'R')
ErrMsg(errCode) Begin Case
END Case AwaitingBatchNo
InvalidRequest = True$
ErrMsg('WARNING: Cassette ineligible to be converted as it is awaiting a batch number from SAP.')
Case FullBoxReject
InvalidRequest = True$
ErrMsg('WARNING: Cassette ineligible to be converted as it is a full box reject.')
Case Otherwise$
Null
End Case
If Not(InvalidRequest) then
ReactorType = Xlate('WO_MAT', WOMatKey, 'REACTOR_TYPE_NO_CONV', 'X')
EpiPro = (ReactorType EQ 'EPP')
If EpiPro then
LotId = Xlate('WO_MAT', WOMatKey, 'WMO_KEY', 'X')
end else
LotId = Xlate('WO_MAT', WOMatKey, 'RDS_NO', 'X')
end
If LotId NE '' then
Parms = ''
Parms<1> = LotId ; // Cassette to verify wafer count of.
Parms<2> = 0 ; // Wafer count adjustment - 0 because converting box.
Parms<3> = 'MU' ; // Wafer counter tool location
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
If Proceed EQ True$ then
Set_Property(@WINDOW,'SAVEWARN', False$)
Send_Event(@WINDOW,'CLEAR')
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
end else
InvalidRequest = True$
end
end else
InvalidRequest = True$
ErrMsg('WARNING: Error starting wafer counter check. RDS No is missing.')
end
end
end else
InvalidRequest = True$
ErrMsg('ERROR: Error reading WO_MAT record.')
end
END ELSE END ELSE
InvalidRequest = 1 InvalidRequest = True$
ErrMsg('INFO: This function is limited to authorized users only.') ErrMsg('INFO: This function is limited to authorized users only.')
END END
end else end else
InvalidRequest = 1 InvalidRequest = True$
ErrMsg('INFO: You cannot make changes to the lot while it is on hold.') ErrMsg('INFO: You cannot make changes to the lot while it is on hold.')
end end
END ELSE END ELSE
InvalidRequest = 1 InvalidRequest = True$
ErrMsg('WARNING: Work Order and Cassette information is missing.') ErrMsg('WARNING: Work Order and Cassette information is missing.')
END END
IF (InvalidRequest = 1) then IF (InvalidRequest EQ True$) then
/* Toggle back the checkbox flag */ /* Toggle back the checkbox flag */
IF (CheckValue = 0) THEN IF (CheckValue EQ False$) THEN
Set_Property(CtrlEnt, 'DEFPROP', 1) Set_Property(CtrlEnt, 'DEFPROP', True$)
END ELSE END ELSE
Set_Property(CtrlEnt, 'DEFPROP', 0) Set_Property(CtrlEnt, 'DEFPROP', False$)
END END
END END
@ -767,10 +804,3 @@ BatchFixit:
RETURN RETURN

View File

@ -20,7 +20,7 @@ DECLARE SUBROUTINE Sleepery
DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists
DECLARE FUNCTION Dialog_Box, obj_WO_Log, obj_NCR, Check_Notes, obj_MUWafers, obj_WO_Mat, Signature_Services DECLARE FUNCTION Dialog_Box, obj_WO_Log, obj_NCR, Check_Notes, obj_MUWafers, obj_WO_Mat, Signature_Services
DECLARE FUNCTION MemberOf, obj_Tables, obj_RDS, Environment_Services, Logging_Services, Material_Services DECLARE FUNCTION MemberOf, obj_Tables, obj_RDS, Environment_Services, Logging_Services, Material_Services
DECLARE FUNCTION Database_Services, RetStack, Datetime DECLARE FUNCTION Database_Services, RetStack, Datetime, Error_Services
$INSERT POPUP_EQUATES $INSERT POPUP_EQUATES
$INSERT LOGICAL $INSERT LOGICAL
@ -72,8 +72,6 @@ EQU COL$USER_ID TO 8
EQU COL$TAGS TO 9 EQU COL$TAGS TO 9
EQU COL$TOOL_ID TO 10 EQU COL$TOOL_ID TO 10
EQU MULTILINE_STYLE$ TO 512 ;* MultiLine Select
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS') LogTime = Oconv(Time(), 'MTS')
@ -122,8 +120,6 @@ Create:
IOOptions<6> = 1 ; // Do not clear on write IOOptions<6> = 1 ; // Do not clear on write
Set_Property(@WINDOW, "IOOPTIONS", IOOptions) Set_Property(@WINDOW, "IOOPTIONS", IOOptions)
* get the current style
* Provides compatibility with the existing messaging attachment system * Provides compatibility with the existing messaging attachment system
IF Parm1 NE '' THEN IF Parm1 NE '' THEN
@ -244,13 +240,7 @@ Refresh:
HotLot = Vals[COL2()+1,@RM] HotLot = Vals[COL2()+1,@RM]
UseMUWafers = Vals[COL2()+1,@RM] UseMUWafers = Vals[COL2()+1,@RM]
IF MemberOf(@USER4,'OI_ADMIN') THEN
Set_Property(@WINDOW:'.REM_MAKEUP_BUTTON','VISIBLE',1)
END
IF NOT(MakeupBox) AND UseMUWafers THEN IF NOT(MakeupBox) AND UseMUWafers THEN
Set_Property(@WINDOW:'.ADD_MAKEUP_BUTTON','VISIBLE',1)
Set_Property(@WINDOW:'.REM_MAKEUP_BUTTON','VISIBLE',1)
Set_Property(@WINDOW:'.MU_BOX_LABEL','VISIBLE',0) Set_Property(@WINDOW:'.MU_BOX_LABEL','VISIBLE',0)
END ELSE END ELSE
IF MakeupBox = 1 THEN IF MakeupBox = 1 THEN
@ -258,12 +248,6 @@ Refresh:
END ELSE END ELSE
Set_Property(@WINDOW:'.MU_BOX_LABEL','VISIBLE',0) Set_Property(@WINDOW:'.MU_BOX_LABEL','VISIBLE',0)
END END
Set_Property(@WINDOW:'.ADD_MAKEUP_BUTTON','VISIBLE',0)
Set_Property(@WINDOW:'.REM_MAKEUP_BUTTON','VISIBLE',0)
END
IF MemberOf(@USER4,'OI_ADMIN') THEN
Set_Property(@WINDOW:'.REM_MAKEUP_BUTTON','VISIBLE',1)
END END
IF HotLot THEN IF HotLot THEN
@ -383,12 +367,6 @@ Refresh:
NEXT COL NEXT COL
NEXT Line NEXT Line
SAPBatchNo = Xlate('WO_MAT', WOMatKey, WO_MAT_SAP_BATCH_NO$, 'X')
SAPTXDtm = XLATE('WO_MAT', WOMatKey, WO_MAT_SAP_TX_DTM$, 'X')
IF SAPBatchNo NE '' OR SAPTXDtm NE '' then
Set_Property(@Window: '.MAKEUP_CHECKBOX', 'ENABLED', 0)
end
RETURN RETURN
@ -639,15 +617,13 @@ RecallMat:
END END
END END
END END
NEXT I NEXT I
FOR I = 1 TO RecallNCRCnt FOR I = 1 TO RecallNCRCnt
RecallNCRNo = RecallNCRNos<I> RecallNCRNo = RecallNCRNos<I>
RecallSlot = RecallSlotNos<I> RecallSlot = RecallSlotNos<I>
SlotInfo = '' ; // Initializing variable here to prevent compilation warning. This code looks unfinished...
SlotCnt = COUNT(SlotInfo<1>, @VM) + (SlotInfo<1> NE '') SlotCnt = COUNT(SlotInfo<1>, @VM) + (SlotInfo<1> NE '')
FOR N = 1 TO SlotCnt FOR N = 1 TO SlotCnt
SlotNo = SlotInfo<1,N> SlotNo = SlotInfo<1,N>
PrevWaferID = SlotInfo<2,N> PrevWaferID = SlotInfo<2,N>
@ -665,7 +641,6 @@ RecallMat:
RETURN RETURN
* * * * * * * * * * * * * *
NCRKeysDC: NCRKeysDC:
* * * * * * * * * * * * * *
@ -775,162 +750,169 @@ AddMakeup:
Parms := 1:@RM ;* ReturnKeys Flag Parms := 1:@RM ;* ReturnKeys Flag
Parms := 1 ;* Use Reactor Run Table Flag Parms := 1 ;* Use Reactor Run Table Flag
If 1 then Response = Dialog_Box('NDW_MAKEUP_WAFERS', @Window, WOMatKey)
Response = Dialog_Box('NDW_MAKEUP_WAFERS', @Window, WOMatKey) Begin Case
Begin Case Case Response EQ True$
Case Response EQ True$ // User requested to convert the current cassette into a makeup box.
// User requested to convert the current cassette into a makeup box. WOMatRec = Database_Services("ReadDataRow", 'WO_MAT', WOMatKey)
SAPBatchNo = Xlate('WO_MAT', WOMatKey, 'SAP_BATCH_NO', 'X') If Error_Services('NoError') then
IF SAPBatchNo then SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$>
Msg(@Window , 'Lot has an SAP Batch No. and cannot be turned into a MU lot.') SAPTXDtm = WOMatRec<WO_MAT_SAP_TX_DTM$>
Return AwaitingBatchNo = ( (SAPTXDtm NE '') and (SAPBatchNo EQ '') )
end HasBatchNo = (SAPBatchNo NE '')
AvailMU_WOMatKeys = '' FullBoxReject = (SAPBatchNo[-1, 1] = 'R')
UserResp = Response Begin Case
MakeupBox = '' Case AwaitingBatchNo
Case Response EQ '' InvalidRequest = True$
// User has cancelled this process. ErrMsg('WARNING: Cassette ineligible to be converted as it is awaiting a batch number from SAP.')
Return Return
Case Otherwise$ Case FullBoxReject
// User has selected a makeup box to use and backfill. InvalidRequest = True$
AvailMU_WOMatKeys = Response ErrMsg('WARNING: Cassette ineligible to be converted as it is a full box reject.')
MakeupBox = Response Return
MuWfrsNeeded = SelCnt Case HasBatchNo
If AvailMU_WOMatKeys NE '' then // Operation limited to LEAD and SUPERVISOR groups
// Wafer counter check - Account for the possibility of selecting more than one makeup box. OverrideMsg = "Cassette has a batch number. SUPERVISOR or LEAD must override."
For each MuWoMatKey in AvailMU_WOMatKeys using @FM Response = Msg(@Window, '', 'OVERRIDE', '', OverrideMsg)
MuRdsNo = Xlate('WO_MAT', MuWoMatKey, 'RDS_NO', 'X')
QtyAdj = MuWfrsNeeded Begin Case
CurrMuWfrCnt = obj_WO_Mat('CurrWaferCnt', MuWoMatKey) Case Response EQ 1
If MuWfrsNeeded GT CurrMuWfrCnt then Response = True$ ; // User Clicked Override
QtyAdj = CurrMuWfrCnt Case Response EQ 2
MuWfrsNeeded -= CurrMuWfrCnt Response = False$ ; // User Clicked Cancel
end Case Response EQ char(27)
Parms = '' Response = False$ ; // User Pressed Escape Key
Parms<1> = MuRdsNo ; // Cassette to verify wafer count of. End Case
Parms<2> = QtyAdj ; // Wafer count adjustment - Number of makeup wafers being used.
Parms<3> = 'MU' ; // Wafer counter tool location If Response EQ True$ then
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms) Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4:@FM:'LEAD':@VM:'SUPERVISOR')
If Proceed NE True$ then return Authorized = Response<1>
Next MuWoMatKey end else
end Authorized = False$
End Case end
If Response EQ True$ then If Not(Authorized) then Return
// User requested to convert the current cassette into a makeup box. Case Otherwise$
// Verify the quantity before proceeding. Null
RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT') End Case
If RDSNo NE '' then
Parms = '' AvailMU_WOMatKeys = ''
Parms<1> = RDSNo ; // Cassette to verify wafer count of. UserResp = Response
Parms<2> = 0 ; // Wafer count adjustment - 0 because converting box. MakeupBox = ''
Parms<3> = 'MU' ; // Wafer counter tool location
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms) // User requested to convert the current cassette into a makeup box.
If Proceed NE True$ then return // Verify the quantity before proceeding.
end else RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
ErrMsg('Error starting wafer counter check. RDS No is missing.') If RDSNo NE '' then
end Parms = ''
end Parms<1> = RDSNo ; // Cassette to verify wafer count of.
end else Parms<2> = 0 ; // Wafer count adjustment - 0 because converting box.
AvailMU_WOMatKeys = obj_MUWafers('AvailWafers',WONo:@RM:@RM:1:@RM:1) Parms<3> = 'MU' ; // Wafer counter tool location
end Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
If Proceed NE True$ then return
LOCATE WOMatKey IN AvailMU_WOMatKeys USING @VM SETTING Pos THEN end else
AvailMU_WOMatKeys = DELETE(AvailMU_WOMatKeys,1,Pos,0) ;* Remove current cassette from list ErrMsg('Error starting wafer counter check. RDS No is missing.')
END end
IF AvailMU_WOMatKeys = '' THEN RDSNo = Get_Property(@Window : '.RDS_NO', 'TEXT') ; // Get the RDS No now before the WRITE in case it is needed to toggle the index.
RDSNo = Get_Property(@Window : '.RDS_NO', 'TEXT') ; // Get the RDS No now before the WRITE in case it is needed to toggle the index. Send_Event(@WINDOW,'WRITE')
If 0 then
UserResp = Msg(@WINDOW,'','MAKEUP_WAFERS') ;* This box is being made into m/u wafers message FieldNo = WO_MAT_MAKEUP_BOX$
end CheckValue = 1
IF UserResp = CHAR(27) THEN RETURN obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
Send_Event(@WINDOW,'WRITE') SlotWaferIDs = Xlate('WO_MAT', WOMatKey, 'SLOT_WAFER_ID', 'X')
Convert @VM to '' in SlotWaferIDs
FieldNo = WO_MAT_MAKEUP_BOX$
CheckValue = 1 // Flush/update pending index transactions.
Update_Index('WO_MAT', 'MU_PART_NO', False$, True$)
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue) Update_Index('WO_MAT', 'CURR_STATUS', False$, True$)
* WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
* WOMatRow<12> = '' ; // Clear the RDS No so the index will be forced to recalculate. IF Get_Status(errCode) THEN
* WOMatRow<23> = False$ ; // Clear the MakeUp box flag so the index will be forced to recalculate. ErrMsg(errCode)
* Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRow, True$, False$, True$) end
* WOMatRow<12> = RDSNo ; // Restore the RDS No so the index on RDS_FINAL_SIG will be forced to recalculate with the most recent value.
* WOMatRow<23> = True$ ; // Restore the MakeUp box flag so the index will be forced to recalculate. CurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)
* WOMatRec = WOMatRow CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS')
//GoSub LogRecord
//Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRow, True$, False$, True$) IF CurrStatus = 'RTU' THEN
SlotWaferIDs = Xlate('WO_MAT', WOMatKey, 'SLOT_WAFER_ID', 'X') EventParms = ''
Convert @VM to '' in SlotWaferIDs EventParms<COL$LOG_FILE> = 'WO_MAT'
EventParms<COL$LOG_DTM> = CurrDTM
// Flush/update pending index transactions. EventParms<COL$ACTION> = 'RTU'
Update_Index('WO_MAT', 'MU_PART_NO', False$, True$) EventParms<COL$WH_CD> = 'CR'
Update_Index('WO_MAT', 'CURR_STATUS', False$, True$) EventParms<COL$LOC_CD> = 'MU'
EventParms<COL$WO_NOS> = WONo
IF Get_Status(errCode) THEN EventParms<COL$CASS_NOS> = CassNo
ErrMsg(errCode) EventParms<COL$USER_ID> = @USER4
end EventParms<COL$TAGS> = ''
EventParms<COL$TOOL_ID> = ''
CurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)
CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS') CONVERT @FM TO @RM IN EventParms
IF CurrStatus = 'RTU' THEN obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * *
EventParms = ''
EventParms<COL$LOG_FILE> = 'WO_MAT' IF Get_Status(errCode) THEN
EventParms<COL$LOG_DTM> = CurrDTM CALL ErrMsg(ErrCode)
EventParms<COL$ACTION> = 'RTU' END
EventParms<COL$WH_CD> = 'CR'
EventParms<COL$LOC_CD> = 'MU' END
EventParms<COL$WO_NOS> = WONo
EventParms<COL$CASS_NOS> = CassNo obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WOMatKey)
EventParms<COL$USER_ID> = @USER4
EventParms<COL$TAGS> = '' Post_Event(@Window, 'READ')
EventParms<COL$TOOL_ID> = '' RETURN
CONVERT @FM TO @RM IN EventParms end else
ErrMsg('WARNING: Error reading WO_MAT record.')
obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * * Return
end
IF Get_Status(errCode) THEN
CALL ErrMsg(ErrCode) Case Response EQ ''
END // User has cancelled this process.
Return
END
Case Otherwise$
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WOMatKey) // User has selected a makeup box to use and backfill.
AvailMU_WOMatKeys = Response
END MakeupBox = Response
MuWfrsNeeded = SelCnt
TypeOver = '' If AvailMU_WOMatKeys NE '' then
TypeOver<PDISPLAY$> = AvailMU_WOMatKeys // Wafer counter check - Account for the possibility of selecting more than one makeup box.
For each MuWoMatKey in AvailMU_WOMatKeys using @FM
If 0 then MuRdsNo = Xlate('WO_MAT', MuWoMatKey, 'RDS_NO', 'X')
MakeupBox = Popup(@WINDOW,TypeOver,'WO_MAT_MAKEUP') QtyAdj = MuWfrsNeeded
end CurrMuWfrCnt = obj_WO_Mat('CurrWaferCnt', MuWoMatKey)
If MuWfrsNeeded GT CurrMuWfrCnt then
IF NOT(MemberOf(@USER4,'OI_ADMIN')) THEN QtyAdj = CurrMuWfrCnt
IF MakeupBox NE AvailMU_WOMatKeys<1,1> THEN MuWfrsNeeded -= CurrMuWfrCnt
ErrMsg('Only the first available cassette can be used for makeup.') end
MakeupBox = '' Parms = ''
END Parms<1> = MuRdsNo ; // Cassette to verify wafer count of.
END Parms<2> = QtyAdj ; // Wafer count adjustment - Number of makeup wafers being used.
IF MakeupBox = '' THEN Parms<3> = 'MU' ; // Wafer counter tool location
Post_Event(@Window, 'READ') Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
RETURN If Proceed NE True$ then return
end Next MuWoMatKey
end
Valid = Dialog_Box('NDW_VERIFY_USER', @Window, @User4)
IF NOT(MemberOf(@USER4,'OI_ADMIN')) THEN
IF NOT(Valid) THEN RETURN ;* User is not worthy or can't type IF MakeupBox NE AvailMU_WOMatKeys<1,1> THEN
ErrMsg('Only the first available cassette can be used for makeup.')
Send_Event(@WINDOW,'WRITE') MakeupBox = ''
return
obj_WO_Mat('AddMakeupWafers',WOMatKey:@RM:EmptySlots:@RM:MakeupBox) END
END
Send_Event(@WINDOW,'READ')
Valid = Dialog_Box('NDW_VERIFY_USER', @Window, @User4)
IF NOT(Valid) THEN RETURN ;* User is not worthy or can't type
Send_Event(@WINDOW,'WRITE')
obj_WO_Mat('AddMakeupWafers',WOMatKey:@RM:EmptySlots:@RM:MakeupBox)
Send_Event(@WINDOW,'READ')
End Case
end else end else
// Cassette is on hold so makeup wafers cannot be added. // Cassette is on hold so makeup wafers cannot be added.
ErrorMessage = 'Add makeup wafer(s) denied!. The cassette must be taken off hold before adding makeup wafer(s).' ErrorMessage = 'Add makeup wafer(s) denied!. The cassette must be taken off hold before adding makeup wafer(s).'
@ -1039,35 +1021,59 @@ MakeUpLot:
WOMatKey = WONo:'*':CassNo WOMatKey = WONo:'*':CassNo
OnHold = Xlate('WO_MAT', WOMatKey, 'HOLD', 'X') OnHold = Xlate('WO_MAT', WOMatKey, 'HOLD', 'X')
If OnHold NE True$ then If OnHold NE True$ then
IF (MemberOf(@USER4,'MASTER_SCHED')) | IF (MemberOf(@USER4,'MASTER_SCHED')) |
OR (MemberOf(@USER4,'SUPERVISOR')) | OR (MemberOf(@USER4,'SUPERVISOR')) |
OR (MemberOf(@USER4,'ENGINEERING')) | OR (MemberOf(@USER4,'ENGINEERING')) |
OR (MemberOf(@USER4,'LEAD')) | OR (MemberOf(@USER4,'LEAD')) |
OR (MemberOf(@USER4,'OI_ADMIN')) THEN OR (MemberOf(@USER4,'OI_ADMIN')) THEN
RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
If RDSNo NE '' then WOMatRec = Database_Services("ReadDataRow", 'WO_MAT', WOMatKey)
Parms = '' If Error_Services('NoError') then
Parms<1> = RDSNo ; // Cassette to verify wafer count of. SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$>
Parms<2> = 0 ; // Wafer count adjustment - 0 because converting box. SAPTXDtm = WOMatRec<WO_MAT_SAP_TX_DTM$>
Parms<3> = 'MU' ; // Wafer counter tool location AwaitingBatchNo = ( (SAPTXDtm NE '') and (SAPBatchNo EQ '') )
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms) FullBoxReject = (SAPBatchNo[-1, 1] = 'R')
If Proceed EQ True$ then Begin Case
Set_Property(@WINDOW,'SAVEWARN', False$) Case AwaitingBatchNo
Send_Event(@WINDOW,'CLEAR') InvalidRequest = True$
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue) ErrMsg('WARNING: Cassette ineligible to be converted as it is awaiting a batch number from SAP.')
IF Get_Status(errCode) THEN Case FullBoxReject
ErrMsg(errCode) InvalidRequest = True$
END ErrMsg('WARNING: Cassette ineligible to be converted as it is a full box reject.')
end else Case Otherwise$
InvalidRequest = True$ Null
end End Case
end else
InvalidRequest = True$ If Not(InvalidRequest) then
ErrMsg('WARNING: Error starting wafer counter check. RDS No is missing.') RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
end If RDSNo NE '' then
Parms = ''
Parms<1> = RDSNo ; // Cassette to verify wafer count of.
Parms<2> = 0 ; // Wafer count adjustment - 0 because converting box.
Parms<3> = 'MU' ; // Wafer counter tool location
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
If Proceed EQ True$ then
Set_Property(@WINDOW,'SAVEWARN', False$)
Send_Event(@WINDOW,'CLEAR')
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
end else
InvalidRequest = True$
end
end else
InvalidRequest = True$
ErrMsg('WARNING: Error starting wafer counter check. RDS No is missing.')
end
end
end else
InvalidRequest = True$
ErrMsg('ERROR: Error reading WO_MAT record.')
end
END ELSE END ELSE
InvalidRequest = True$ InvalidRequest = True$
ErrMsg('INFO: This function is limited to authorized users only.') ErrMsg('INFO: This function is limited to members of MASTER_SCHED, SUPERVISOR, ENGINEERING, or LEAD security groups.')
END END
end else end else
InvalidRequest = True$ InvalidRequest = True$
@ -1195,6 +1201,3 @@ LogRecord:
return return

View File

@ -86,6 +86,19 @@ Event WINDOW.CREATE(CreateParam)
MakeupWafers = Material_Services('GetAvailableMakeupWafers', ThisWorkOrderNo, False$) MakeupWafers = Material_Services('GetAvailableMakeupWafers', ThisWorkOrderNo, False$)
// Remove cassette being backfilled from available list
MakeupWafersClean = ''
NumMUCass = DCount(MakeupWafers, @VM)
If NumMUCass GT 0 then
For CassIndex = 1 to NumMUCass
Row = MakeupWafers<0, CassIndex>
MuWoMatKey = Row<0, 0, 1> : '*' : Row<0, 0, 2>
If (MuWoMatKey NE ThisWOMatKey) then MakeupWafersClean<0, -1> = Row
Next CassIndex
end
MakeupWafers = MakeupWafersClean
Msg(@Window, MsgUp) Msg(@Window, MsgUp)
GoSub Setup_OLE_Controls GoSub Setup_OLE_Controls
@ -320,13 +333,22 @@ Setup_OLE_Controls:
Ctrl = @Window : '.OLE_PIC_NO_WAFERS' Ctrl = @Window : '.OLE_PIC_NO_WAFERS'
SAPBatchNo = Xlate('WO_MAT', ThisWOMatKey, 'SAP_BATCH_NO', 'X') SAPBatchNo = Xlate('WO_MAT', ThisWOMatKey, 'SAP_BATCH_NO', 'X')
If SAPBatchNo then
Caption = 'This cassette cannot be converted into a makeup box because it has a batch number. Please contact FI.' IsEpiPro = Get_Property(@Window, '@EPIPRO')
//Set_Property(@Window:'.PUB_OK', 'ENABLED', False$) If IsEpiPro then
WMOKey = Xlate('WO_MAT', ThisWOMatKey, 'WMO_KEY', 'X')
MakeupBox = Xlate('WM_OUT', WMOKey, 'MAKEUP_BOX', 'X')
end else
MakeupBox = Xlate('WO_MAT', ThisWOMatKey, 'MAKEUP_BOX', 'X')
end
Caption = 'There are no makeup wafers available for this cassette.'
If MakeupBox then
Set_Property(@Window:'.PUB_OK', 'ENABLED', False$)
end else end else
Caption = 'Click OK to convert this to a makeup box.' Caption := @TM : 'Click OK to convert this to a makeup box.'
end end
Set_Property(Ctrl, 'OLE.Caption', 'There are no makeup wafers available for this cassette.' : @TM : Caption) Set_Property(Ctrl, 'OLE.Caption', Caption)
return return

View File

@ -1,149 +1,149 @@
Compile function NDW_MANUAL_WAFER_COUNT_EVENTS(CtrlEntId, Event, @PARAMS) Compile function NDW_MANUAL_WAFER_COUNT_EVENTS(CtrlEntId, Event, @PARAMS)
/*********************************************************************************************************************** /***********************************************************************************************************************
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
permission from Infineon. permission from Infineon.
Name : NDW_Manual_Wafer_Count_Events Name : NDW_Manual_Wafer_Count_Events
Description : This function acts as a commuter module for all events related to this window. Description : This function acts as a commuter module for all events related to this window.
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
application-specific promoted event handler. This makes it possible to add QuickEvents that need to application-specific promoted event handler. This makes it possible to add QuickEvents that need to
execute Basic+ logic without having use the Form Designer to make the association, although this is execute Basic+ logic without having use the Form Designer to make the association, although this is
limited to the events which are currently promoted. limited to the events which are currently promoted.
If the form needs to call the commuter module directly then the QuickEvent parameters should be If the form needs to call the commuter module directly then the QuickEvent parameters should be
formatted like this: formatted like this:
'@SELF','@EVENT',['@PARAM1','@PARAMx'] '@SELF','@EVENT',['@PARAM1','@PARAMx']
Parameters : Parameters :
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
Event [in] -- The event being executed. See the Notes section regarding "PRE" events Event [in] -- The event being executed. See the Notes section regarding "PRE" events
Param1-15 [in] -- Additional event parameter holders Param1-15 [in] -- Additional event parameter holders
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
EVENT_SETUP insert EVENT_SETUP insert
History : (Date, Initials, Notes) History : (Date, Initials, Notes)
04/12/24 djs Created initial commuter module. 04/12/24 djs Created initial commuter module.
***********************************************************************************************************************/ ***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
#window NDW_MANUAL_WAFER_COUNT #window NDW_MANUAL_WAFER_COUNT
$Insert EVENT_SETUP $Insert EVENT_SETUP
$Insert APP_INSERTS $Insert APP_INSERTS
$Insert MSG_EQUATES $Insert MSG_EQUATES
Equ MSG_WIDTH$ to 650 Equ MSG_WIDTH$ to 650
Equ Comma$ to ',' Equ Comma$ to ','
Declare function Environment_Services, Logging_Services, Datetime Declare function Environment_Services, Logging_Services, Datetime
Declare subroutine Set_Property, Logging_Services Declare subroutine Set_Property, Logging_Services, PlaceDialog
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WaferCounter' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WaferCounter'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS') LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Wafer Counter Verify Log.csv' LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Wafer Counter Verify Log.csv'
Headers = 'Logging DTM':@FM:'Logging Text' Headers = 'Logging DTM':@FM:'Logging Text'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$) objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler. // Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
If Event EQ 'OLE' then If Event EQ 'OLE' then
Transfer Event to OIEvent Transfer Event to OIEvent
Transfer Param1 to Event Transfer Param1 to Event
Transfer Param2 to Param1 Transfer Param2 to Param1
Transfer Param3 to Param2 Transfer Param3 to Param2
Transfer Param4 to Param3 Transfer Param4 to Param3
Transfer Param5 to Param4 Transfer Param5 to Param4
Transfer Param6 to Param5 Transfer Param6 to Param5
Transfer Param7 to Param6 Transfer Param7 to Param6
Transfer Param8 to Param7 Transfer Param8 to Param7
end end
GoToEvent Event for CtrlEntID GoToEvent Event for CtrlEntID
Return EventFlow else EVENT_CONTINUE$ Return EventFlow else EVENT_CONTINUE$
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// EVENT HANDLERS // EVENT HANDLERS
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
Event WINDOW.CREATE(CreateParam) Event WINDOW.CREATE(CreateParam)
If CreateParam NE '' then If CreateParam NE '' then
Set_Property(@Window, '@EXPECTED_QTY', CreateParam) Set_Property(@Window, '@EXPECTED_QTY', CreateParam)
List = '' List = ''
For SlotIndex = 0 to 25 For SlotIndex = 0 to 25
List<SlotIndex + 1> = SlotIndex List<SlotIndex + 1> = SlotIndex
Next SlotIndex Next SlotIndex
Set_Property(@Window:'.CBO_WAFER_COUNT', 'LIST', List) Set_Property(@Window:'.CBO_WAFER_COUNT', 'LIST', List)
PlaceDialog(-2, -2)
end else
end else
ErrorMsg = 'Wafer counter error. Null expected quantity passed in.'
LogData = '' ErrorMsg = 'Wafer counter error. Null expected quantity passed in.'
LogData<1> = OConv(Datetime(), 'DT2/^H') LogData = ''
LogData<2> = @User4 LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<3> = ErrorMsg LogData<2> = @User4
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) LogData<3> = ErrorMsg
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
MsgStruct = ''
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$ MsgStruct = ''
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg) MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
End_Dialog(@Window, '') Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
end End_Dialog(@Window, '')
end
End Event
End Event
Event CBO_WAFER_COUNT.CHANGED(NewData)
Event CBO_WAFER_COUNT.CHANGED(NewData)
Set_Property(@Window:'.PUB_OK', 'ENABLED', (NewData NE '') )
Set_Property(@Window:'.PUB_OK', 'ENABLED', (NewData NE '') )
end event
end event
Event PUB_OK.CLICK()
Event PUB_OK.CLICK()
ExpectedQty = Get_Property(@Window, '@EXPECTED_QTY')
WaferCount = Get_Property(@Window:'.CBO_WAFER_COUNT', 'TEXT') ExpectedQty = Get_Property(@Window, '@EXPECTED_QTY')
If ExpectedQty EQ WaferCount then WaferCount = Get_Property(@Window:'.CBO_WAFER_COUNT', 'TEXT')
LogData = '' If ExpectedQty EQ WaferCount then
LogData<1> = OConv(Datetime(), 'DT2/^H') LogData = ''
LogData<2> = @User4 LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<3> = 'Expected quantity equals entered quantity. Proceeding...' LogData<2> = @User4
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) LogData<3> = 'Expected quantity equals entered quantity. Proceeding...'
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
End_Dialog(@Window, WaferCount)
end else End_Dialog(@Window, WaferCount)
ErrorMsg = 'Wafer counter error. Expected quantity "':ExpectedQty:'" does not match entered quantity "':WaferCount:'".' end else
LogData = '' ErrorMsg = 'Wafer counter error. Expected quantity "':ExpectedQty:'" does not match entered quantity "':WaferCount:'".'
LogData<1> = OConv(Datetime(), 'DT2/^H') LogData = ''
LogData<2> = @User4 LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<3> = ErrorMsg LogData<2> = @User4
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) LogData<3> = ErrorMsg
MsgStruct = '' Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$ MsgStruct = ''
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg) MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
end Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
end
end event
end event
Event PUB_CANCEL.CLICK()
Event PUB_CANCEL.CLICK()
LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H') LogData = ''
LogData<2> = @User4 LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<3> = 'Manual verification process canceled' LogData<2> = @User4
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) LogData<3> = 'Manual verification process canceled'
End_Dialog(@Window, '') Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
End_Dialog(@Window, '')
end event
end event

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -486,6 +486,17 @@ AddTransaction:
ParmList<7> = TransQty ParmList<7> = TransQty
TransRec = TransAction:@FM:ParmList TransRec = TransAction:@FM:ParmList
Case TransAction = 'BATCH_CONV'
ParmList = 1210 ; // Plant
ParmList<2> = Parms[COL2()+1,@RM] ; // Material
ParmList<3> = Parms[COL2()+1,@RM] ; // SAPBatchNo
ParmList<4> = Parms[COL2()+1,@RM] ; // StoreLocFrom
ParmList<5> = Parms[COL2()+1,@RM] ; // StoreLocTo
ParmList<6> = Parms[COL2()+1,@RM] ; // BatchQty
TransRec = TransAction:@FM:ParmList
CASE 1 CASE 1
@ -946,6 +957,23 @@ SendOutbound:
GoSub SendRecord GoSub SendRecord
CASE TransType EQ 'BATCH_CONV'
OutBoundDir = 'BatchConv'
Plant = Transaction[1,@FM]
Material = Transaction[COL2()+1,@FM]
SAPBatchNo = Transaction[COL2()+1,@FM]
StoreLocFrom = Transaction[COL2()+1,@FM]
StoreLocTo = Transaction[COL2()+1,@FM]
TransQty = Transaction[COL2()+1,@FM]
OutRec = Plant:TAB$:Material:TAB$:SAPBatchNo:TAB$:StoreLocFrom:TAB$:StoreLocTo:TAB$:TransQty:CRLF$
RepoID = SAPBatchNo
GoSub SendRecord
CASE 1 CASE 1
END CASE END CASE
@ -1242,4 +1270,3 @@ LogTrans:
RETURN RETURN

View File

@ -1860,8 +1860,8 @@ ChangeFlag:
IF WMOutKey NE '' THEN IF WMOutKey NE '' THEN
WMOParms = 'WM_OUT':@RM:WMOutKey WMOParms = 'WM_OUT':@RM:WMOutKey
WMORec = obj_Tables('ReadRec',WMOParms) * WMORec = obj_Tables('ReadRec',WMOParms)
WMORec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey)
IF Get_Status(errCode) THEN IF Get_Status(errCode) THEN
obj_Tables('UnlockRec',WMOParms) ;* Unlock WM_Out record obj_Tables('UnlockRec',WMOParms) ;* Unlock WM_Out record
RETURN RETURN
@ -1869,8 +1869,9 @@ ChangeFlag:
WMORec<WM_OUT_MAKEUP_BOX$> = Value WMORec<WM_OUT_MAKEUP_BOX$> = Value
WMOParms = FieldStore(WMOParms,@RM,4,0,WMORec) ;* Put record in 4th field of WMORec * WMOParms = FieldStore(WMOParms,@RM,4,0,WMORec) ;* Put record in 4th field of WMORec
obj_Tables('WriteRec',WMOParms) ;* Writes and unlocks WM_OUT Record * obj_Tables('WriteRec',WMOParms) ;* Writes and unlocks WM_OUT Record
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMORec, True$, False$, True$)
END END
END END
@ -5578,4 +5579,3 @@ ExpCOA:
RETURN RETURN

View File

@ -48,21 +48,29 @@ Declare function SRP_Array, SAP_Services, Memory_Services, Database_Services,
Declare function SRP_Math, SRP_Hash, Obj_WO_Mat, Obj_Tables, GaN_Services, Environment_Services, Logging_Services Declare function SRP_Math, SRP_Hash, Obj_WO_Mat, Obj_Tables, GaN_Services, Environment_Services, Logging_Services
Declare function Date_Services, SRP_Datetime Declare function Date_Services, SRP_Datetime
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Packaging\AddCassComp' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\SAP'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS') LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Cass Comp Call Log.csv' LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' BatchConv Call Log.csv'
Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'SAPBatchNo' : @FM : 'SAPTxDTM' : @FM : 'RejectCassFlag' : @FM : 'Message' Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'SAPBatchNo' : @FM : 'StorLocFrom' : @FM : 'StorLocTo' : @FM : 'BatchQty'
objLogAddCassComp = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$) objLogBatchConv = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Shipping\PrintSpectrumLabel' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Packaging\AddCassComp'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS') LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Spectrum Label Printing.csv' LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Cass Comp Call Log.csv'
Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'Message' Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'SAPBatchNo' : @FM : 'SAPTxDTM' : @FM : 'RejectCassFlag' : @FM : 'Message'
objLogPrintSpectrumLabel = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$) objLogAddCassComp = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Shipping\PrintSpectrumLabel'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Spectrum Label Printing.csv'
Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'Message'
objLogPrintSpectrumLabel = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
GoToService else GoToService else
Error_Services('Set', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.') Error_Services('Set', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
@ -76,6 +84,66 @@ Return Response else ''
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------------------------------------------------------
// AddBatchConvTransaction
//
// Adds BatchConv transaction to the outbound SAP queue.
//----------------------------------------------------------------------------------------------------------------------
Service AddBatchConvTransaction(WOMatKey)
ErrorMsg = ''
If WOMatKey NE '' then
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
If Error_Services('NoError') then
SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$>
ReactorType = Xlate('WO_MAT', WOMatKey, 'REACTOR_TYPE', 'X')
If ReactorType EQ 'EPP' then
WMOKey = WOMatRec<WO_MAT_WMO_KEY$>
MakeupBox = Xlate('WM_OUT', WMOKey, WM_OUT_MAKEUP_BOX$, 'X')
end else
MakeupBox = WOMatRec<WO_MAT_MAKEUP_BOX$>
end
If MakeupBox then
// Moving batch from 0500 to 0400
StorLocFrom = '0500'
StorLocTo = '0400'
end else
// Moving batch from 0400 to 0500
StorLocFrom = '0400'
StorLocTo = '0500'
end
WONo = Field(WOMatKey, '*', 1)
Material = Xlate('WO_LOG', WONo, 'EPI_PART_NO', 'X')
BatchQty = Xlate('WO_MAT', WOMatKey, 'CURR_WFR_CNT', 'X')
obj_SAP('AddTransaction', 'BATCH_CONV':@RM:Material:@RM:SAPBatchNo:@RM:StorLocFrom:@RM:StorLocTo:@RM:BatchQty)
LogMessage = ''
ErrCode = ''
If Get_Status(ErrCode) then
LogMessage = 'Error in ':Service:' service. obj_SAP("AddTransaction") call failed. Error code: ':ErrCode
ErrorMsg = LogMessage
end else
LogMessage = 'BatchConv transaction added to outbound SAP queue.'
end
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = WOMatKey
LogData<3> = SAPBatchNo
LogData<4> = StorLocFrom
LogData<5> = StorLocTo
LogData<6> = BatchQty
LogData<7> = LogMessage
Logging_Services('AppendLog', objLogBatchConv, LogData, @RM, @FM)
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end
end else
Error_Services('Add', 'Error in ':Service:' service. Null WOMatKey passed in!')
end
end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// AddCassCompTransaction // AddCassCompTransaction
// //
@ -182,8 +250,6 @@ Service AddCassCompTransaction(WOMatKey)
atParms := SubSuppCd:@RM atParms := SubSuppCd:@RM
atParms := CustPartRev:@RM atParms := CustPartRev:@RM
atParms := MakeupFlag atParms := MakeupFlag
//atParms := MUBatchNo:@RM
//atParms := MUCassQty
Copy = atParms Copy = atParms
Swap @RM with @FM in Copy Swap @RM with @FM in Copy
@ -212,13 +278,14 @@ Service AddCassCompTransaction(WOMatKey)
end service end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// SetInboundPending // SetInboundPending
// //
// Calculates and stores the current inbound pending count for SAP. // Calculates and stores the current inbound pending count for SAP.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service SetInboundPending() Service SetInboundPending()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS') hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then Lock hSysLists, ServiceKeyID then
@ -387,7 +454,7 @@ end service
// Gets the incoming SAP transactions and processes them. // Gets the incoming SAP transactions and processes them.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetInboundTransactions() Service GetInboundTransactions()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS') hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then Lock hSysLists, ServiceKeyID then
SAPHoldStartDateTime = SAP_Services('GetSAPHoldStartDateTime') SAPHoldStartDateTime = SAP_Services('GetSAPHoldStartDateTime')

View File

@ -405,8 +405,3 @@ ClearCursors:
return return

View File

@ -292,3 +292,4 @@ NEXT.FS:
NEXTFS = FS<1,1,1> NEXTFS = FS<1,1,1>
CALL @NEXTFS(Code, FS, Handle, Name, FMC, Record, Status) CALL @NEXTFS(Code, FS, Handle, Name, FMC, Record, Status)
RETURN RETURN

View File

@ -68,7 +68,7 @@ EQU CRLF$ TO \0D0A\
Equ Comma$ to ',' Equ Comma$ to ','
Declare function Database_Services, obj_NCR, obj_SAP, EpiPro_Services, obj_WO_Log, obj_WO_Mat, SRP_Array Declare function Database_Services, obj_NCR, obj_SAP, EpiPro_Services, obj_WO_Log, obj_WO_Mat, SRP_Array
Declare function Environment_Services, Logging_Services Declare function Environment_Services, Logging_Services, MemberOf
Declare subroutine Error_Services, Database_Services, obj_NCR, obj_SAP, SAP_Services, Work_Order_Services Declare subroutine Error_Services, Database_Services, obj_NCR, obj_SAP, SAP_Services, Work_Order_Services
Declare subroutine Material_Services, Logging_Services, obj_Notes Declare subroutine Material_Services, Logging_Services, obj_Notes
@ -133,12 +133,13 @@ return
WFR_STATUS: WFR_STATUS:
WMOKey = @ID WMOKey = @ID
WfrStatus = '' WfrStatus = ''
WMOSlots = Xlate('WM_OUT', WMOKey, 'RDS', 'X') WMOSlots = Xlate('WM_OUT', WMOKey, 'RDS', 'X')
WMOZoneProfile = Xlate('WM_OUT', WMOKey, WM_OUT_ZONE$, 'X') WMOZoneProfile = Xlate('WM_OUT', WMOKey, WM_OUT_ZONE$, 'X')
WMORDSTestKeys = XLATE('WM_OUT', WMOKey, 'CASS_RDS_MET_KEYS', 'X') WMORDSTestKeys = XLATE('WM_OUT', WMOKey, 'CASS_RDS_MET_KEYS', 'X')
for each RDSNo in WMOSlots using @VM setting sPos For each RDSNo in WMOSlots using @VM setting sPos
Result = '' Result = ''
IF RDSNo NE '' then IF RDSNo NE '' then
@ -147,7 +148,7 @@ WFR_STATUS:
//Get the RDS_Test for this slot. //Get the RDS_Test for this slot.
//Find the right RDS Test Key //Find the right RDS Test Key
ThisSlotRDSTestKeys = '' ThisSlotRDSTestKeys = ''
for each RDSTestKey in WMORDSTestKeys using @VM For each RDSTestKey in WMORDSTestKeys using @VM
RDSTestRec = Database_Services('ReadDataRow', 'RDS_TEST', RDSTestKey) RDSTestRec = Database_Services('ReadDataRow', 'RDS_TEST', RDSTestKey)
If RDSTestRec<RDS_TEST_ZONE$> EQ SlotZone AND RDSTestRec<RDS_TEST_RDS_NO$> EQ RDSNo then If RDSTestRec<RDS_TEST_ZONE$> EQ SlotZone AND RDSTestRec<RDS_TEST_RDS_NO$> EQ RDSNo then
ThisSlotRDSTestKeys<1, -1> = RDSTestKey ThisSlotRDSTestKeys<1, -1> = RDSTestKey
@ -156,31 +157,34 @@ WFR_STATUS:
IF ThisSlotRDSTestKeys NE '' then IF ThisSlotRDSTestKeys NE '' then
RDSTestDataEntered = XLATE('RDS_TEST', ThisSlotRDSTestKeys, 'MET_ENTERED', 'X') RDSTestDataEntered = XLATE('RDS_TEST', ThisSlotRDSTestKeys, 'MET_ENTERED', 'X')
If RDSTestDataEntered NE '' then If RDSTestDataEntered NE '' then
Locate False$ in RDSTestDataEntered using @VM setting iPos then Result = 'ULMET' else Locate False$ in RDSTestDataEntered using @VM setting iPos then
MetOutOfSpec = Sum(Xlate('RDS_TEST', ThisSlotRDSTestKeys, 'OUT_OF_SPEC', 'X')) Result = 'ULMET'
If MetOutOfSpec then end else
//Check for an NCR MetOutOfSpec = Sum(Xlate('RDS_TEST', ThisSlotRDSTestKeys, 'OUT_OF_SPEC', 'X'))
SlotNcr = Xlate('WM_OUT', WMOKey, 'WM_OUT_SLOT_NCR', 'X')<1, sPos> If MetOutOfSpec then
If SlotNcr NE '' then //Check for an NCR
MetOutOfSpec = False$ SlotNcr = Xlate('WM_OUT', WMOKey, 'WM_OUT_SLOT_NCR', 'X')<1, sPos>
If SlotNcr NE '' then
MetOutOfSpec = False$
end
end
If MetOutOfSpec then
Result = 'SPEC'
end else
Result = 'ULOAD'
end end
end end
If MetOutOfSpec then end else
Result = 'SPEC' Result = 'ULMET'
end else end
Result = 'ULOAD'
end
end
end else end else
Result = 'ULMET' Result = 'ULOAD'
end end
end else
Result = 'ULOAD'
end end
end WfrStatus<1, sPos> = Result
WfrStatus<1, sPos> = Result Next RDSNo
Next RDSNo ActionFlow = WfrStatus
ActionFlow = WfrStatus
Return Return
// ----- MFS calls ----------------------------------------------------------------------------------------------------- // ----- MFS calls -----------------------------------------------------------------------------------------------------
@ -200,9 +204,6 @@ READ_RECORD:
// OrigFileError = 100 : @FM : KeyID // OrigFileError = 100 : @FM : KeyID
// Status = 0 // Status = 0
// Record = '' // Record = ''
* LockOwner = Record<WM_OUT_LOCKED_BY$>
* If LockOwner EQ '' then Record<WM_OUT_LOCKED_BY$> = @User4
return return
READONLY_RECORD_PRE: READONLY_RECORD_PRE:
@ -263,11 +264,37 @@ WRITE_RECORD_PRE:
SaveRecord = Record SaveRecord = Record
end end
NewMUFlag = Record<WM_OUT_MAKEUP_BOX$>
OrigMUFlag = OrigRecord<WM_OUT_MAKEUP_BOX$>
If NewMUFlag NE OrigMUFlag then
SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$>
SAPTXDtm = WOMatRec<WO_MAT_SAP_TX_DTM$>
AwaitingBatchNo = ( (SAPTXDtm NE '') and (SAPBatchNo EQ '') )
FullBoxReject = (SAPBatchNo[-1, 1] = 'R')
Begin Case
Case AwaitingBatchNo
Error_Services('Add', 'Cassette ineligible to be converted as it is awaiting a batch number from SAP.')
OrigFileError = 104:': Cassette ineligible to be converted as it is awaiting a batch number from SAP.'
Status = 0
Record = ''
ActionFlow = ACTION_STOP$
Case FullBoxReject
Error_Services('Add', 'Cassette ineligible to be converted as it is a full box reject.')
OrigFileError = 104:': Cassette ineligible to be converted as it is a full box reject.'
Status = 0
Record = ''
ActionFlow = ACTION_STOP$
Case Otherwise$
Null
End Case
end
return return
WRITE_RECORD: WRITE_RECORD:
WONo = {WO_NO} WONo = {WO_NO}
SAPBatchNo = {SAP_BATCH_NO}
WMOKey = Name WMOKey = Name
CassNo = Field(WMOKey, '*', 3) CassNo = Field(WMOKey, '*', 3)
@ -288,18 +315,26 @@ WRITE_RECORD:
// Check MAKEUP_BOX flag. If False$ -> True$, then send CASS_COMP SAP transaction // Check MAKEUP_BOX flag. If False$ -> True$, then send CASS_COMP SAP transaction
MakeupBox = Record<WM_OUT_MAKEUP_BOX$> MakeupBox = Record<WM_OUT_MAKEUP_BOX$>
MakeupBoxOrig = OrigRecord<WM_OUT_MAKEUP_BOX$> MakeupBoxOrig = OrigRecord<WM_OUT_MAKEUP_BOX$>
If ( (MakeupBox EQ True$) and (MakeupBoxOrig NE True$) ) then
// Log this event Begin Case
LogData = '' Case ( (MakeupBox EQ True$) and ( (MakeupBoxOrig EQ False$) or (MakeupBoxOrig EQ '') ) and (SAPBatchNo EQ '') )
LogData<1> = LoggingDTM // Intial WIP to MU conversion -> Send CASS_COMP SAP transaction to get a batch number.
LogData<2> = Name // Log this event
LogData<3> = @User4 LogData = ''
LogData<4> = MakeupBox LogData<1> = LoggingDTM
LogData<5> = {WO_MAT_KEY} LogData<2> = Name
Logging_Services('AppendLog', objLog, LogData, @RM, @FM) LogData<3> = @User4
// Send CASS_COMP SAP transaction LogData<4> = MakeupBox
SAP_Services('AddCassCompTransaction', {WO_MAT_KEY}) LogData<5> = {WO_MAT_KEY}
end Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
SAP_Services('AddCassCompTransaction', {WO_MAT_KEY})
Case ( (MakeupBox EQ True$) and ( (MakeupBoxOrig EQ False$) or (MakeupBoxOrig EQ '') ) and (SAPBatchNo NE '') )
// Converting finished goods cassette into MU cassette -> Send BATCH_CONV transaction to SAP.
SAP_Services('AddBatchConvTransaction', {WO_MAT_KEY})
Case ( ( (MakeupBox EQ False$) or (MakeupBox EQ '') ) and (MakeupBoxOrig EQ True$) and (SAPBatchNo NE '') )
// Converting MU cassette into finished goods cassette -> Send BATCH_CONV transaction to SAP.
SAP_Services('AddBatchConvTransaction', {WO_MAT_KEY})
End Case
WOMatKey = {WO_MAT_KEY} WOMatKey = {WO_MAT_KEY}
If MakeupBox then If MakeupBox then
@ -457,88 +492,11 @@ WRITE_RECORD:
return return
DELETE_RECORD_PRE: DELETE_RECORD_PRE:
// Log which user and computer station attempted to delete the record
* LogData = ''
* LogData<1> = LoggingDTM
* LogData<2> = Name
* LogData<3> = @User4
* Logging_Services('AppendLog', objDeleteLog, LogData, @RM, @FM)
*
* // Send an LSL message to FI admins to alert them
* Recipients = Xlate('SEC_GROUPS', 'OI_ADMIN', 'USER', 'X')
* SentFrom = 'SYSTEM'
* Subject = 'WM_OUT Delete Attempt'
* Message = 'An attempt to delete WM_OUT record ':Name:' was made by ':@User4:'.'
* AttachWindow = ''
* AttachKey = ''
* SendToGroup = ''
*
* Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
* obj_Notes('Create',Parms)
// Stop the system from deleting the record
* ActionFlow = ACTION_STOP$
return return
DELETE_RECORD: DELETE_RECORD:
* WorkOrderNo = {WO_NO}
* CassNo = {WO_MAT_CASS_NO}
* WoMatKey = WorkOrderNo : '*' : CassNo
* WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey)
* WMIKey = WoMatRec<WO_MAT_WMI_KEY$>
* WMOKey = WoMatRec<WO_MAT_WMO_KEY$>
* If WMIKey NE '' then
* WMIRec = Database_Services('ReadDataRow', 'WM_IN', WMIKey)
* Database_Services('WriteDataRow', 'WM_IN', WMIKey, WMIRec, True$, True$, False$)
* end
* If WMOKey NE '' then
* WMORec = Database_Services('ReadDataRow', 'WM_OUT', WMOKey)
* Database_Services('WriteDataRow', 'WM_OUT', WMOKey, WMORec, True$, True$, False$)
* end
* // If scrap after FQA and if not shipped -> send to SAP
* SAPOrderNO = XLATE('WO_LOG', WorkOrderNo, WO_LOG_PROD_ORD_NO$, 'X')
* IF SAPOrderNo NE '' THEN
* FQASig = ''
* FQADate = ''
* ReactorType = XLATE('WO_LOG', WorkOrderNo, 'REACT_TYPE', 'X')
*
* IF (ReactorType = 'EPP') OR (ReactorType = 'EpiPro') THEN
* StatusStage = '1MO_QA'
* FQASig = WoMatRec<WO_MAT_SIGNATURE$>
* FQADate = WoMatRec<WO_MAT_SIG_DTM$>
* WMOutKey = Xlate('WO_MAT', WoMatKey, 'WMO_KEY', 'X')
* CassStatus = Xlate('WM_OUT', WMOutKey, 'CURR_STATUS', 'X')
*
* END ELSE
* // Non-EpiPro
* StatusStage = '1QA'
* SigProfile = WoMatRec<WO_MAT_SIG_PROFILE$>
* Signatures = WoMatRec<WO_MAT_SIGNATURE$>
* SigDTMS = WoMatRec<WO_MAT_SIG_DTM$>
* LOCATE StatusStage IN SigProfile USING @VM SETTING Pos THEN
* FQASig = Signatures<1, Pos>
* FQADate = SigDTMS<1, Pos>
* end
* RDSNo = Xlate('WO_MAT', WoMatKey, 'RDS_NO', 'X')
* CassStatus = Xlate('RDS', RDSNo, 'CURR_STATUS', 'X')
* END
*
* If (FQASig NE '') and (FQADate NE '') and (CassStatus NE 'SHIP') and (CassStatus NE 'COMP') then
* // Add transaction
* NCRNo = @ID
* TransQty = Sum(obj_NCR('RejQty',NCRNo:@RM:Record))
* TransQty = TransQty * '-1'
*
* IF TransQty NE 0 THEN
* obj_SAP('AddTransaction','SCRAP_IN':@RM:WorkOrderNo:@RM:CassNo:@RM:TransQty)
* end
* end
* end
return return
@ -587,5 +545,3 @@ Restore_System_Variables:
@FILE.ERROR = OrigFileError @FILE.ERROR = OrigFileError
return return

View File

@ -541,8 +541,34 @@ WRITE_RECORD_PRE:
Record<WO_MAT_SIG_DTM$> = Field(SigDtms, @VM, 1, NumSteps) Record<WO_MAT_SIG_DTM$> = Field(SigDtms, @VM, 1, NumSteps)
SaveRecord = Record SaveRecord = Record
NewMUFlag = Record<WO_MAT_MAKEUP_BOX$>
OrigMUFlag = OrigRecord<WO_MAT_MAKEUP_BOX$>
If NewMUFlag NE OrigMUFlag then
SAPBatchNo = Record<WO_MAT_SAP_BATCH_NO$>
SAPTXDtm = Record<WO_MAT_SAP_TX_DTM$>
AwaitingBatchNo = ( (SAPTXDtm NE '') and (SAPBatchNo EQ '') )
FullBoxReject = (SAPBatchNo[-1, 1] = 'R')
Begin Case
Case AwaitingBatchNo
Error_Services('Add', 'Cassette ineligible to be converted as it is awaiting a batch number from SAP.')
OrigFileError = 104:': Cassette ineligible to be converted as it is awaiting a batch number from SAP.'
Status = 0
Record = ''
ActionFlow = ACTION_STOP$
Case FullBoxReject
Error_Services('Add', 'Cassette ineligible to be converted as it is a full box reject.')
OrigFileError = 104:': Cassette ineligible to be converted as it is a full box reject.'
Status = 0
Record = ''
ActionFlow = ACTION_STOP$
Case Otherwise$
Null
End Case
end
return return
WRITE_RECORD: WRITE_RECORD:
WONo = Field(Name, '*', 1) WONo = Field(Name, '*', 1)
@ -679,17 +705,22 @@ WRITE_RECORD:
Sap_Services('SendUnTransMU', WOMatKeyID, NewSAPBatchNo, MULotFlag) Sap_Services('SendUnTransMU', WOMatKeyID, NewSAPBatchNo, MULotFlag)
end end
// Check MAKEUP_BOX flag. If False$ -> True$, then send CASS_COMP SAP transaction // SAP transactions
MakeupBox = Record<WO_MAT_MAKEUP_BOX$> MakeupBox = Record<WO_MAT_MAKEUP_BOX$>
SAPBatchNo = Trim(Record<WO_MAT_SAP_BATCH_NO$>) SAPBatchNo = Trim(Record<WO_MAT_SAP_BATCH_NO$>)
MakeupBoxOrig = OrigRecord<WO_MAT_MAKEUP_BOX$> MakeupBoxOrig = OrigRecord<WO_MAT_MAKEUP_BOX$>
//second part of below if statement
If ( (MakeupBox EQ True$) and ( (MakeupBoxOrig EQ False$) or (MakeupBoxOrig EQ '') ) and (SAPBatchNo EQ '') ) then Begin Case
// Send CASS_COMP SAP transaction Case ( (MakeupBox EQ True$) and ( (MakeupBoxOrig EQ False$) or (MakeupBoxOrig EQ '') ) and (SAPBatchNo EQ '') )
IF (WONo NE 172758) AND (WONo NE 172739) AND (WONo NE 172767) then // Intial WIP to MU conversion -> Send CASS_COMP SAP transaction to get a batch number.
SAP_Services('AddCassCompTransaction', WOMatKeyID) SAP_Services('AddCassCompTransaction', WOMatKeyID)
end Case ( (MakeupBox EQ True$) and ( (MakeupBoxOrig EQ False$) or (MakeupBoxOrig EQ '') ) and (SAPBatchNo NE '') )
end // Converting finished goods cassette into MU cassette -> Send BATCH_CONV transaction to SAP.
SAP_Services('AddBatchConvTransaction', WOMatKeyID)
Case ( ( (MakeupBox EQ False$) or (MakeupBox EQ '') ) and (MakeupBoxOrig EQ True$) and (SAPBatchNo NE '') )
// Converting MU cassette into finished goods cassette -> Send BATCH_CONV transaction to SAP.
SAP_Services('AddBatchConvTransaction', WOMatKeyID)
End Case
SAPTestFlag = Xlate('APP_INFO', 'SAP_TEST_FLAG', 1, 'X') SAPTestFlag = Xlate('APP_INFO', 'SAP_TEST_FLAG', 1, 'X')
If SAPTestFlag then If SAPTestFlag then