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

View File

@ -454,7 +454,7 @@ Refresh:
END
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)
END ELSE
Set_Property(@WINDOW:'.MAKEUP_BOX','ENABLED',0)
@ -710,16 +710,7 @@ Refresh:
NEXT Line
END
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
@ -1651,8 +1642,6 @@ AddMakeup:
ErrMsg('Slot No ':EmptySlot:' has an NCR.')
RETURN
END
NEXT I
Response = Dialog_Box('NDW_MAKEUP_WAFERS', @Window, WOMatKey)
@ -1660,9 +1649,81 @@ AddMakeup:
Begin Case
Case Response EQ True$
// User requested to convert the current cassette into a makeup box.
AvailMU_WMOKeys = ''
UserResp = Response
MakeupBox = ''
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
If Error_Services('NoError') then
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 ''
// User has cancelled this process.
Return
@ -1686,68 +1747,34 @@ AddMakeup:
Parms<2> = QtyAdj ; // 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
If Proceed NE True$ then Return
Next MuWmoKey
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
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
// 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.'
Msg(@Window, '', 'OK', '', 'Error':@FM:ErrorMessage)
RETURN
end
Return
* * * * * * *
RemMakeup:
@ -1862,8 +1889,8 @@ MakeupClick:
CtrlEnt = @WINDOW:'.MAKEUP_BOX'
CheckValue = Get_Property(CtrlEnt,'DEFPROP')
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
WOMatKey = WONo:'*':CassNo
@ -1877,58 +1904,87 @@ MakeupClick:
OR (MemberOf(@USER4,'OI_ADMIN')) THEN
If WMOKey NE '' then
Parms = ''
Parms<1> = WMOKey ; // 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
Send_Event(CtrlEnt,'GOTFOCUS')
OrgMUPart = XLATE('WM_OUT',WMOKey,'MU_PART_NO','X')
// Log the makeup flag change
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = WONo:'*':ProcStepNo:'*':CassNo
LogData<3> = CheckValue
LogData<4> = @User4
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
Send_Event(@WINDOW,'WRITE') ;************* 6/30/2010
FieldNo = WO_MAT_EPO_MAKEUP_BOX$
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
IF Get_Status(errCode) THEN ErrMsg(errCode)
* 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
WOMatKey = Xlate('WM_OUT', WMOKey, 'WO_MAT_KEY', 'X')
If WOMatKey NE '' then
WOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
If Error_Services('NoError') then
SAPBatchNo = WOMatRec<WO_MAT_SAP_BATCH_NO$>
SAPTXDtm = WOMatRec<WO_MAT_SAP_TX_DTM$>
FullBoxReject = (SAPBatchNo[-1, 1] = 'R')
AwaitingBatchNo = ( (SAPTXDtm NE '') and (SAPBatchNo EQ '') )
Begin Case
Case AwaitingBatchNo
ErrMsg('WARNING: Cassette ineligible to be converted as it is awaiting a batch number from SAP.')
InvalidRequest = True$
Case FullBoxReject
ErrMsg('WARNING: Cassette ineligible to be converted as it is a full box reject.')
InvalidRequest = True$
Case Otherwise$
Null
End Case
If Not(InvalidRequest) then
Parms = ''
Parms<1> = WMOKey ; // 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
Send_Event(CtrlEnt,'GOTFOCUS')
OrgMUPart = XLATE('WM_OUT',WMOKey,'MU_PART_NO','X')
// Log the makeup flag change
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = WONo:'*':ProcStepNo:'*':CassNo
LogData<3> = CheckValue
LogData<4> = @User4
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
Send_Event(@WINDOW,'WRITE') ;************* 6/30/2010
FieldNo = WO_MAT_EPO_MAKEUP_BOX$
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
IF Get_Status(errCode) THEN ErrMsg(errCode)
* 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
InvalidRequest = True$
ErrMsg('WARNING: Error starting wafer counter check. WM_OUT key is missing.')
end
END ELSE
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 else
InvalidRequest = True$
@ -2213,5 +2269,3 @@ RefreshWaferCounterData:
return