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
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

View File

@ -265,9 +265,6 @@ Refresh:
IF WMOKey NE '' THEN
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
Set_Property(@WINDOW:'.EPO_GROUP','ENABLED',0)
END
@ -277,9 +274,6 @@ Refresh:
Set_Property(@WINDOW:'.ASM_GROUP','ENABLED',1)
Set_Property(@WINDOW:'.EPO_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
* QBF buttons
@ -595,8 +589,8 @@ MakeUpClick:
FieldNo = Get_Property(CtrlEnt,'POS')
Send_Event(CtrlEnt,'GOTFOCUS')
CheckValue = Get_Property(CtrlEnt,'DEFPROP')
InvalidRequest = 0
CheckValue = Get_Property(CtrlEnt,'DEFPROP')
InvalidRequest = False$
IF ((WONo NE '') AND (CassNo NE '')) THEN
@ -608,36 +602,79 @@ MakeUpClick:
OR (MemberOf(@USER4,'ENGINEERING')) |
OR (MemberOf(@USER4,'LEAD')) |
OR (MemberOf(@USER4,'OI_ADMIN')) THEN
Set_Property(@WINDOW,'SAVEWARN','0')
Send_Event(@WINDOW,'CLEAR')
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
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 '') )
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
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
InvalidRequest = 1
InvalidRequest = True$
ErrMsg('INFO: This function is limited to authorized users only.')
END
end else
InvalidRequest = 1
InvalidRequest = True$
ErrMsg('INFO: You cannot make changes to the lot while it is on hold.')
end
END ELSE
InvalidRequest = 1
InvalidRequest = True$
ErrMsg('WARNING: Work Order and Cassette information is missing.')
END
IF (InvalidRequest = 1) then
IF (InvalidRequest EQ True$) then
/* Toggle back the checkbox flag */
IF (CheckValue = 0) THEN
Set_Property(CtrlEnt, 'DEFPROP', 1)
IF (CheckValue EQ False$) THEN
Set_Property(CtrlEnt, 'DEFPROP', True$)
END ELSE
Set_Property(CtrlEnt, 'DEFPROP', 0)
Set_Property(CtrlEnt, 'DEFPROP', False$)
END
END
@ -767,10 +804,3 @@ BatchFixit:
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 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 Database_Services, RetStack, Datetime
DECLARE FUNCTION Database_Services, RetStack, Datetime, Error_Services
$INSERT POPUP_EQUATES
$INSERT LOGICAL
@ -72,8 +72,6 @@ EQU COL$USER_ID TO 8
EQU COL$TAGS TO 9
EQU COL$TOOL_ID TO 10
EQU MULTILINE_STYLE$ TO 512 ;* MultiLine Select
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
@ -122,8 +120,6 @@ Create:
IOOptions<6> = 1 ; // Do not clear on write
Set_Property(@WINDOW, "IOOPTIONS", IOOptions)
* get the current style
* Provides compatibility with the existing messaging attachment system
IF Parm1 NE '' THEN
@ -244,13 +240,7 @@ Refresh:
HotLot = 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
Set_Property(@WINDOW:'.ADD_MAKEUP_BUTTON','VISIBLE',1)
Set_Property(@WINDOW:'.REM_MAKEUP_BUTTON','VISIBLE',1)
Set_Property(@WINDOW:'.MU_BOX_LABEL','VISIBLE',0)
END ELSE
IF MakeupBox = 1 THEN
@ -258,12 +248,6 @@ Refresh:
END ELSE
Set_Property(@WINDOW:'.MU_BOX_LABEL','VISIBLE',0)
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
IF HotLot THEN
@ -383,12 +367,6 @@ Refresh:
NEXT COL
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
@ -639,15 +617,13 @@ RecallMat:
END
END
END
NEXT I
NEXT I
FOR I = 1 TO RecallNCRCnt
RecallNCRNo = RecallNCRNos<I>
RecallSlot = RecallSlotNos<I>
SlotCnt = COUNT(SlotInfo<1>, @VM) + (SlotInfo<1> NE '')
SlotInfo = '' ; // Initializing variable here to prevent compilation warning. This code looks unfinished...
SlotCnt = COUNT(SlotInfo<1>, @VM) + (SlotInfo<1> NE '')
FOR N = 1 TO SlotCnt
SlotNo = SlotInfo<1,N>
PrevWaferID = SlotInfo<2,N>
@ -665,7 +641,6 @@ RecallMat:
RETURN
* * * * * * *
NCRKeysDC:
* * * * * * *
@ -775,162 +750,169 @@ AddMakeup:
Parms := 1:@RM ;* ReturnKeys Flag
Parms := 1 ;* Use Reactor Run Table Flag
If 1 then
Response = Dialog_Box('NDW_MAKEUP_WAFERS', @Window, WOMatKey)
Begin Case
Case Response EQ True$
// User requested to convert the current cassette into a makeup box.
SAPBatchNo = Xlate('WO_MAT', WOMatKey, 'SAP_BATCH_NO', 'X')
IF SAPBatchNo then
Msg(@Window , 'Lot has an SAP Batch No. and cannot be turned into a MU lot.')
Return
end
AvailMU_WOMatKeys = ''
UserResp = Response
MakeupBox = ''
Case Response EQ ''
// User has cancelled this process.
Return
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
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
AvailMU_WOMatKeys = DELETE(AvailMU_WOMatKeys,1,Pos,0) ;* Remove current cassette from list
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.
If 0 then
UserResp = Msg(@WINDOW,'','MAKEUP_WAFERS') ;* This box is being made into m/u wafers message
end
IF UserResp = CHAR(27) THEN RETURN
Send_Event(@WINDOW,'WRITE')
FieldNo = WO_MAT_MAKEUP_BOX$
CheckValue = 1
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
* WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
* 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.
Update_Index('WO_MAT', 'MU_PART_NO', False$, True$)
Update_Index('WO_MAT', 'CURR_STATUS', False$, True$)
IF Get_Status(errCode) THEN
ErrMsg(errCode)
end
CurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)
CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS')
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> = ''
CONVERT @FM TO @RM IN EventParms
obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * *
IF Get_Status(errCode) THEN
CALL ErrMsg(ErrCode)
END
END
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WOMatKey)
END
TypeOver = ''
TypeOver<PDISPLAY$> = AvailMU_WOMatKeys
If 0 then
MakeupBox = Popup(@WINDOW,TypeOver,'WO_MAT_MAKEUP')
end
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 = ''
END
END
IF MakeupBox = '' THEN
Post_Event(@Window, 'READ')
RETURN
end
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')
Response = Dialog_Box('NDW_MAKEUP_WAFERS', @Window, WOMatKey)
Begin Case
Case Response EQ True$
// User requested to convert the current cassette into a makeup box.
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 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_WOMatKeys = ''
UserResp = Response
MakeupBox = ''
// 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
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')
FieldNo = WO_MAT_MAKEUP_BOX$
CheckValue = 1
obj_WO_Mat('ChangeFlag',WOMatKey:@RM:FieldNo:@RM:CheckValue)
SlotWaferIDs = Xlate('WO_MAT', WOMatKey, 'SLOT_WAFER_ID', 'X')
Convert @VM to '' in SlotWaferIDs
// Flush/update pending index transactions.
Update_Index('WO_MAT', 'MU_PART_NO', False$, True$)
Update_Index('WO_MAT', 'CURR_STATUS', False$, True$)
IF Get_Status(errCode) THEN
ErrMsg(errCode)
end
CurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)
CurrDTM = OCONV(Date(),'D2/'):' ':OCONV(Time(),'MTS')
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> = ''
CONVERT @FM TO @RM IN EventParms
obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * *
IF Get_Status(errCode) THEN
CALL ErrMsg(ErrCode)
END
END
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WOMatKey)
Post_Event(@Window, 'READ')
RETURN
end else
ErrMsg('WARNING: Error reading WO_MAT record.')
Return
end
Case Response EQ ''
// User has cancelled this process.
Return
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
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
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
// 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).'
@ -1039,35 +1021,59 @@ MakeUpLot:
WOMatKey = WONo:'*':CassNo
OnHold = Xlate('WO_MAT', WOMatKey, 'HOLD', 'X')
If OnHold NE True$ then
IF (MemberOf(@USER4,'MASTER_SCHED')) |
OR (MemberOf(@USER4,'SUPERVISOR')) |
OR (MemberOf(@USER4,'ENGINEERING')) |
OR (MemberOf(@USER4,'LEAD')) |
OR (MemberOf(@USER4,'OI_ADMIN')) THEN
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 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
IF (MemberOf(@USER4,'MASTER_SCHED')) |
OR (MemberOf(@USER4,'SUPERVISOR')) |
OR (MemberOf(@USER4,'ENGINEERING')) |
OR (MemberOf(@USER4,'LEAD')) |
OR (MemberOf(@USER4,'OI_ADMIN')) 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$>
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
If Not(InvalidRequest) then
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 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
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$
@ -1195,6 +1201,3 @@ LogRecord:
return

View File

@ -86,6 +86,19 @@ Event WINDOW.CREATE(CreateParam)
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)
GoSub Setup_OLE_Controls
@ -320,13 +333,22 @@ Setup_OLE_Controls:
Ctrl = @Window : '.OLE_PIC_NO_WAFERS'
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.'
//Set_Property(@Window:'.PUB_OK', 'ENABLED', False$)
IsEpiPro = Get_Property(@Window, '@EPIPRO')
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
Caption = 'Click OK to convert this to a makeup box.'
Caption := @TM : 'Click OK to convert this to a makeup box.'
end
Set_Property(Ctrl, 'OLE.Caption', 'There are no makeup wafers available for this cassette.' : @TM : Caption)
Set_Property(Ctrl, 'OLE.Caption', Caption)
return

View File

@ -1,149 +1,149 @@
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
permission from Infineon.
Name : NDW_Manual_Wafer_Count_Events
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
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
limited to the events which are currently promoted.
If the form needs to call the commuter module directly then the QuickEvent parameters should be
formatted like this:
'@SELF','@EVENT',['@PARAM1','@PARAMx']
Parameters :
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
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
EVENT_SETUP insert
History : (Date, Initials, Notes)
04/12/24 djs Created initial commuter module.
***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler
#window NDW_MANUAL_WAFER_COUNT
$Insert EVENT_SETUP
$Insert APP_INSERTS
$Insert MSG_EQUATES
Equ MSG_WIDTH$ to 650
Equ Comma$ to ','
Declare function Environment_Services, Logging_Services, Datetime
Declare subroutine Set_Property, Logging_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WaferCounter'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Wafer Counter Verify Log.csv'
Headers = 'Logging DTM':@FM:'Logging Text'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
If Event EQ 'OLE' then
Transfer Event to OIEvent
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
end
GoToEvent Event for CtrlEntID
Return EventFlow else EVENT_CONTINUE$
//-----------------------------------------------------------------------------
// EVENT HANDLERS
//-----------------------------------------------------------------------------
Event WINDOW.CREATE(CreateParam)
If CreateParam NE '' then
Set_Property(@Window, '@EXPECTED_QTY', CreateParam)
List = ''
For SlotIndex = 0 to 25
List<SlotIndex + 1> = SlotIndex
Next SlotIndex
Set_Property(@Window:'.CBO_WAFER_COUNT', 'LIST', List)
end else
ErrorMsg = 'Wafer counter error. Null expected quantity passed in.'
LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = @User4
LogData<3> = ErrorMsg
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
MsgStruct = ''
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
End_Dialog(@Window, '')
end
End Event
Event CBO_WAFER_COUNT.CHANGED(NewData)
Set_Property(@Window:'.PUB_OK', 'ENABLED', (NewData NE '') )
end event
Event PUB_OK.CLICK()
ExpectedQty = Get_Property(@Window, '@EXPECTED_QTY')
WaferCount = Get_Property(@Window:'.CBO_WAFER_COUNT', 'TEXT')
If ExpectedQty EQ WaferCount then
LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = @User4
LogData<3> = 'Expected quantity equals entered quantity. Proceeding...'
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
End_Dialog(@Window, WaferCount)
end else
ErrorMsg = 'Wafer counter error. Expected quantity "':ExpectedQty:'" does not match entered quantity "':WaferCount:'".'
LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = @User4
LogData<3> = ErrorMsg
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
MsgStruct = ''
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
end
end event
Event PUB_CANCEL.CLICK()
LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = @User4
LogData<3> = 'Manual verification process canceled'
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
End_Dialog(@Window, '')
end event
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
permission from Infineon.
Name : NDW_Manual_Wafer_Count_Events
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
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
limited to the events which are currently promoted.
If the form needs to call the commuter module directly then the QuickEvent parameters should be
formatted like this:
'@SELF','@EVENT',['@PARAM1','@PARAMx']
Parameters :
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
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
EVENT_SETUP insert
History : (Date, Initials, Notes)
04/12/24 djs Created initial commuter module.
***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler
#window NDW_MANUAL_WAFER_COUNT
$Insert EVENT_SETUP
$Insert APP_INSERTS
$Insert MSG_EQUATES
Equ MSG_WIDTH$ to 650
Equ Comma$ to ','
Declare function Environment_Services, Logging_Services, Datetime
Declare subroutine Set_Property, Logging_Services, PlaceDialog
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WaferCounter'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Wafer Counter Verify Log.csv'
Headers = 'Logging DTM':@FM:'Logging Text'
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
If Event EQ 'OLE' then
Transfer Event to OIEvent
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
end
GoToEvent Event for CtrlEntID
Return EventFlow else EVENT_CONTINUE$
//-----------------------------------------------------------------------------
// EVENT HANDLERS
//-----------------------------------------------------------------------------
Event WINDOW.CREATE(CreateParam)
If CreateParam NE '' then
Set_Property(@Window, '@EXPECTED_QTY', CreateParam)
List = ''
For SlotIndex = 0 to 25
List<SlotIndex + 1> = SlotIndex
Next SlotIndex
Set_Property(@Window:'.CBO_WAFER_COUNT', 'LIST', List)
PlaceDialog(-2, -2)
end else
ErrorMsg = 'Wafer counter error. Null expected quantity passed in.'
LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = @User4
LogData<3> = ErrorMsg
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
MsgStruct = ''
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
End_Dialog(@Window, '')
end
End Event
Event CBO_WAFER_COUNT.CHANGED(NewData)
Set_Property(@Window:'.PUB_OK', 'ENABLED', (NewData NE '') )
end event
Event PUB_OK.CLICK()
ExpectedQty = Get_Property(@Window, '@EXPECTED_QTY')
WaferCount = Get_Property(@Window:'.CBO_WAFER_COUNT', 'TEXT')
If ExpectedQty EQ WaferCount then
LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = @User4
LogData<3> = 'Expected quantity equals entered quantity. Proceeding...'
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
End_Dialog(@Window, WaferCount)
end else
ErrorMsg = 'Wafer counter error. Expected quantity "':ExpectedQty:'" does not match entered quantity "':WaferCount:'".'
LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = @User4
LogData<3> = ErrorMsg
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
MsgStruct = ''
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
end
end event
Event PUB_CANCEL.CLICK()
LogData = ''
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<2> = @User4
LogData<3> = 'Manual verification process canceled'
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
End_Dialog(@Window, '')
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
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
@ -946,6 +957,23 @@ SendOutbound:
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
END CASE
@ -1242,4 +1270,3 @@ LogTrans:
RETURN

View File

@ -1860,8 +1860,8 @@ ChangeFlag:
IF WMOutKey NE '' THEN
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
obj_Tables('UnlockRec',WMOParms) ;* Unlock WM_Out record
RETURN
@ -1869,8 +1869,9 @@ ChangeFlag:
WMORec<WM_OUT_MAKEUP_BOX$> = Value
WMOParms = FieldStore(WMOParms,@RM,4,0,WMORec) ;* Put record in 4th field of WMORec
obj_Tables('WriteRec',WMOParms) ;* Writes and unlocks WM_OUT Record
* WMOParms = FieldStore(WMOParms,@RM,4,0,WMORec) ;* Put record in 4th field of WMORec
* obj_Tables('WriteRec',WMOParms) ;* Writes and unlocks WM_OUT Record
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMORec, True$, False$, True$)
END
END
@ -5578,4 +5579,3 @@ ExpCOA:
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 Date_Services, SRP_Datetime
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Packaging\AddCassComp'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Cass Comp Call Log.csv'
Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'SAPBatchNo' : @FM : 'SAPTxDTM' : @FM : 'RejectCassFlag' : @FM : 'Message'
objLogAddCassComp = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\SAP'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' BatchConv Call Log.csv'
Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'SAPBatchNo' : @FM : 'StorLocFrom' : @FM : 'StorLocTo' : @FM : 'BatchQty'
objLogBatchConv = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
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
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Packaging\AddCassComp'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Cass Comp Call Log.csv'
Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'SAPBatchNo' : @FM : 'SAPTxDTM' : @FM : 'RejectCassFlag' : @FM : 'Message'
objLogAddCassComp = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
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
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
//
@ -182,8 +250,6 @@ Service AddCassCompTransaction(WOMatKey)
atParms := SubSuppCd:@RM
atParms := CustPartRev:@RM
atParms := MakeupFlag
//atParms := MUBatchNo:@RM
//atParms := MUCassQty
Copy = atParms
Swap @RM with @FM in Copy
@ -212,13 +278,14 @@ Service AddCassCompTransaction(WOMatKey)
end service
//----------------------------------------------------------------------------------------------------------------------
// SetInboundPending
//
// Calculates and stores the current inbound pending count for SAP.
//----------------------------------------------------------------------------------------------------------------------
Service SetInboundPending()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then
@ -387,7 +454,7 @@ end service
// Gets the incoming SAP transactions and processes them.
//----------------------------------------------------------------------------------------------------------------------
Service GetInboundTransactions()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then
SAPHoldStartDateTime = SAP_Services('GetSAPHoldStartDateTime')

View File

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

View File

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

View File

@ -68,7 +68,7 @@ EQU CRLF$ TO \0D0A\
Equ Comma$ to ','
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 Material_Services, Logging_Services, obj_Notes
@ -133,12 +133,13 @@ return
WFR_STATUS:
WMOKey = @ID
WfrStatus = ''
WMOSlots = Xlate('WM_OUT', WMOKey, 'RDS', 'X')
WMOZoneProfile = Xlate('WM_OUT', WMOKey, WM_OUT_ZONE$, '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 = ''
IF RDSNo NE '' then
@ -147,7 +148,7 @@ WFR_STATUS:
//Get the RDS_Test for this slot.
//Find the right RDS Test Key
ThisSlotRDSTestKeys = ''
for each RDSTestKey in WMORDSTestKeys using @VM
For each RDSTestKey in WMORDSTestKeys using @VM
RDSTestRec = Database_Services('ReadDataRow', 'RDS_TEST', RDSTestKey)
If RDSTestRec<RDS_TEST_ZONE$> EQ SlotZone AND RDSTestRec<RDS_TEST_RDS_NO$> EQ RDSNo then
ThisSlotRDSTestKeys<1, -1> = RDSTestKey
@ -156,31 +157,34 @@ WFR_STATUS:
IF ThisSlotRDSTestKeys NE '' then
RDSTestDataEntered = XLATE('RDS_TEST', ThisSlotRDSTestKeys, 'MET_ENTERED', 'X')
If RDSTestDataEntered NE '' then
Locate False$ in RDSTestDataEntered using @VM setting iPos then Result = 'ULMET' else
MetOutOfSpec = Sum(Xlate('RDS_TEST', ThisSlotRDSTestKeys, 'OUT_OF_SPEC', 'X'))
If MetOutOfSpec then
//Check for an NCR
SlotNcr = Xlate('WM_OUT', WMOKey, 'WM_OUT_SLOT_NCR', 'X')<1, sPos>
If SlotNcr NE '' then
MetOutOfSpec = False$
Locate False$ in RDSTestDataEntered using @VM setting iPos then
Result = 'ULMET'
end else
MetOutOfSpec = Sum(Xlate('RDS_TEST', ThisSlotRDSTestKeys, 'OUT_OF_SPEC', 'X'))
If MetOutOfSpec then
//Check for an NCR
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
If MetOutOfSpec then
Result = 'SPEC'
end else
Result = 'ULOAD'
end
end
end else
Result = 'ULMET'
end
end else
Result = 'ULMET'
end
end else
Result = 'ULOAD'
Result = 'ULOAD'
end
end
end
WfrStatus<1, sPos> = Result
Next RDSNo
ActionFlow = WfrStatus
WfrStatus<1, sPos> = Result
Next RDSNo
ActionFlow = WfrStatus
Return
// ----- MFS calls -----------------------------------------------------------------------------------------------------
@ -200,9 +204,6 @@ READ_RECORD:
// OrigFileError = 100 : @FM : KeyID
// Status = 0
// Record = ''
* LockOwner = Record<WM_OUT_LOCKED_BY$>
* If LockOwner EQ '' then Record<WM_OUT_LOCKED_BY$> = @User4
return
READONLY_RECORD_PRE:
@ -263,11 +264,37 @@ WRITE_RECORD_PRE:
SaveRecord = Record
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
WRITE_RECORD:
WONo = {WO_NO}
SAPBatchNo = {SAP_BATCH_NO}
WMOKey = Name
CassNo = Field(WMOKey, '*', 3)
@ -288,18 +315,26 @@ WRITE_RECORD:
// Check MAKEUP_BOX flag. If False$ -> True$, then send CASS_COMP SAP transaction
MakeupBox = Record<WM_OUT_MAKEUP_BOX$>
MakeupBoxOrig = OrigRecord<WM_OUT_MAKEUP_BOX$>
If ( (MakeupBox EQ True$) and (MakeupBoxOrig NE True$) ) then
// Log this event
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Name
LogData<3> = @User4
LogData<4> = MakeupBox
LogData<5> = {WO_MAT_KEY}
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
// Send CASS_COMP SAP transaction
SAP_Services('AddCassCompTransaction', {WO_MAT_KEY})
end
Begin Case
Case ( (MakeupBox EQ True$) and ( (MakeupBoxOrig EQ False$) or (MakeupBoxOrig EQ '') ) and (SAPBatchNo EQ '') )
// Intial WIP to MU conversion -> Send CASS_COMP SAP transaction to get a batch number.
// Log this event
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Name
LogData<3> = @User4
LogData<4> = MakeupBox
LogData<5> = {WO_MAT_KEY}
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}
If MakeupBox then
@ -457,88 +492,11 @@ WRITE_RECORD:
return
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
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
@ -587,5 +545,3 @@ Restore_System_Variables:
@FILE.ERROR = OrigFileError
return

View File

@ -541,8 +541,34 @@ WRITE_RECORD_PRE:
Record<WO_MAT_SIG_DTM$> = Field(SigDtms, @VM, 1, NumSteps)
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
WRITE_RECORD:
WONo = Field(Name, '*', 1)
@ -679,17 +705,22 @@ WRITE_RECORD:
Sap_Services('SendUnTransMU', WOMatKeyID, NewSAPBatchNo, MULotFlag)
end
// Check MAKEUP_BOX flag. If False$ -> True$, then send CASS_COMP SAP transaction
// SAP transactions
MakeupBox = Record<WO_MAT_MAKEUP_BOX$>
SAPBatchNo = Trim(Record<WO_MAT_SAP_BATCH_NO$>)
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
// Send CASS_COMP SAP transaction
IF (WONo NE 172758) AND (WONo NE 172739) AND (WONo NE 172767) then
SAP_Services('AddCassCompTransaction', WOMatKeyID)
end
end
Begin Case
Case ( (MakeupBox EQ True$) and ( (MakeupBoxOrig EQ False$) or (MakeupBoxOrig EQ '') ) and (SAPBatchNo EQ '') )
// Intial WIP to MU conversion -> Send CASS_COMP SAP transaction to get a batch number.
SAP_Services('AddCassCompTransaction', WOMatKeyID)
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', 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')
If SAPTestFlag then