implemented support for BatchConv SAP interface
This commit is contained in:
parent
fdb12f206a
commit
95be15df83
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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)
|
||||
@ -711,15 +711,6 @@ Refresh:
|
||||
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.
|
||||
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,48 +1747,11 @@ 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
|
||||
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
|
||||
@ -1741,6 +1765,8 @@ AddMakeup:
|
||||
obj_Appwindow('LoadFormKeys',@WINDOW:@RM:WMOutKey)
|
||||
|
||||
RETURN
|
||||
End Case
|
||||
|
||||
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.'
|
||||
@ -1748,6 +1774,7 @@ AddMakeup:
|
||||
RETURN
|
||||
end
|
||||
|
||||
Return
|
||||
|
||||
* * * * * * *
|
||||
RemMakeup:
|
||||
@ -1863,7 +1890,7 @@ MakeupClick:
|
||||
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,6 +1904,26 @@ MakeupClick:
|
||||
OR (MemberOf(@USER4,'OI_ADMIN')) THEN
|
||||
|
||||
If WMOKey NE '' then
|
||||
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.
|
||||
@ -1922,13 +1969,22 @@ MakeupClick:
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
@ -596,7 +590,7 @@ MakeUpClick:
|
||||
|
||||
Send_Event(CtrlEnt,'GOTFOCUS')
|
||||
CheckValue = Get_Property(CtrlEnt,'DEFPROP')
|
||||
InvalidRequest = 0
|
||||
InvalidRequest = False$
|
||||
|
||||
IF ((WONo NE '') AND (CassNo NE '')) THEN
|
||||
|
||||
@ -609,35 +603,78 @@ MakeUpClick:
|
||||
OR (MemberOf(@USER4,'LEAD')) |
|
||||
OR (MemberOf(@USER4,'OI_ADMIN')) THEN
|
||||
|
||||
Set_Property(@WINDOW,'SAVEWARN','0')
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
@ -641,12 +619,10 @@ RecallMat:
|
||||
END
|
||||
NEXT I
|
||||
|
||||
|
||||
|
||||
FOR I = 1 TO RecallNCRCnt
|
||||
RecallNCRNo = RecallNCRNos<I>
|
||||
RecallSlot = RecallSlotNos<I>
|
||||
|
||||
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>
|
||||
@ -665,7 +641,6 @@ RecallMat:
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
* * * * * * *
|
||||
NCRKeysDC:
|
||||
* * * * * * *
|
||||
@ -775,47 +750,55 @@ 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.')
|
||||
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 = ''
|
||||
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')
|
||||
@ -829,23 +812,8 @@ AddMakeup:
|
||||
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')
|
||||
|
||||
@ -853,15 +821,7 @@ AddMakeup:
|
||||
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
|
||||
|
||||
@ -901,36 +861,58 @@ AddMakeup:
|
||||
|
||||
obj_AppWindow('LoadFormKeys',@WINDOW:@RM:WOMatKey)
|
||||
|
||||
END
|
||||
Post_Event(@Window, 'READ')
|
||||
RETURN
|
||||
|
||||
TypeOver = ''
|
||||
TypeOver<PDISPLAY$> = AvailMU_WOMatKeys
|
||||
end else
|
||||
ErrMsg('WARNING: Error reading WO_MAT record.')
|
||||
Return
|
||||
end
|
||||
|
||||
If 0 then
|
||||
MakeupBox = Popup(@WINDOW,TypeOver,'WO_MAT_MAKEUP')
|
||||
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
|
||||
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')
|
||||
|
||||
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).'
|
||||
@ -1044,6 +1026,25 @@ MakeUpLot:
|
||||
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 = ''
|
||||
@ -1065,9 +1066,14 @@ MakeUpLot:
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
Caption = 'Click OK to convert this to a makeup box.'
|
||||
MakeupBox = Xlate('WO_MAT', ThisWOMatKey, 'MAKEUP_BOX', 'X')
|
||||
end
|
||||
Set_Property(Ctrl, 'OLE.Caption', 'There are no makeup wafers available for this cassette.' : @TM : Caption)
|
||||
|
||||
Caption = 'There are no makeup wafers available for this cassette.'
|
||||
If MakeupBox then
|
||||
Set_Property(@Window:'.PUB_OK', 'ENABLED', False$)
|
||||
end else
|
||||
Caption := @TM : 'Click OK to convert this to a makeup box.'
|
||||
end
|
||||
Set_Property(Ctrl, 'OLE.Caption', Caption)
|
||||
|
||||
return
|
||||
|
||||
|
@ -41,7 +41,7 @@ Equ MSG_WIDTH$ to 650
|
||||
Equ Comma$ to ','
|
||||
|
||||
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'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
@ -82,6 +82,7 @@ Event WINDOW.CREATE(CreateParam)
|
||||
List<SlotIndex + 1> = SlotIndex
|
||||
Next SlotIndex
|
||||
Set_Property(@Window:'.CBO_WAFER_COUNT', 'LIST', List)
|
||||
PlaceDialog(-2, -2)
|
||||
|
||||
end else
|
||||
|
||||
@ -146,4 +147,3 @@ Event PUB_CANCEL.CLICK()
|
||||
|
||||
end event
|
||||
|
||||
|
||||
|
@ -598,4 +598,3 @@ ClearForm:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -487,6 +487,17 @@ AddTransaction:
|
||||
|
||||
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
|
||||
|
||||
ErrorMsg = 'Unknown TransAction ':QUOTE(TransAction):' passed to routine. (':METHOD:')'
|
||||
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -48,6 +48,14 @@ 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\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\Packaging\AddCassComp'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
@ -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,6 +278,7 @@ Service AddCassCompTransaction(WOMatKey)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// SetInboundPending
|
||||
//
|
||||
|
@ -405,8 +405,3 @@ ClearCursors:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -292,3 +292,4 @@ NEXT.FS:
|
||||
NEXTFS = FS<1,1,1>
|
||||
CALL @NEXTFS(Code, FS, Handle, Name, FMC, Record, Status)
|
||||
RETURN
|
||||
|
||||
|
@ -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,7 +157,9 @@ 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
|
||||
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
|
||||
@ -179,8 +182,9 @@ WFR_STATUS:
|
||||
end
|
||||
end
|
||||
WfrStatus<1, sPos> = Result
|
||||
Next RDSNo
|
||||
ActionFlow = WfrStatus
|
||||
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,7 +315,10 @@ 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
|
||||
|
||||
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
|
||||
@ -297,9 +327,14 @@ WRITE_RECORD:
|
||||
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
|
||||
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
|
||||
@ -458,87 +493,10 @@ 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
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
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)
|
||||
end
|
||||
end
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user