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)
@ -711,15 +711,6 @@ Refresh:
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,61 +1747,26 @@ 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.'
@ -1748,6 +1774,7 @@ AddMakeup:
RETURN RETURN
end end
Return
* * * * * * * * * * * * * *
RemMakeup: RemMakeup:
@ -1863,7 +1890,7 @@ MakeupClick:
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$
Null
End Case
Send_Event(@WINDOW,'WRITE') ;************* 6/30/2010 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)
FieldNo = WO_MAT_EPO_MAKEUP_BOX$ Send_Event(@WINDOW,'WRITE') ;************* 6/30/2010
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue) FieldNo = WO_MAT_EPO_MAKEUP_BOX$
IF Get_Status(errCode) THEN ErrMsg(errCode) obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
* Added 10/11/2010 JCH IF Get_Status(errCode) THEN ErrMsg(errCode)
NewMUPart = XLATE('WM_OUT',WMOKey,'MU_PART_NO','X')
IndexTransactionRow = 'MU_PART_NO':@FM:WMOKey:@FM:OrgMUPart:@FM:NewMUPart:@FM * Added 10/11/2010 JCH
OPEN "!WM_OUT" TO BangTable THEN NewMUPart = XLATE('WM_OUT',WMOKey,'MU_PART_NO','X')
LOCK BangTable, 0 THEN IndexTransactionRow = 'MU_PART_NO':@FM:WMOKey:@FM:OrgMUPart:@FM:NewMUPart:@FM
READ PendingTrans FROM BangTable, 0 ELSE PendingTrans = '0':@FM OPEN "!WM_OUT" TO BangTable THEN
PendingTrans := IndexTransactionRow LOCK BangTable, 0 THEN
WRITE PendingTrans ON BangTable, 0 ELSE READ PendingTrans FROM BangTable, 0 ELSE PendingTrans = '0':@FM
ErrMsg('Unable to write index transaction to !WM_OUT. ':WMOutKey) PendingTrans := IndexTransactionRow
END WRITE PendingTrans ON BangTable, 0 ELSE
UNLOCK BangTable, 0 ELSE ErrMsg('Unable to Unlock !WM_OUT while adding index transaction. ':WMOutKey) ErrMsg('Unable to write index transaction to !WM_OUT. ':WMOutKey)
END ELSE END
ErrMsg('Unable to Lock !WM_OUT to add index transaction. ':WMOutKey) UNLOCK BangTable, 0 ELSE ErrMsg('Unable to Unlock !WM_OUT while adding index transaction. ':WMOutKey)
END END ELSE
END ELSE ErrMsg('Unable to Lock !WM_OUT to add index transaction. ':WMOutKey)
ErrMsg('Unable to Open !WM_OUT to add index transaction. ':WMOutKey) END
END END ELSE
* End of 10/11/2010 update ErrMsg('Unable to Open !WM_OUT to add index transaction. ':WMOutKey)
end else END
InvalidRequest = True$ * End of 10/11/2010 update
end 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
@ -609,35 +603,78 @@ MakeUpClick:
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$>
SAPTXDtm = WOMatRec<WO_MAT_SAP_TX_DTM$>
AwaitingBatchNo = ( (SAPTXDtm NE '') and (SAPBatchNo EQ '') )
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.')
Case FullBoxReject
InvalidRequest = True$
ErrMsg('WARNING: Cassette ineligible to be converted as it is a full box reject.')
Case Otherwise$
Null
End Case
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue) 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 Get_Status(errCode) THEN If LotId NE '' then
ErrMsg(errCode) Parms = ''
END 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
@ -641,13 +619,11 @@ RecallMat:
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,161 +750,168 @@ 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
CurrMuWfrCnt = obj_WO_Mat('CurrWaferCnt', MuWoMatKey)
If MuWfrsNeeded GT CurrMuWfrCnt then
QtyAdj = CurrMuWfrCnt
MuWfrsNeeded -= CurrMuWfrCnt
end
Parms = ''
Parms<1> = MuRdsNo ; // Cassette to verify wafer count of.
Parms<2> = QtyAdj ; // Wafer count adjustment - Number of makeup wafers being used.
Parms<3> = 'MU' ; // Wafer counter tool location
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
If Proceed NE True$ then return
Next MuWoMatKey
end
End Case
If Response EQ True$ then
// User requested to convert the current cassette into a makeup box.
// Verify the quantity before proceeding.
RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
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 NE True$ then return
end else
ErrMsg('Error starting wafer counter check. RDS No is missing.')
end
end
end else
AvailMU_WOMatKeys = obj_MUWafers('AvailWafers',WONo:@RM:@RM:1:@RM:1)
end
LOCATE WOMatKey IN AvailMU_WOMatKeys USING @VM SETTING Pos THEN Begin Case
AvailMU_WOMatKeys = DELETE(AvailMU_WOMatKeys,1,Pos,0) ;* Remove current cassette from list Case Response EQ 1
END 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 AvailMU_WOMatKeys = '' THEN 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
RDSNo = Get_Property(@Window : '.RDS_NO', 'TEXT') ; // Get the RDS No now before the WRITE in case it is needed to toggle the index. AvailMU_WOMatKeys = ''
If 0 then UserResp = Response
UserResp = Msg(@WINDOW,'','MAKEUP_WAFERS') ;* This box is being made into m/u wafers message MakeupBox = ''
end
IF UserResp = CHAR(27) THEN RETURN // User requested to convert the current cassette into a makeup box.
// Verify the quantity before proceeding.
RDSNo = Get_Property(@Window:'.RDS_NO', 'TEXT')
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 NE True$ then return
end else
ErrMsg('Error starting wafer counter check. RDS No is missing.')
end
Send_Event(@WINDOW,'WRITE') RDSNo = Get_Property(@Window : '.RDS_NO', 'TEXT') ; // Get the RDS No now before the WRITE in case it is needed to toggle the index.
FieldNo = WO_MAT_MAKEUP_BOX$ Send_Event(@WINDOW,'WRITE')
CheckValue = 1
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue) FieldNo = WO_MAT_MAKEUP_BOX$
* WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey) CheckValue = 1
* WOMatRow<12> = '' ; // Clear the RDS No so the index will be forced to recalculate.
* WOMatRow<23> = False$ ; // Clear the MakeUp box flag so the index will be forced to recalculate.
* Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRow, True$, False$, True$)
* 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.
* WOMatRec = WOMatRow
//GoSub LogRecord
//Database_Services('WriteDataRow', 'WO_MAT', WOMatKey, WOMatRow, True$, False$, True$)
SlotWaferIDs = Xlate('WO_MAT', WOMatKey, 'SLOT_WAFER_ID', 'X')
Convert @VM to '' in SlotWaferIDs
// Flush/update pending index transactions. obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
Update_Index('WO_MAT', 'MU_PART_NO', False$, True$)
Update_Index('WO_MAT', 'CURR_STATUS', False$, True$)
IF Get_Status(errCode) THEN SlotWaferIDs = Xlate('WO_MAT', WOMatKey, 'SLOT_WAFER_ID', 'X')
ErrMsg(errCode) Convert @VM to '' in SlotWaferIDs
end
CurrStatus = obj_WO_Mat('CurrStatus',WOMatKey) // Flush/update pending index transactions.
CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS') Update_Index('WO_MAT', 'MU_PART_NO', False$, True$)
Update_Index('WO_MAT', 'CURR_STATUS', False$, True$)
IF CurrStatus = 'RTU' THEN IF Get_Status(errCode) THEN
EventParms = '' ErrMsg(errCode)
EventParms<COL$LOG_FILE> = 'WO_MAT' end
EventParms<COL$LOG_DTM> = CurrDTM
EventParms<COL$ACTION> = 'RTU'
EventParms<COL$WH_CD> = 'CR'
EventParms<COL$LOC_CD> = 'MU'
EventParms<COL$WO_NOS> = WONo
EventParms<COL$CASS_NOS> = CassNo
EventParms<COL$USER_ID> = @USER4
EventParms<COL$TAGS> = ''
EventParms<COL$TOOL_ID> = ''
CONVERT @FM TO @RM IN EventParms CurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)
CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS')
obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * * IF CurrStatus = 'RTU' THEN
EventParms = ''
EventParms<COL$LOG_FILE> = 'WO_MAT'
EventParms<COL$LOG_DTM> = CurrDTM
EventParms<COL$ACTION> = 'RTU'
EventParms<COL$WH_CD> = 'CR'
EventParms<COL$LOC_CD> = 'MU'
EventParms<COL$WO_NOS> = WONo
EventParms<COL$CASS_NOS> = CassNo
EventParms<COL$USER_ID> = @USER4
EventParms<COL$TAGS> = ''
EventParms<COL$TOOL_ID> = ''
IF Get_Status(errCode) THEN CONVERT @FM TO @RM IN EventParms
CALL ErrMsg(ErrCode)
END
END obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * *
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WOMatKey) IF Get_Status(errCode) THEN
CALL ErrMsg(ErrCode)
END
END END
TypeOver = '' obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WOMatKey)
TypeOver<PDISPLAY$> = AvailMU_WOMatKeys
If 0 then Post_Event(@Window, 'READ')
MakeupBox = Popup(@WINDOW,TypeOver,'WO_MAT_MAKEUP') RETURN
end
IF NOT(MemberOf(@USER4,'OI_ADMIN')) THEN end else
IF MakeupBox NE AvailMU_WOMatKeys<1,1> THEN ErrMsg('WARNING: Error reading WO_MAT record.')
ErrMsg('Only the first available cassette can be used for makeup.') Return
MakeupBox = '' end
END
END
IF MakeupBox = '' THEN
Post_Event(@Window, 'READ')
RETURN
end
Valid = Dialog_Box('NDW_VERIFY_USER', @Window, @User4) Case Response EQ ''
// User has cancelled this process.
Return
IF NOT(Valid) THEN RETURN ;* User is not worthy or can't type Case Otherwise$
// User has selected a makeup box to use and backfill.
AvailMU_WOMatKeys = Response
MakeupBox = Response
MuWfrsNeeded = SelCnt
If AvailMU_WOMatKeys NE '' then
// Wafer counter check - Account for the possibility of selecting more than one makeup box.
For each MuWoMatKey in AvailMU_WOMatKeys using @FM
MuRdsNo = Xlate('WO_MAT', MuWoMatKey, 'RDS_NO', 'X')
QtyAdj = MuWfrsNeeded
CurrMuWfrCnt = obj_WO_Mat('CurrWaferCnt', MuWoMatKey)
If MuWfrsNeeded GT CurrMuWfrCnt then
QtyAdj = CurrMuWfrCnt
MuWfrsNeeded -= CurrMuWfrCnt
end
Parms = ''
Parms<1> = MuRdsNo ; // Cassette to verify wafer count of.
Parms<2> = QtyAdj ; // Wafer count adjustment - Number of makeup wafers being used.
Parms<3> = 'MU' ; // Wafer counter tool location
Proceed = Dialog_Box('NDW_WAFER_COUNTER', @Window, Parms)
If Proceed NE True$ then return
Next MuWoMatKey
end
Send_Event(@WINDOW,'WRITE') IF NOT(MemberOf(@USER4,'OI_ADMIN')) THEN
IF MakeupBox NE AvailMU_WOMatKeys<1,1> THEN
ErrMsg('Only the first available cassette can be used for makeup.')
MakeupBox = ''
return
END
END
obj_WO_Mat('AddMakeupWafers',WOMatKey:@RM:EmptySlots:@RM:MakeupBox) 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')
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.
@ -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

@ -41,7 +41,7 @@ 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/')
@ -82,6 +82,7 @@ Event WINDOW.CREATE(CreateParam)
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
@ -146,4 +147,3 @@ Event PUB_CANCEL.CLICK()
end event end event

View File

@ -598,4 +598,3 @@ ClearForm:
return return

File diff suppressed because it is too large Load Diff

View File

@ -487,6 +487,17 @@ AddTransaction:
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
ErrorMsg = 'Unknown TransAction ':QUOTE(TransAction):' passed to routine. (':METHOD:')' ErrorMsg = 'Unknown TransAction ':QUOTE(TransAction):' passed to routine. (':METHOD:')'
@ -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,6 +278,7 @@ Service AddCassCompTransaction(WOMatKey)
end service end service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// SetInboundPending // SetInboundPending
// //

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
Result = 'ULOAD'
end
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
@ -458,87 +493,10 @@ 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