Merged PR 13813: Lot void routines enhancement

Lot void routines enhancement

Related work items: #110807
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO) 2025-03-27 18:51:25 +01:00
parent 507c6bffba
commit b76db6bc72
22 changed files with 3950 additions and 2447 deletions

View File

@ -1,415 +1,420 @@
Compile function Automated_Workflow_Services(@Service, @Params)
/*
Initial Author: Jonathan Ouellette
This service module has a catalogued list of functions to quickly and easily perform certain functions related to lot
processing.
1. CreateAWO - Imitates the process of getting data from SAP and processing the WO start in OI.
2. RouteWO - Imitates routing of a WO, AKA selecting a ProdVer and Assigning the WO to a reactor Type
3. PrescribeWafers - Imitates creating the child lots for a WO, AKA creating WO_MAT records
4. ReleaseCassettes - Assigns raw substrates to the WO_MAT records. RDS for non-epipro is created at this point.
5. PerformPTI - Imitates Receiving operator moving the lot into the fab.
6. Perform1VER - Performs the 1VER operation for an RDS.
7. PerformLoad - Performs the load operation for an RDS.
8. PerformUnload - Performs the unload operation for a non-epipro RDS.
9. EnterRecipeParms - Used in conjunction with PerformLoad. Used to enter the parameters for the Reactor Recipe upon load
typically this is the first load of a Work Order.
10. VerifyRecipeParms - Used in conjunction with PerformLoad. Used to verify the current recipe setpoints for an RDS load.
*/
#pragma precomp SRP_PreCompiler
Declare function Gan_Services, Obj_Notes_Sent, msg, Check_Notes, Jonathan_Services, Database_Services, SRP_Datetime
Declare function Lsl_Users_Services, SRP_Time, RList, Error_Services, Obj_Wo_Mat, Pm_Services, Date_Services, Test_Run_Services
Declare function Reactor_Services, Reactor_Log_Services, obj_react_item, Utility, Environment_Services, obj_wo_log, Qa_Services
Declare subroutine Start_Window, RList, Set_Status, Database_Services, Obj_Sap, Sap_Services, Btree.Extract, Qa_Services
Declare subroutine Reactor_Services, Obj_Wo_Log, obj_wo_mat, Work_Order_Services, Material_Movement_Services, Automated_Workflow_Services
Declare subroutine Override_Services, Obj_Wo_Mat_Log, obj_post_log, Obj_Sap
$insert LOGICAL
$insert NOTE_PTRS_EQU
$insert MSG_EQUATES
$Insert APP_INSERTS
$Insert RLIST_EQUATES
$Insert WO_LOG_EQUATES
$Insert RDS_EQUATES
$Insert WO_STEP_EQUATES
$Insert WO_MAT_QA_EQUATES
$Insert REACT_RUN_EQUATES
$Insert RDS_LAYER_EQUATES
$Insert RDS_TEST_EQUATES
$Insert PM_EQUATES
$Insert PM_SPEC_EQUATES
$Insert WO_MAT_EQUATES
$Insert WM_OUT_EQUATES
$Insert TEST_RUN_EQUATES
$Insert TEST_RUN_WAFER_EQUATES
$Insert TEST_WAFER_PROD_EQUATES
$Insert TEST_RUN_TYPE_EQUATES
$Insert EPI_PART_EQUATES
$Insert POPUP_EQUATES
$Insert REACTOR_EQUATES
GoToService
Return Response or ""
//-----------------------------------------------------------------------------
// SERVICES
//-----------------------------------------------------------------------------
Service CreatAWO()
//Step 1: Start a WO WOLogFileIn variable emulates what an SAP file would have
/*
ProdOrdNo = FileIn<1,1>
CustPONo = FileIn<1,2>
PromiseShipDt = FileIn<1,3>
EpiPartNo = FileIn<1,4>
SubPartNo = FileIn<1,5>
SubRevNo = FileIn<1,6>
WOQty = FileIn<1,7>
VendCd = FileIn<1,8>
*/
WOLogFileIn = 'M124567.1':@VM:'NA':@VM:'02/29/2024':@VM:'400149S':@VM:'827906':@VM:'1.0':@VM:'150':@VM:'NA'
RetVal = obj_WO_LOG('SAPCreate',WOLogFileIn)
Response = RetVal
end service
Service RouteWO(WO_No)
//Step 2: Route a WO with a Product Version
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WO_No)
EpiPartNo = WOLogRec<WO_LOG_EPI_PART_NO$>
If EpiPartNo NE '' then
AllProdVerNos = XLATE('EPI_PART',EpiPartNo,EPI_PART_PROD_VER_NO$,'X')
TypeOver = ''
TypeOver<PDISPLAY$> = AllProdVerNos
TypeOver<PSELECT$> = 1
TypeOver<PMODE$> = 'K'
SelectedProdVerNo = Popup(@WINDOW,TypeOver,'PROD_VER')
If SelectedProdVerNo NE '' then
obj_WO_Log('Route',WO_No:@RM:SelectedProdVerNo)
end
end
end service
Service PrescribeWafers(WONo, AmountToRX)
//Step 3: prescribe wafers. This is the same as assigning lot numbers to individual lots of raw material. AKA creating WO_MAT records
/*
a. User clicks the PUB_RX button on the WO_LOG form.
b. Opens WO Receipt form
c. Users clicks on WO's Due in
d. User selects or enters a WO.
e. User clicks scan codes, opens
*/
debug
ProdVerNo = XLATE('WO_LOG', WONo, 'PROD_VER_NO', 'X')
ReactType = XLATE('WO_LOG', WONo, 'REACT_TYPE', 'X')
CassLotNo = '123456789'
CustPartNo = XLATE('WO_LOG', WONo, 'CUST_PART_NO', 'X')
CassQty = 25
NumCassToRX = AmountToRX / 25
ExistingWOMatList = XLATE('WO_LOG', WONo, 'WO_MAT_KEY', 'X')
LastCassNo = 0
for each cass in ExistingWOMatList using @VM setting iPos
thisCassNo = FIELD(cass, '*', 2)
if thisCassNo GT LastCassNo then LastCassNo = thisCassNo
Next cass
for i = 1 to NumCassToRX
NextCassNo = LastCassNo + 1
LastCassNo = nextCassNo
Parms = WONo:@RM
Parms := NextCassNo:@RM
Parms := ProdVerNo:@RM
Parms := CassLotNo:@RM
Parms := CassQty:@RM
Parms := CustPartNo:@RM ;* This is the CUSTOMER part No
Parms := 1:@RM
Parms := ReactType:@RM ;* 3 character Reactor Type Code
Parms := '':@RM
Parms := 'SR':@RM ;* Warehouse = 'SR' - Shipping/Receiving Area
Parms := 'RB':@RM ;* Location = 'RB' - Receiving Bench
Parms := OCONV(SRP_Datetime('Now'), 'DT/4'):@RM
Parms := 'JONATHAN_O':@RM
Parms := '':@RM
Parms := '':@RM
Parms := '':@RM ;* Added 8/18/2009 JCH
Parms := '':@RM ;* Added 12/16/2009 JCH
Parms := 25:@RM ;* Added 11/4/2009 JCH
Parms := 0:@RM ;* Added 05/14/2010 JCH
Parms := '':@RM ;* Added 07/14/2011 for SAP Project JCH
Parms := 25 ; // Added 02/01/2018 dmb
obj_WO_Mat('Create',Parms)
If Error_Services('NoError') then
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WONo)
WOLogRec<WO_LOG_WO_MAT_KEY$, -1> = WONo : '*' : LastCassNo
Database_Services('WriteDataRow', 'WO_LOG', WONo, WOLogRec, 1, 0, 1)
end
Next i
Work_Order_Services('UpdateReceivedQty', WONo)
end service
Service ReleaseCassettes(WONo)
//Step 4: User clicks release cassettes(PUB_RELEASE) from WO_LOG form
Work_Order_Services('ReleaseCassettes', WONo)
//Can get RDS number at this point
end service
Service PerformPTI(CassID)
//Step 5: User performs a PTI scan to tag lot into the fab.
Warehouse = '1K'
Location = 'PTI'
Material_Movement_Services('SaveRecord', CassID, Warehouse, Location, @USER4)
end service
* Service BatchProcessLotList()
* RDSList = ''
*
* RDSList<1> = 627134
* RDSList<2> = 627135
* RDSList<3> = 627136
* RDSList<4> = 627132
* RDSList<5> = 627133
*
* for each rds in RDSList using @FM
* //Automated_Workflow_Services('Perform1VER', rds, 63, 25)
* Automated_Workflow_Services('PerformUnload', rds)
* Next rds
* end service
Service Perform1VER(CassID, ReactorID, WfrQty)
//Step 6
If RowExists('RDS', CassID) AND ReactorID NE '' then
ReadyToSign = QA_Services('PreEpiSignatureReady', CassID, @User4, WfrQty, ReactorID)
If (ReadyToSign EQ True$) then
QA_Services('SignPreEpiStage', CassID, @USER4, WfrQty, ReactorID)
end
end
end service
Service PerformLoad(CassID, WfrInQty, LorRLL)
//Step 7
If RowExists('RDS', CassID) then
ReadyToSign = Qa_Services('LoadSignatureReady', CassID, @User4, WfrInQty, LorRLL, 0)
If ReadyToSign then
Qa_Services('SignLoadStage', CassID, @User4, WfrInQty, LorRLL, 0)
end else
ErrorReason = Error_Services('GetMessage')
Begin Case
Case ErrorReason EQ 'Process Error: Recipe parameters have not been entered.'
//Get the expected parameters and enter them. This is in the RDS_Layer Record
//First lets get limits from the RDS Layer Record(s)
RDSLayerKeys = XLATE('RDS', CassID, RDS_RDS_LAYER_KEYS$, 'X')
for each RDSLayerKey in RDSLayerKeys using @VM setting rlPos
Automated_Workflow_Services('EnterRecipeParams', RDSLayerKey)
If Error_Services('NoError') then
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
end else
//Die
Return
end
Next RDSLayerKey
Case ErrorReason EQ 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.'
Automated_Workflow_Services('VerifyRecipeParams', CassID)
If Error_Services('NoError') then
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
end else
//Die
Return
end
End Case
end
end
end service
Service PerformUnload(RDSNo)
//Step 8
If RDSNo NE '' then
Reactor = XLATE('RDS', RDSNo, 'REACTOR', 'X')
If Reactor NE '' then
ReadyToSign = QA_Services('UnloadSignatureReady', RDSNo, @User4, Reactor)
If Error_Services('HasError') then
If ErrorMsg EQ 'Cassette runtime exceeds three days! An override by a LEAD or SUPERVISOR is required.' then
Override_Services('SetOverride', 'RDS', RDSNo, 'UNLOAD_DTM', @USER4)
ReadyToSign = True$
end
end
If ReadyToSign then
QA_Services('SignUnloadStage', RDSNo, @User4)
end
end else
Error_Services('Add', 'No Reactor assigned to RDS!')
end
end else
Error_Services('Add', 'No RDS No. Supplied!')
end
end service
Service PerformFQA(RDSNo)
ToolID = ''
WHCd = 'CR'
LocCD = 'QA'
Tag = ''
SigDt = Date()
SigTm = Time()
WONo = XLATE('RDS', RDSNo, RDS_WO$, 'X')
CassNo = XLATE('RDS', RDSNo, RDS_CASS_NO$, 'X')
Equ COL$LOG_FILE to 1
Equ COL$LOG_DTM to 2
Equ COL$ACTION to 3
Equ COL$WH_CD to 4
Equ COL$LOC_CD to 5
Equ COL$WO_NOS to 6
Equ COL$CASS_NOS to 7
Equ COL$USER_ID to 8
Equ COL$TAGS to 9
Equ COL$TOOL_ID to 10
EventParms = ''
EventParms<COL$LOG_FILE> = 'WO_MAT'
EventParms<COL$LOG_DTM> = SigDt:' ':SigTm
EventParms<COL$ACTION> = 1:'QA'
EventParms<COL$WH_CD> = 'CR'
EventParms<COL$LOC_CD> = 'QA'
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 * * * * *
Obj_Post_Log('POST')
Qa_Services('SignFQAStage', RDSNo, @USER4)
end service
Service EnterRecipeParams(RDSLayerKey)
RDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', RDSLayerKey)
If RDSLayerRec NE '' then
If RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> NE '' then
//Epi Deposit Time
RDSLayerRec<RDS_LAYER_EPI_TIME$> = ((RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> - RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>
end
If RDSLayerRec<RDS_LAYER_DILUENT_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DILUENT_MAX$> NE '' then
//Diluent
RDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = ((RDSLayerRec<RDS_LAYER_DILUENT_MAX$> - RDSLayerRec<RDS_LAYER_DILUENT_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DILUENT_MIN$>
end
If RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> NE '' then
//Dopant Flow
RDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = ((RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> NE '' then
//HCL Flow
RDSLayerRec<RDS_LAYER_HCL_FLOW$> = ((RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> NE '' then
//Bake Time
RDSLayerRec<RDS_LAYER_BAKE_TIME$> = ((RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> - RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>
end
If RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> NE '' then
//H2 Flow
RDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = ((RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> NE '' then
//TCS Flow
RDSLayerRec<RDS_LAYER_TCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> NE '' then
//DCS Flow
RDSLayerRec<RDS_LAYER_DCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_AUX1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX1_MAX$> NE '' then
//AUX 1
RDSLayerRec<RDS_LAYER_AUX1$> = ((RDSLayerRec<RDS_LAYER_AUX1_MAX$> - RDSLayerRec<RDS_LAYER_AUX1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX1_MIN$>
end
If RDSLayerRec<RDS_LAYER_AUX2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX2_MAX$> NE '' then
//AUX2
RDSLayerRec<RDS_LAYER_AUX2$> = ((RDSLayerRec<RDS_LAYER_AUX2_MAX$> - RDSLayerRec<RDS_LAYER_AUX2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX2_MIN$>
end
If RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> NE '' then
//F_OFFSET
RDSLayerRec<RDS_LAYER_F_OFFSET$> = ((RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>
end
If RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> NE '' then
//S_OFFSET
RDSLayerRec<RDS_LAYER_S_OFFSET$> = ((RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>
end
If RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> NE '' then
//R OFFSET
RDSLayerRec<RDS_LAYER_R_OFFSET$> = ((RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>
end
If RDSLayerRec<RDS_LAYER_ETCH1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH1_MAX$> NE '' then
//ETCH 1
RDSLayerRec<RDS_LAYER_ETCH1$> = ((RDSLayerRec<RDS_LAYER_ETCH1_MAX$> - RDSLayerRec<RDS_LAYER_ETCH1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH1_MIN$>
end
If RDSLayerRec<RDS_LAYER_ETCH2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH2_MAX$> NE '' then
//ETCH 2
RDSLayerRec<RDS_LAYER_ETCH2$> = ((RDSLayerRec<RDS_LAYER_ETCH2_MAX$> - RDSLayerRec<RDS_LAYER_ETCH2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH2_MIN$>
end
If RDSLayerRec<RDS_LAYER_ETCH3_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH3_MAX$> NE '' then
//ETCH 3
RDSLayerRec<RDS_LAYER_ETCH3$> = ((RDSLayerRec<RDS_LAYER_ETCH3_MAX$> - RDSLayerRec<RDS_LAYER_ETCH3_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH3_MIN$>
end
If RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> NE '' then
//UL_TEMP
RDSLayerRec<RDS_LAYER_UL_TEMP$> = ((RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> - RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>
end
If RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> NE '' then
//Susceptor Etch
RDSLayerRec<RDS_LAYER_SUSC_ETCH$> = ((RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> - RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>
end
Database_Services('WriteDataRow', 'RDS_LAYER', RDSLayerKey, RDSLayerRec, True$, False$, True$)
end
end service
Service VerifyRecipeParams(RDSNo)
//Used to verify exisiting recipe params. This is if they are already set.
IF RDSNo NE '' then
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
RDSRec<RDS_RDS_LAYER_ACK$> = True$
Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, True$)
end else
Error_Services('Add', 'RDS No was blank!!!')
end
end service
Service SendCassComp(WoMatKey)
Sap_Services('RetransmitCassComp', WoMatKey)
obj_sap('SendOutbound')
end service
Compile function Automated_Workflow_Services(@Service, @Params)
/*
Initial Author: Jonathan Ouellette
This service module has a catalogued list of functions to quickly and easily perform certain functions related to lot
processing.
1. CreateAWO - Imitates the process of getting data from SAP and processing the WO start in OI.
2. RouteWO - Imitates routing of a WO, AKA selecting a ProdVer and Assigning the WO to a reactor Type
3. PrescribeWafers - Imitates creating the child lots for a WO, AKA creating WO_MAT records
4. ReleaseCassettes - Assigns raw substrates to the WO_MAT records. RDS for non-epipro is created at this point.
5. PerformPTI - Imitates Receiving operator moving the lot into the fab.
6. Perform1VER - Performs the 1VER operation for an RDS.
7. PerformLoad - Performs the load operation for an RDS.
8. PerformUnload - Performs the unload operation for a non-epipro RDS.
9. EnterRecipeParms - Used in conjunction with PerformLoad. Used to enter the parameters for the Reactor Recipe upon load
typically this is the first load of a Work Order.
10. VerifyRecipeParms - Used in conjunction with PerformLoad. Used to verify the current recipe setpoints for an RDS load.
*/
#pragma precomp SRP_PreCompiler
Declare function Gan_Services, Obj_Notes_Sent, msg, Check_Notes, Jonathan_Services, Database_Services, SRP_Datetime
Declare function Lsl_Users_Services, SRP_Time, RList, Error_Services, Obj_Wo_Mat, Pm_Services, Date_Services, Test_Run_Services
Declare function Reactor_Services, Reactor_Log_Services, obj_react_item, Utility, Environment_Services, obj_wo_log, Qa_Services
Declare subroutine Start_Window, RList, Set_Status, Database_Services, Obj_Sap, Sap_Services, Btree.Extract, Qa_Services
Declare subroutine Reactor_Services, Obj_Wo_Log, obj_wo_mat, Work_Order_Services, Material_Movement_Services, Automated_Workflow_Services
Declare subroutine Override_Services, Obj_Wo_Mat_Log, obj_post_log, Obj_Sap
$insert LOGICAL
$insert NOTE_PTRS_EQU
$insert MSG_EQUATES
$Insert APP_INSERTS
$Insert RLIST_EQUATES
$Insert WO_LOG_EQUATES
$Insert RDS_EQUATES
$Insert WO_STEP_EQUATES
$Insert WO_MAT_QA_EQUATES
$Insert REACT_RUN_EQUATES
$Insert RDS_LAYER_EQUATES
$Insert RDS_TEST_EQUATES
$Insert PM_EQUATES
$Insert PM_SPEC_EQUATES
$Insert WO_MAT_EQUATES
$Insert WM_OUT_EQUATES
$Insert TEST_RUN_EQUATES
$Insert TEST_RUN_WAFER_EQUATES
$Insert TEST_WAFER_PROD_EQUATES
$Insert TEST_RUN_TYPE_EQUATES
$Insert EPI_PART_EQUATES
$Insert POPUP_EQUATES
$Insert REACTOR_EQUATES
GoToService
Return Response or ""
//-----------------------------------------------------------------------------
// SERVICES
//-----------------------------------------------------------------------------
Service CreatAWO()
//Step 1: Start a WO WOLogFileIn variable emulates what an SAP file would have
/*
ProdOrdNo = FileIn<1,1>
CustPONo = FileIn<1,2>
PromiseShipDt = FileIn<1,3>
EpiPartNo = FileIn<1,4>
SubPartNo = FileIn<1,5>
SubRevNo = FileIn<1,6>
WOQty = FileIn<1,7>
VendCd = FileIn<1,8>
*/
debug
WOLogFileIn = 'M999930.1':@VM:'NA':@VM:'02/29/2024':@VM:'U053':@VM:'931968':@VM:'1.0':@VM:'2400':@VM:'NA'
RetVal = obj_WO_LOG('SAPCreate',WOLogFileIn)
Response = RetVal
end service
Service RouteWO(WO_No)
//Step 2: Route a WO with a Product Version
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WO_No)
EpiPartNo = WOLogRec<WO_LOG_EPI_PART_NO$>
If EpiPartNo NE '' then
AllProdVerNos = XLATE('EPI_PART',EpiPartNo,EPI_PART_PROD_VER_NO$,'X')
TypeOver = ''
TypeOver<PDISPLAY$> = AllProdVerNos
TypeOver<PSELECT$> = 1
TypeOver<PMODE$> = 'K'
SelectedProdVerNo = Popup(@WINDOW,TypeOver,'PROD_VER')
If SelectedProdVerNo NE '' then
obj_WO_Log('Route',WO_No:@RM:SelectedProdVerNo)
end
end
end service
Service PrescribeWafers(WONo, AmountToRX)
//Step 3: prescribe wafers. This is the same as assigning lot numbers to individual lots of raw material. AKA creating WO_MAT records
/*
a. User clicks the PUB_RX button on the WO_LOG form.
b. Opens WO Receipt form
c. Users clicks on WO's Due in
d. User selects or enters a WO.
e. User clicks scan codes, opens
*/
debug
ProdVerNo = XLATE('WO_LOG', WONo, 'PROD_VER_NO', 'X')
ReactType = XLATE('WO_LOG', WONo, 'REACT_TYPE', 'X')
CassLotNo = '123456789'
CustPartNo = XLATE('WO_LOG', WONo, 'CUST_PART_NO', 'X')
CassQty = 25
NumCassToRX = AmountToRX / 25
ExistingWOMatList = XLATE('WO_LOG', WONo, 'WO_MAT_KEY', 'X')
LastCassNo = 0
for each cass in ExistingWOMatList using @VM setting iPos
thisCassNo = FIELD(cass, '*', 2)
if thisCassNo GT LastCassNo then LastCassNo = thisCassNo
Next cass
for i = 1 to NumCassToRX
NextCassNo = LastCassNo + 1
LastCassNo = nextCassNo
Parms = WONo:@RM
Parms := NextCassNo:@RM
Parms := ProdVerNo:@RM
Parms := CassLotNo:@RM
Parms := CassQty:@RM
Parms := CustPartNo:@RM ;* This is the CUSTOMER part No
Parms := 1:@RM
Parms := ReactType:@RM ;* 3 character Reactor Type Code
Parms := '':@RM
Parms := 'SR':@RM ;* Warehouse = 'SR' - Shipping/Receiving Area
Parms := 'RB':@RM ;* Location = 'RB' - Receiving Bench
Parms := OCONV(SRP_Datetime('Now'), 'DT/4'):@RM
Parms := 'JONATHAN_O':@RM
Parms := '':@RM
Parms := '':@RM
Parms := '':@RM ;* Added 8/18/2009 JCH
Parms := '':@RM ;* Added 12/16/2009 JCH
Parms := 25:@RM ;* Added 11/4/2009 JCH
Parms := 0:@RM ;* Added 05/14/2010 JCH
Parms := '':@RM ;* Added 07/14/2011 for SAP Project JCH
Parms := 25 ; // Added 02/01/2018 dmb
obj_WO_Mat('Create',Parms)
If Error_Services('NoError') then
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WONo)
WOLogRec<WO_LOG_WO_MAT_KEY$, -1> = WONo : '*' : LastCassNo
Database_Services('WriteDataRow', 'WO_LOG', WONo, WOLogRec, 1, 0, 1)
end
Next i
Work_Order_Services('UpdateReceivedQty', WONo)
end service
Service ReleaseCassettes(WONo)
//Step 4: User clicks release cassettes(PUB_RELEASE) from WO_LOG form
Work_Order_Services('ReleaseCassettes', WONo)
//Can get RDS number at this point
end service
Service PerformPTI(CassID)
debug
//Step 5: User performs a PTI scan to tag lot into the fab.
Warehouse = '1K'
Location = 'PTI'
Material_Movement_Services('SaveRecord', CassID, Warehouse, Location, @USER4)
end service
* Service BatchProcessLotList()
* RDSList = ''
*
* RDSList<1> = 627134
* RDSList<2> = 627135
* RDSList<3> = 627136
* RDSList<4> = 627132
* RDSList<5> = 627133
*
* for each rds in RDSList using @FM
* //Automated_Workflow_Services('Perform1VER', rds, 63, 25)
* Automated_Workflow_Services('PerformUnload', rds)
* Next rds
* end service
Service Perform1VER(CassID, ReactorID, WfrQty)
//Step 6
If RowExists('RDS', CassID) AND ReactorID NE '' then
ReadyToSign = QA_Services('PreEpiSignatureReady', CassID, @User4, WfrQty, ReactorID)
If (ReadyToSign EQ True$) then
QA_Services('SignPreEpiStage', CassID, @USER4, WfrQty, ReactorID)
end
end
end service
Service PerformLoad(CassID, WfrInQty, LorRLL)
//Step 7
If RowExists('RDS', CassID) then
ReadyToSign = Qa_Services('LoadSignatureReady', CassID, @User4, WfrInQty, LorRLL, 0)
If ReadyToSign then
Qa_Services('SignLoadStage', CassID, @User4, WfrInQty, LorRLL, 0)
end else
ErrorReason = Error_Services('GetMessage')
Begin Case
Case ErrorReason EQ 'Process Error: Recipe parameters have not been entered.'
//Get the expected parameters and enter them. This is in the RDS_Layer Record
//First lets get limits from the RDS Layer Record(s)
RDSLayerKeys = XLATE('RDS', CassID, RDS_RDS_LAYER_KEYS$, 'X')
for each RDSLayerKey in RDSLayerKeys using @VM setting rlPos
Automated_Workflow_Services('EnterRecipeParams', RDSLayerKey)
If Error_Services('NoError') then
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
end else
//Die
Return
end
Next RDSLayerKey
Case ErrorReason EQ 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.'
Automated_Workflow_Services('VerifyRecipeParams', CassID)
If Error_Services('NoError') then
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
end else
//Die
Return
end
End Case
end
end
end service
Service PerformUnload(RDSNo)
//Step 8
If RDSNo NE '' then
Reactor = XLATE('RDS', RDSNo, 'REACTOR', 'X')
If Reactor NE '' then
ReadyToSign = QA_Services('UnloadSignatureReady', RDSNo, @User4, Reactor)
If Error_Services('HasError') then
If ErrorMsg EQ 'Cassette runtime exceeds three days! An override by a LEAD or SUPERVISOR is required.' then
Override_Services('SetOverride', 'RDS', RDSNo, 'UNLOAD_DTM', @USER4)
ReadyToSign = True$
end
end
If ReadyToSign then
QA_Services('SignUnloadStage', RDSNo, @User4)
end
end else
Error_Services('Add', 'No Reactor assigned to RDS!')
end
end else
Error_Services('Add', 'No RDS No. Supplied!')
end
end service
Service PerformFQA(RDSNo)
ToolID = ''
WHCd = 'CR'
LocCD = 'QA'
Tag = ''
SigDt = Date()
SigTm = Time()
WONo = XLATE('RDS', RDSNo, RDS_WO$, 'X')
CassNo = XLATE('RDS', RDSNo, RDS_CASS_NO$, 'X')
Equ COL$LOG_FILE to 1
Equ COL$LOG_DTM to 2
Equ COL$ACTION to 3
Equ COL$WH_CD to 4
Equ COL$LOC_CD to 5
Equ COL$WO_NOS to 6
Equ COL$CASS_NOS to 7
Equ COL$USER_ID to 8
Equ COL$TAGS to 9
Equ COL$TOOL_ID to 10
EventParms = ''
EventParms<COL$LOG_FILE> = 'WO_MAT'
EventParms<COL$LOG_DTM> = SigDt:' ':SigTm
EventParms<COL$ACTION> = 1:'QA'
EventParms<COL$WH_CD> = 'CR'
EventParms<COL$LOC_CD> = 'QA'
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 * * * * *
Obj_Post_Log('POST')
Qa_Services('SignFQAStage', RDSNo, @USER4)
end service
Service EnterRecipeParams(RDSLayerKey)
RDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', RDSLayerKey)
If RDSLayerRec NE '' then
If RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> NE '' then
//Epi Deposit Time
RDSLayerRec<RDS_LAYER_EPI_TIME$> = ((RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> - RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>
end
If RDSLayerRec<RDS_LAYER_DILUENT_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DILUENT_MAX$> NE '' then
//Diluent
RDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = ((RDSLayerRec<RDS_LAYER_DILUENT_MAX$> - RDSLayerRec<RDS_LAYER_DILUENT_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DILUENT_MIN$>
end
If RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> NE '' then
//Dopant Flow
RDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = ((RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> NE '' then
//HCL Flow
RDSLayerRec<RDS_LAYER_HCL_FLOW$> = ((RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> NE '' then
//Bake Time
RDSLayerRec<RDS_LAYER_BAKE_TIME$> = ((RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> - RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>
end
If RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> NE '' then
//H2 Flow
RDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = ((RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> NE '' then
//TCS Flow
RDSLayerRec<RDS_LAYER_TCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> NE '' then
//DCS Flow
RDSLayerRec<RDS_LAYER_DCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>
end
If RDSLayerRec<RDS_LAYER_AUX1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX1_MAX$> NE '' then
//AUX 1
RDSLayerRec<RDS_LAYER_AUX1$> = ((RDSLayerRec<RDS_LAYER_AUX1_MAX$> - RDSLayerRec<RDS_LAYER_AUX1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX1_MIN$>
end
If RDSLayerRec<RDS_LAYER_AUX2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX2_MAX$> NE '' then
//AUX2
RDSLayerRec<RDS_LAYER_AUX2$> = ((RDSLayerRec<RDS_LAYER_AUX2_MAX$> - RDSLayerRec<RDS_LAYER_AUX2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX2_MIN$>
end
If RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> NE '' then
//F_OFFSET
RDSLayerRec<RDS_LAYER_F_OFFSET$> = ((RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>
end
If RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> NE '' then
//S_OFFSET
RDSLayerRec<RDS_LAYER_S_OFFSET$> = ((RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>
end
If RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> NE '' then
//R OFFSET
RDSLayerRec<RDS_LAYER_R_OFFSET$> = ((RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>
end
If RDSLayerRec<RDS_LAYER_ETCH1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH1_MAX$> NE '' then
//ETCH 1
RDSLayerRec<RDS_LAYER_ETCH1$> = ((RDSLayerRec<RDS_LAYER_ETCH1_MAX$> - RDSLayerRec<RDS_LAYER_ETCH1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH1_MIN$>
end
If RDSLayerRec<RDS_LAYER_ETCH2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH2_MAX$> NE '' then
//ETCH 2
RDSLayerRec<RDS_LAYER_ETCH2$> = ((RDSLayerRec<RDS_LAYER_ETCH2_MAX$> - RDSLayerRec<RDS_LAYER_ETCH2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH2_MIN$>
end
If RDSLayerRec<RDS_LAYER_ETCH3_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH3_MAX$> NE '' then
//ETCH 3
RDSLayerRec<RDS_LAYER_ETCH3$> = ((RDSLayerRec<RDS_LAYER_ETCH3_MAX$> - RDSLayerRec<RDS_LAYER_ETCH3_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH3_MIN$>
end
If RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> NE '' then
//UL_TEMP
RDSLayerRec<RDS_LAYER_UL_TEMP$> = ((RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> - RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>
end
If RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> NE '' then
//Susceptor Etch
RDSLayerRec<RDS_LAYER_SUSC_ETCH$> = ((RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> - RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>
end
Database_Services('WriteDataRow', 'RDS_LAYER', RDSLayerKey, RDSLayerRec, True$, False$, True$)
end
end service
Service VerifyRecipeParams(RDSNo)
//Used to verify exisiting recipe params. This is if they are already set.
IF RDSNo NE '' then
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
RDSRec<RDS_RDS_LAYER_ACK$> = True$
Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, True$)
end else
Error_Services('Add', 'RDS No was blank!!!')
end
end service
Service SendCassComp(WoMatKey)
debug
Sap_Services('RetransmitCassComp', WoMatKey)
obj_sap('SendOutbound')
end service

View File

@ -58,7 +58,7 @@ $INSERT NOTIFICATION_EQU
Declare function Database_Services, Error_Services, Obj_Wm_In, Obj_Wm_Out, Unassigned, Wm_In_Services, Wm_Out_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Hold_Services, Memberof, Error_Services, Rds_Services
Declare subroutine Database_Services, Error_Services, Obj_notes, Hold_Services, Obj_Wm_In, Obj_Wm_Out, Wm_In_Services
Declare subroutine Wm_Out_Services, Rds_Services
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Services
GoToService else
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
@ -361,6 +361,29 @@ Service OnHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorI
If Error_Services("NoError") then
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
//Add in logging lot event
If UserId EQ '' then
UserId = OperatorId
end
Begin Case
Case HoldEntity EQ 'WM_IN'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Case HoldEntity EQ 'WO_MAT'
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
End Case
end
end else
Error_Services('Add', 'Lot is already on hold.')
@ -474,6 +497,29 @@ Service OffHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, Operator
If Error_Services("NoError") then
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
//Add in logging lot event
if UserID EQ '' then
UserId = OperatorId
end
Begin Case
Case HoldEntity EQ 'WM_IN'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Case HoldEntity EQ 'WO_MAT'
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
End Case
end
end else
Error_Services('Add', 'Lot is not on hold.')

File diff suppressed because it is too large Load Diff

View File

@ -1,372 +1,374 @@
Compile function Lock_Services(@Service, @Params)
/***********************************************************************************************************************
Name : Lock_Services
Description : Handler program for all Lock services.
Notes : Application errors should be logged using the Error Services module. There are a few methodological
assumptions built into way errors are managed which are important to understand in order to properly
work with Error Services:
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
this will appear backwards since the originating procedure always appears at the bottom of the
list and the current routine appears at the top of the list. We are using this orientation because
it is common to refer to the process of calling other procedures as 'drilling down'.
- The reason for defining the orientation of the call stack is because Error_Services allows for
multiple error conditions to be appended to an original error. In most cases this will happen when
a procedure at the bottom of the stack generates an error condition and then returns to its
calling procedure. This higher level procedure can optionally add more information relevant to
itself. This continues as the call stack 'bubbles' its way back to the top to where the
originating procedure is waiting.
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
preserve their error state until explicitly cleared. This can hinder the normal execution of code
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
Our philosophy is that error conditions should automatically be cleared before a new procedure
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
philosophy then it should include a call into the 'Clear' service request at the top of the
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
error conditions that were set before.
Parameters :
Service [in] -- Name of the service being requested
Param1-10 [in/out] -- Additional request parameter holders
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
Metadata :
History : (Date, Initials, Notes)
3/18/24 djm Original programmer.
***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler
$insert LOGICAL
$Insert SERVICE_SETUP
$Insert UNLOCK_REQUESTS_EQUATES
$Insert REACT_RUN_EQUATES
$Insert WO_MAT_EQUATES
$Insert WM_OUT_EQUATES
$Insert RDS_EQUATES
$Insert RDS_LAYER_EQUATES
Declare function Database_Services, Oi_Wizard_Services, Memberof, Lock_Services, SRP_Json, List_Volume_Sub, Datetime
Declare subroutine SRP_Json, Database_Services
GoToService
Return Response or ""
//-----------------------------------------------------------------------------
// SERVICES
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// GetLockPermissions
//
// CurrUser - [Required]
//
// Returns LockPermissionLevel 0 - No lock access, 1 - Lock access to unprotected tables, or 2 - Lock access to all tables.
//
//----------------------------------------------------------------------------------------------------------------------
Service GetLockPermissions(CurrUser)
LockPermissionLevel = 0
OIAdmin = Memberof(CurrUser, 'OI_ADMIN')
SupervisorLead = MemberOf(CurrUser, 'LEAD') OR MemberOf(CurrUser, 'SUPERVISOR')
If OIAdmin then
LockPermissionLevel = 2
end else
If SupervisorLead then
LockPermissionLevel = 1
end
end
Response = LockPermissionLevel
End Service
//----------------------------------------------------------------------------------------------------------------------
// GetAllowedLocks
//
// CurrUser - [Required]
//
// Returns an array of accessible locks based on user LockPermissionLevel
//
//----------------------------------------------------------------------------------------------------------------------
Service GetAllowedLocks(CurrUser)
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
LockJSON = ''
If LockPermissionLevel NE 0 then
LockList = Database_Services('GetUserLocks')
If Error_Services('NoError') then
If SRP_JSON(objJSON, 'New', 'Object') then
If SRP_JSON(LockArray, 'New', 'Array') then
For each Row in LockList using @FM setting fPos
If Row<0,3> = "Rev30536" then Row<0,3> = 'RDS*LSL2'
If Field(Row<0,3>, "*", 2) EQ 'LSL2' OR LockPermissionLevel EQ 2 then
If SRP_JSON(objRow, 'New', 'Object') then
SRP_JSON(objRow, 'SetValue', 'ComputerName', Row<0, 1>)
SRP_JSON(objRow, 'SetValue', 'Volume', Row<0, 2>)
If Field(Row<0,3>, "*", 2) EQ 'LSL2' then Row<0,3> = Field(Row<0,3>, "*", 1)
SRP_JSON(objRow, 'SetValue', 'OSFile', Row<0, 3>)
SRP_JSON(objRow, 'SetValue', 'RecordKey', Row<0, 4>, "String")
SRP_JSON(objRow, 'SetValue', 'Exclusive', Row<0, 5>)
SRP_JSON(objRow, 'SetValue', 'REVFile', Row<0, 6>)
SRP_JSON(LockArray, 'Add', objRow)
SRP_JSON(objRow, 'Release')
end
End
Next Row
SRP_JSON(objJSON, 'Set', 'Locks', LockArray)
SRP_JSON(LockArray, 'Release')
end
LockJSON = SRP_JSON(objJSON, 'Stringify', 'Styled')
SRP_JSON(objJSON, 'Release')
end
end
End
Response = LockJSON
End Service
//----------------------------------------------------------------------------------------------------------------------
// AttemptUnlock
//
// CurrUser - [Required]
// LotType - [Required]
// Key - [Required]
//
// Returns either 1 for success, or error message
//
//----------------------------------------------------------------------------------------------------------------------
Service AttemptUnlock(CurrUser, LotType, Key)
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
If LockPermissionLevel NE 0 then
If LotType EQ 'RDS' or LotType EQ 'WM_OUT' then
If Xlate(LotType, Key, '', 'X', '') NE '' then
LockArray = Lock_Services('GetChildRecords', LotType, Key)
LockCount = DCount(LockArray<1>, @VM)
For I = 1 to LockCount
Table = LockArray<1,I>
KeyID = LockArray<2,I>
Resp = Database_Services('UnlockKeyID', Table, KeyID)
Next I
If Error_Services('NoError') Then
Response = TRUE$
end else
Response = FALSE$
Error_Services('Add', 'Records failed to unlock.')
end
end else
Response = FALSE$
Error_Services('Add', 'This record does not exist.')
end
End Else
Response = FALSE$
Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
end
end else
Response = FALSE$
Error_Services('Add', 'User is not permitted to access this resource.')
end
End Service
//----------------------------------------------------------------------------------------------------------------------
// GetChildRecords
//
// LotType - [Required]
// Key - [Required]
//
// Returns an array of associated child records for unlocking
//
//----------------------------------------------------------------------------------------------------------------------
Service GetChildRecords(LotType, Key)
RecordArray = ''
Begin Case
Case LotType EQ 'RDS'
RDSRec = Xlate('RDS', Key, '', 'X', '')
If RDSRec NE '' then
//Add RDS key
RecordArray<1> = LotType
RecordArray<2> = Key
//Get REACT_RUN record
ReactRunRec = Xlate('REACT_RUN', Key, '', 'X', '')
//Get and Add CLEAN_INSP keys
CINos = ReactRunRec<REACT_RUN_CI_NO$>
If CINos NE '' then
CICount = Dcount(CINos, @VM)
For I = 1 to CICount
If CINos<I> NE '' then
RecordArray<1,-1> = 'CLEAN_INSP'
RecordArray<2,-1> = CINos<I>
end
Next I
end
//Get and Add RDS_TEST keys
RDSLayerKeys = ReactRunRec<REACT_RUN_RDS_LAYER_KEYS$>
If RDSLayerKeys NE '' then
LayerKeyCount = DCount(RDSLayerKeys, @VM)
For K = 1 to LayerKeyCount
RDSTestKeys = Xlate('RDS_LAYER', RDSLayerKeys<K>, 'RDS_TEST_KEYS', 'X', '')
If RDSTestKeys NE '' then
RDSTestCount = DCount(RDSTestKeys, @VM)
For L = 1 to RDSTestCount
If RDSTestKeys<K,L> NE '' then
RecordArray<1,-1> = 'RDS_TEST'
RecordArray<2,-1> = RDSTestKeys<K,L>
end
Next L
end
Next K
end
//Get WO_MAT key
WONo = RDSRec<RDS_WO$>
CassNo = RDSRec<RDS_CASS_NO$>
WOMatKey = WONo : '*' : CassNo
//Get and Add WO_MAT_QA
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
If WOMatQA NE '' then
RecordArray<1,-1> = 'WO_MAT_QA'
RecordArray<2,-1> = WOMatKey
End
//Get and Add NCR keys
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
If NCRKeys NE '' then
NCRCount = Dcount(NCRKeys, @VM)
For J = 1 to NCRCount
If NCRKeys<J> NE '' then
RecordArray<1,-1> = 'NCR'
RecordArray<2,-1> = NCRKeys<J>
end
Next J
end
end else
Error_Services('Add', 'This RDS does not exist.')
Return
end
Case LotType EQ 'WM_OUT'
WMOutRec = Xlate('WM_OUT', Key, '', 'X', '')
If WMOutRec NE '' then
//Add WM_OUT key
RecordArray<1> = LotType
RecordArray<2> = Key
//Get and Add CLEAN_INSP keys
CINos = WMOutRec<WM_OUT_CI_NO$>
If CINos NE '' then
CICount = Dcount(CINos, @VM)
For I = 1 to CICount
If CINos<I> NE '' then
RecordArray<1,-1> = 'CLEAN_INSP'
RecordArray<2,-1> = CINos<I>
end
Next I
end
//Get WO_MAT key
WONo = FIELD(Key,'*',1)
CassNo = FIELD(Key,'*',3)
WOMatKey = WONo : '*' : CassNo
//Get and Add WO_MAT_QA key
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
If WOMatQA NE '' then
RecordArray<1,-1> = 'WO_MAT_QA'
RecordArray<2,-1> = WOMatKey
End
//Get and Add NCR keys
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
If NCRKeys NE '' then
NCRCount = Dcount(NCRKeys, @VM)
For J = 1 to NCRCount
If NCRKeys<J> NE '' then
RecordArray<1,-1> = 'NCR'
RecordArray<2,-1> = NCRKeys<J>
end
Next J
end
end else
Error_Services('Add', 'This WM_OUT does not exist.')
end
Case OTHERWISE$
Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
return
End Case
If RecordArray NE '' then
Response = RecordArray
end
End Service
//----------------------------------------------------------------------------------------------------------------------
// GetUnprotectedTables
//
// Returns an array of unprotected tables
//
//----------------------------------------------------------------------------------------------------------------------
Service GetUnprotectedTables()
TableArray = List_Volume_Sub('LSL', '', 'TABLE_NAME', 'TABLE_NAME')
UnprotectedArray = ''
For Each Table in TableArray Using @FM
If Table[1,1] NE '!' AND Table[1,5] NE 'DICT.' then
UnprotectedArray<-1> = Table
end
Next Table
Response = UnprotectedArray
End Service
//----------------------------------------------------------------------------------------------------------------------
// LogUnlockRequest
//
// CurrUser - [Required]
// TableName - [Required]
// RecordKey - [Required]
// Success - [Required]
//
// Creates an UNLOCK_REQUESTS record to log unlock attempts.
//
//----------------------------------------------------------------------------------------------------------------------
Service LogUnlockRequest(TableName, RecordKey, CurrUser, Success)
NewRequestRec = ''
CurrDateTime = Datetime()
RecordID = CurrDateTime :'*': TableName
NewRequestRec<UNLOCK_REQUESTS_RECORD_KEY$> = RecordKey
NewRequestRec<UNLOCK_REQUESTS_USER_NAME$> = CurrUser
NewRequestRec<UNLOCK_REQUESTS_SUCCESS$> = Success
Database_Services('WriteDataRow', 'UNLOCK_REQUESTS', RecordID, NewRequestRec, 1, 0, 0)
End Service
Compile function Lock_Services(@Service, @Params)
/***********************************************************************************************************************
Name : Lock_Services
Description : Handler program for all Lock services.
Notes : Application errors should be logged using the Error Services module. There are a few methodological
assumptions built into way errors are managed which are important to understand in order to properly
work with Error Services:
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
this will appear backwards since the originating procedure always appears at the bottom of the
list and the current routine appears at the top of the list. We are using this orientation because
it is common to refer to the process of calling other procedures as 'drilling down'.
- The reason for defining the orientation of the call stack is because Error_Services allows for
multiple error conditions to be appended to an original error. In most cases this will happen when
a procedure at the bottom of the stack generates an error condition and then returns to its
calling procedure. This higher level procedure can optionally add more information relevant to
itself. This continues as the call stack 'bubbles' its way back to the top to where the
originating procedure is waiting.
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
preserve their error state until explicitly cleared. This can hinder the normal execution of code
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
Our philosophy is that error conditions should automatically be cleared before a new procedure
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
philosophy then it should include a call into the 'Clear' service request at the top of the
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
error conditions that were set before.
Parameters :
Service [in] -- Name of the service being requested
Param1-10 [in/out] -- Additional request parameter holders
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
Metadata :
History : (Date, Initials, Notes)
3/18/24 djm Original programmer.
***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler
$insert LOGICAL
$Insert SERVICE_SETUP
$Insert UNLOCK_REQUESTS_EQUATES
$Insert REACT_RUN_EQUATES
$Insert WO_MAT_EQUATES
$Insert WM_OUT_EQUATES
$Insert RDS_EQUATES
$Insert RDS_LAYER_EQUATES
Declare function Database_Services, Oi_Wizard_Services, Memberof, Lock_Services, SRP_Json, List_Volume_Sub, Datetime
Declare subroutine SRP_Json, Database_Services
GoToService
Return Response or ""
//-----------------------------------------------------------------------------
// SERVICES
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// GetLockPermissions
//
// CurrUser - [Required]
//
// Returns LockPermissionLevel 0 - No lock access, 1 - Lock access to unprotected tables, or 2 - Lock access to all tables.
//
//----------------------------------------------------------------------------------------------------------------------
Service GetLockPermissions(CurrUser)
LockPermissionLevel = 0
OIAdmin = Memberof(CurrUser, 'OI_ADMIN')
SupervisorLead = MemberOf(CurrUser, 'LEAD') OR MemberOf(CurrUser, 'SUPERVISOR')
If OIAdmin then
LockPermissionLevel = 2
end else
If SupervisorLead then
LockPermissionLevel = 1
end
end
Response = LockPermissionLevel
End Service
//----------------------------------------------------------------------------------------------------------------------
// GetAllowedLocks
//
// CurrUser - [Required]
//
// Returns an array of accessible locks based on user LockPermissionLevel
//
//----------------------------------------------------------------------------------------------------------------------
Service GetAllowedLocks(CurrUser)
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
LockJSON = ''
If LockPermissionLevel NE 0 then
LockList = Database_Services('GetUserLocks')
If Error_Services('NoError') then
If SRP_JSON(objJSON, 'New', 'Object') then
If SRP_JSON(LockArray, 'New', 'Array') then
For each Row in LockList using @FM setting fPos
If Row<0,3> = "Rev30536" then Row<0,3> = 'RDS*LSL2'
If Field(Row<0,3>, "*", 2) EQ 'LSL2' OR LockPermissionLevel EQ 2 then
If SRP_JSON(objRow, 'New', 'Object') then
SRP_JSON(objRow, 'SetValue', 'ComputerName', Row<0, 1>)
SRP_JSON(objRow, 'SetValue', 'Volume', Row<0, 2>)
If Field(Row<0,3>, "*", 2) EQ 'LSL2' then Row<0,3> = Field(Row<0,3>, "*", 1)
SRP_JSON(objRow, 'SetValue', 'OSFile', Row<0, 3>)
SRP_JSON(objRow, 'SetValue', 'RecordKey', Row<0, 4>, "String")
SRP_JSON(objRow, 'SetValue', 'Exclusive', Row<0, 5>)
SRP_JSON(objRow, 'SetValue', 'REVFile', Row<0, 6>)
SRP_JSON(LockArray, 'Add', objRow)
SRP_JSON(objRow, 'Release')
end
End
Next Row
SRP_JSON(objJSON, 'Set', 'Locks', LockArray)
SRP_JSON(LockArray, 'Release')
end
LockJSON = SRP_JSON(objJSON, 'Stringify', 'Styled')
SRP_JSON(objJSON, 'Release')
end
end
End
Response = LockJSON
End Service
//----------------------------------------------------------------------------------------------------------------------
// AttemptUnlock
//
// CurrUser - [Required]
// LotType - [Required]
// Key - [Required]
//
// Returns either 1 for success, or error message
//
//----------------------------------------------------------------------------------------------------------------------
Service AttemptUnlock(CurrUser, LotType, Key)
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
If LockPermissionLevel NE 0 then
If LotType EQ 'RDS' or LotType EQ 'WM_OUT' then
If Xlate(LotType, Key, '', 'X', '') NE '' then
LockArray = Lock_Services('GetChildRecords', LotType, Key)
LockCount = DCount(LockArray<1>, @VM)
For I = 1 to LockCount
Table = LockArray<1,I>
KeyID = LockArray<2,I>
Resp = Database_Services('UnlockKeyID', Table, KeyID)
Next I
If Error_Services('NoError') Then
Response = TRUE$
end else
Response = FALSE$
Error_Services('Add', 'Records failed to unlock.')
end
end else
Response = FALSE$
Error_Services('Add', 'This record does not exist.')
end
End Else
Response = FALSE$
Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
end
end else
Response = FALSE$
Error_Services('Add', 'User is not permitted to access this resource.')
end
End Service
//----------------------------------------------------------------------------------------------------------------------
// GetChildRecords
//
// LotType - [Required]
// Key - [Required]
//
// Returns an array of associated child records for unlocking
//
//----------------------------------------------------------------------------------------------------------------------
Service GetChildRecords(LotType, Key)
RecordArray = ''
Begin Case
Case LotType EQ 'RDS'
RDSRec = Xlate('RDS', Key, '', 'X', '')
If RDSRec NE '' then
//Add RDS key
RecordArray<1> = LotType
RecordArray<2> = Key
//Get REACT_RUN record
ReactRunRec = Xlate('REACT_RUN', Key, '', 'X', '')
//Get and Add CLEAN_INSP keys
CINos = ReactRunRec<REACT_RUN_CI_NO$>
If CINos NE '' then
CICount = Dcount(CINos, @VM)
For I = 1 to CICount
If CINos<I> NE '' then
RecordArray<1,-1> = 'CLEAN_INSP'
RecordArray<2,-1> = CINos<I>
end
Next I
end
//Get and Add RDS_TEST keys
RDSLayerKeys = ReactRunRec<REACT_RUN_RDS_LAYER_KEYS$>
If RDSLayerKeys NE '' then
LayerKeyCount = DCount(RDSLayerKeys, @VM)
For K = 1 to LayerKeyCount
RDSTestKeys = Xlate('RDS_LAYER', RDSLayerKeys<K>, 'RDS_TEST_KEYS', 'X', '')
If RDSTestKeys NE '' then
RDSTestCount = DCount(RDSTestKeys, @VM)
For L = 1 to RDSTestCount
If RDSTestKeys<K,L> NE '' then
RecordArray<1,-1> = 'RDS_TEST'
RecordArray<2,-1> = RDSTestKeys<K,L>
end
Next L
end
Next K
end
//Get WO_MAT key
WONo = RDSRec<RDS_WO$>
CassNo = RDSRec<RDS_CASS_NO$>
WOMatKey = WONo : '*' : CassNo
//Get and Add WO_MAT_QA
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
If WOMatQA NE '' then
RecordArray<1,-1> = 'WO_MAT_QA'
RecordArray<2,-1> = WOMatKey
End
//Get and Add NCR keys
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
If NCRKeys NE '' then
NCRCount = Dcount(NCRKeys, @VM)
For J = 1 to NCRCount
If NCRKeys<J> NE '' then
RecordArray<1,-1> = 'NCR'
RecordArray<2,-1> = NCRKeys<J>
end
Next J
end
end else
Error_Services('Add', 'This RDS does not exist.')
Return
end
Case LotType EQ 'WM_OUT'
WMOutRec = Xlate('WM_OUT', Key, '', 'X', '')
If WMOutRec NE '' then
//Add WM_OUT key
RecordArray<1> = LotType
RecordArray<2> = Key
//Get and Add CLEAN_INSP keys
CINos = WMOutRec<WM_OUT_CI_NO$>
If CINos NE '' then
CICount = Dcount(CINos, @VM)
For I = 1 to CICount
If CINos<I> NE '' then
RecordArray<1,-1> = 'CLEAN_INSP'
RecordArray<2,-1> = CINos<I>
end
Next I
end
//Get WO_MAT key
WONo = FIELD(Key,'*',1)
CassNo = FIELD(Key,'*',3)
WOMatKey = WONo : '*' : CassNo
//Get and Add WO_MAT_QA key
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
If WOMatQA NE '' then
RecordArray<1,-1> = 'WO_MAT_QA'
RecordArray<2,-1> = WOMatKey
End
//Get and Add NCR keys
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
If NCRKeys NE '' then
NCRCount = Dcount(NCRKeys, @VM)
For J = 1 to NCRCount
If NCRKeys<J> NE '' then
RecordArray<1,-1> = 'NCR'
RecordArray<2,-1> = NCRKeys<J>
end
Next J
end
end else
Error_Services('Add', 'This WM_OUT does not exist.')
end
Case OTHERWISE$
Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
return
End Case
If RecordArray NE '' then
Response = RecordArray
end
End Service
//----------------------------------------------------------------------------------------------------------------------
// GetUnprotectedTables
//
// Returns an array of unprotected tables
//
//----------------------------------------------------------------------------------------------------------------------
Service GetUnprotectedTables()
TableArray = List_Volume_Sub('LSL', '', 'TABLE_NAME', 'TABLE_NAME')
UnprotectedArray = ''
For Each Table in TableArray Using @FM
If Table[1,1] NE '!' AND Table[1,5] NE 'DICT.' then
UnprotectedArray<-1> = Table
end
Next Table
Response = UnprotectedArray
End Service
//----------------------------------------------------------------------------------------------------------------------
// LogUnlockRequest
//
// CurrUser - [Required]
// TableName - [Required]
// RecordKey - [Required]
// Success - [Required]
//
// Creates an UNLOCK_REQUESTS record to log unlock attempts.
//
//----------------------------------------------------------------------------------------------------------------------
Service LogUnlockRequest(TableName, RecordKey, CurrUser, Success)
NewRequestRec = ''
CurrDateTime = Datetime()
RecordID = CurrDateTime :'*': TableName
NewRequestRec<UNLOCK_REQUESTS_RECORD_KEY$> = RecordKey
NewRequestRec<UNLOCK_REQUESTS_USER_NAME$> = CurrUser
NewRequestRec<UNLOCK_REQUESTS_SUCCESS$> = Success
Database_Services('WriteDataRow', 'UNLOCK_REQUESTS', RecordID, NewRequestRec, 1, 0, 0)
End Service

File diff suppressed because it is too large Load Diff

View File

@ -69,10 +69,10 @@ $Insert QUOTE_DET_EQU
$Insert QUOTE_SIGS_EQU
$Insert REACT_RUN_EQUATES
$Insert WM_OUT_EQUATES
$Insert WO_STEP_EQU
$Insert ORDER_EQU
$Insert ORDER_DET_EQU
$Insert RLIST_EQUATES
$Insert WO_STEP_EQUATES
EQU COL$QUOTE_DESC TO 1
EQU COL$SETUP_CHG TO 4
@ -116,10 +116,10 @@ EQU COL$STEP_SCHED_DTM TO 11
EQU COMMA$ to ','
Declare subroutine Errmsg, Btree.Extract, Set_Status, Logging_Services, Work_Order_Services, Start_Window, obj_WO_Log
Declare subroutine obj_Notes, Comm_Customer_Epi, Print_WO, obj_WO_Mat, obj_WM_In, obj_WO_Mat, obj_RDS
Declare subroutine Security_Err_Msg, obj_WM_Out, Database_Services, End_Window, Print_Shelf_Label
Declare subroutine obj_Notes, Comm_Customer_Epi, Print_WO, obj_WO_Mat, obj_WM_In, obj_WO_Mat, obj_RDS, Msg
Declare subroutine Security_Err_Msg, obj_WM_Out, Database_Services, End_Window, Print_Shelf_Label, Signature_Services
Declare function obj_WO_Log, Work_Order_Services, Environment_Services, Logging_Services, Memberof, NextKey
Declare function Database_Services, Unassigned, obj_WO_Mat, obj_RDS, Security_Check, obj_WM_Out
Declare function Database_Services, Unassigned, obj_WO_Mat, obj_RDS, Security_Check, obj_WM_Out, Error_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
@ -1187,15 +1187,13 @@ end event
Event PUB_REM_CASS.CLICK()
WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT')
WOStepKey = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
IF WONo NE '' then
WORec = XLATE('WO_LOG',WONo,'','X')
WOMatKeys = WORec<WO_LOG_WO_MAT_KEY$>
WMInKeys = XLATE('WO_MAT',WOMatKeys,WO_MAT_WMI_KEY$,'X')
WMInKeys = XLATE('WO_MAT',WOMatKeys,WO_MAT_WMI_KEY$,'X')
WMInKeys = XLATE('WO_STEP', WOStepKey, WO_STEP_WM_IN_KEYS$, 'X')
WMInTestSTring = WMInKeys
CONVERT @VM TO '' IN WMInTestString
@ -1212,7 +1210,7 @@ Event PUB_REM_CASS.CLICK()
DispLine = 1
IF WMInTestString NE '' THEN
//EPP Case for WMI
FOR I = WMInCnt TO 1 STEP -1
WMIRec = XLATE('WM_IN',WMInKeys<1,I>,'','X')
WMIRdsNos = WMIRec<WM_IN_RDS_NO$>
@ -1256,26 +1254,15 @@ Event PUB_REM_CASS.CLICK()
NEXT I
TestWMInKeys = DelWMInKeys
CONVERT @VM TO '' IN TestWMInKeys
IF TestWMInKeys NE '' THEN
Set_Status(0)
obj_WM_In('Delete',DelWMInKeys) ;* Removes WMI records from system
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
END
Set_Status(0)
obj_WO_Log('RemoveCassettes',WONo:@RM:CassNos)
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
for each DelWMInKey in DelWMInKeys using @VM
Work_Order_Services('SignVoidWMI', DelWMInKey, @USER4)
Next DelWMInKey
END
END ELSE
//Non-EPP Case for RDS
CassCnt = COUNT(WOMatKeys,@VM) + (WOMatKeys NE '')
FOR I = CassCnt TO 1 STEP -1
@ -1289,14 +1276,15 @@ Event PUB_REM_CASS.CLICK()
CONVERT @VM TO '' IN WOMatSigs
UNTIL WOMatSigs NE ''
Display<1,DispLine,1> = WOMatKeys<1,I>[-1,'B*']
Display<1,DispLine,2> = WOMatRec<WO_MAT_LOT_NO$>
Display<1,DispLine,3> = WOMatRec<WO_MAT_WAFER_QTY$>
Display<1,DispLine,4> = WOMatRec<WO_MAT_RDS_NO$>
Display<1,DispLine,5> = OCONV(WOMatCurrStatus,'[WO_MAT_CURR_STATUS_CONV]')
DispLine += 1
If WoMatCurrStatus NE 'VOID' then
Display<1,DispLine,1> = WOMatKeys<1,I>[-1,'B*']
Display<1,DispLine,2> = WOMatRec<WO_MAT_LOT_NO$>
Display<1,DispLine,3> = WOMatRec<WO_MAT_WAFER_QTY$>
Display<1,DispLine,4> = WOMatRec<WO_MAT_RDS_NO$>
Display<1,DispLine,5> = OCONV(WOMatCurrStatus,'[WO_MAT_CURR_STATUS_CONV]')
DispLine += 1
end
NEXT I
IF Display NE '' THEN
TypeOver = ''
TypeOver<PDISPLAY$> = Display
@ -1322,23 +1310,18 @@ Event PUB_REM_CASS.CLICK()
END
NEXT I
TestRDSNos = RDSNos
CONVERT @VM TO '' IN TestRDSNos
IF TestRDSNos NE '' THEN
Set_Status(0)
InProcessRDSNos = obj_RDS('Delete',RDSNos) ;* Removes RDS records from system
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
END
Set_Status(0)
obj_WO_Log('RemoveCassettes',WONo:@RM:CassNos)
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
VoidStatusMessage = ''
for each CassNo in CassNos using @VM
WoMatKey = WONo : '*' : CassNo
Work_Order_Services('SignVoidNonEpp', WoMatKey, @USER4)
If Error_Services('HasError') then
VoidStatusMessage = Error_Services('GetMessage')
end
Next CassNo
If VoidStatusMessage EQ '' then
VoidStatusMessage = 'All cassettes have been queued for void.'
end
Msg(@Window, VoidStatusMessage)
END
IF Display = '' THEN
@ -1374,14 +1357,13 @@ end event
Event PUB_REM_WM_OUT.CLICK()
WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT')
WOStepKey = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
IF WONo NE '' then
WORec = XLATE('WO_LOG',WONo,'','X')
WOMatKeys = WORec<WO_LOG_WO_MAT_KEY$>
WMOutKeys = XLATE('WO_MAT',WOMatKeys,WO_MAT_WMO_KEY$,'X')
WMOutKeys = Database_Services('ReadDataColumn', 'WO_STEP', WOStepKey, WO_STEP_WM_OUT_KEYS$, True$, 0, False$)
WMOutCnt = COUNT(WMOutKeys,@VM) + (WMOutKeys NE '')
Display = ''
@ -1422,21 +1404,15 @@ Event PUB_REM_WM_OUT.CLICK()
NEXT I
TestWMOutKeys = DelWMOutKeys
CONVERT @VM TO '' IN TestWMOutKeys
IF TestWMOutKeys NE '' THEN
Set_Status(0)
obj_WM_Out('Delete',DelWMOutKeys) ;* Removes WMO records from system
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
for each WMOutKey in TestWMOutKeys using @VM
Work_Order_Services('SignVoidWMO', WMOutKey, @USER4)
Next WMOutKey
If Error_Services('HasError') then
Msg(@Window, Error_Services('GetMessage'))
end
END
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
END
IF Display = '' THEN
@ -2163,3 +2139,6 @@ StartStopDate:
return

View File

@ -296,7 +296,6 @@ RETURN
* * * * * * *
RemainingSlots:
* * * * * * *
WONo = Parms[1,@RM]
WOStep = Parms[COL2()+1,@RM]
CassNos = Parms[COL2()+1,@RM]
@ -321,7 +320,7 @@ RemainingSlots:
WMInRec = XLATE('WM_IN',WONo:'*':WOStep:'*':CassNo,'','X')
WOMatRec = XLATE('WO_MAT',WONo:'*':CassNo,'','X')
IF WOMatRec<WO_MAT_HOLD$> = 1 AND WOMatRec<WO_MAT_HOLD_ENTITY$,1> = 'WM_IN' THEN
IF (WOMatRec<WO_MAT_HOLD$> = 1 AND WOMatRec<WO_MAT_HOLD_ENTITY$,1> = 'WM_IN') OR WMInRec<WM_IN_VOID$> EQ True$ THEN
NULL ;* Box is on hold - skip it
END ELSE
SlotCnt = COUNT(WMInRec<WM_IN_SLOT_NO$>,@VM) + (WMInRec<WM_IN_SLOT_NO$> NE '')
@ -935,3 +934,5 @@ RepProdTW:
RETURN

View File

@ -585,7 +585,7 @@ RETURN
* * * * * * *
NextOpenSlots:
* * * * * * *
WONo = Parms[1,@RM]
WOStep = Parms[COL2()+1,@RM]
CassNos = Parms[COL2()+1,@RM]
@ -632,7 +632,8 @@ NextOpenSlots:
SlotCnt = COUNT(WMOutRec<WM_OUT_SLOT_NO$>,@VM) + (WMOutRec<WM_OUT_SLOT_NO$> NE '')
IsMULot = WMOutRec EQ True$
IsFQASigned = WMOutRec<WM_OUT_SUP_VER_SIG$> NE ''
If Not(IsMULot) AND Not(IsFQASigned) then
IsVoided = WMOutRec<WM_OUT_VOID$>
If Not(IsMULot) AND Not(IsFQASigned) AND Not(IsVoided) then
FOR N = SlotCnt TO 1 STEP -1
IF WMOutRec<WM_OUT_SLOT_NO$,N> NE '' AND WMOutRec<WM_OUT_RDS$,N> = '' AND WMOutRec<WM_OUT_SLOT_NCR$,N> = '' AND WMOutRec<WM_OUT_UMW_CASS_ID$,N> = '' THEN
@ -2010,3 +2011,5 @@ ConvertCleanInsp:
RETURN

View File

@ -800,6 +800,12 @@ IF WMIKey NE '' OR WMOKey NE '' THEN
Result = 'RTB'
Case WMIStatus EQ 'HOLD' and WMOStatus NE ''
Result = WMOStatus
Case WMIStatus EQ 'VOID' and WMOStatus EQ 'VOID'
Result = 'VOID'
Case WMIStatus EQ 'VOID' and WMOStatus NE 'VOID'
Result = WMOStatus
Case WMIStatus NE 'VOID' and WMOStatus EQ 'VOID'
Result = WMIStatus
CASE InboundStat = '' AND OutboundStat = ''
Result = ''
@ -3254,9 +3260,9 @@ ReportStatus:
RETURN
END
IF WMIKey NE '' THEN
IF WMIStatus = 'MT' OR WMIStatus = 'VOID' THEN
IF WMIStatus = 'MT' THEN
NULL
END ELSE
InboundStat = WMIStatus
@ -3267,41 +3273,49 @@ ReportStatus:
* Removed "( WMOMakeup = 1 AND WMOStatus = 'MT' ) from the OR conditions * 5/1/2014 JCH
IF WMOStatus = 'RTB' OR WMOStatus = 'VOID' THEN
IF WMOStatus = 'RTB' THEN
NULL
END ELSE
OutboundStat = WMOStatus
END
END
BEGIN CASE
CASE InboundStat = '' AND OutboundStat = ''
Result = ''
CASE InboundStat = '' AND OutboundStat NE ''
IF WMOMakeup = 1 THEN
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END ELSE
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END
Result = OutboundStat
CASE InboundStat NE '' AND OutboundStat = ''
Result = 'WMI':' - ':OCONV(WMIStatus,'[WM_IN_CURR_STATUS_CONV]')
CASE InboundStat NE '' AND OutboundStat NE ''
Result = 'WMI':' - ':OCONV(WMIStatus,'[WM_IN_CURR_STATUS_CONV]'):@VM
IF WMOMakeup = 1 THEN
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END ELSE
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END
Result = Result:OutboundStat
END CASE
BEGIN CASE
CASE InboundStat = '' AND OutboundStat = ''
Result = ''
CASE InboundStat = '' AND OutboundStat NE ''
IF WMOMakeup = 1 THEN
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END ELSE
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END
Result = OutboundStat
CASE InboundStat NE '' AND OutboundStat = ''
Result = 'WMI':' - ':OCONV(WMIStatus,'[WM_IN_CURR_STATUS_CONV]')
CASE InboundStat NE '' AND OutboundStat NE ''
Result = 'WMI':' - ':OCONV(WMIStatus,'[WM_IN_CURR_STATUS_CONV]'):@VM
IF WMOMakeup = 1 THEN
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END ELSE
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END
Result = Result:OutboundStat
END CASE
Begin Case
Case InboundStat NE 'VOID' AND OutboundStat NE 'VOID'
Result = Result
Case InboundStat EQ 'VOID' AND OutboundStat NE 'VOID'
Result = OutboundStat
Case InboundStat NE 'VOID' AND OutboundStat EQ 'VOID'
Result = InboundStat
Case InboundStat EQ 'VOID' AND OutboundStat EQ 'VOID'
Result = 'VOID'
End Case
RETURN
@ -5604,3 +5618,4 @@ RETURN

View File

@ -17,9 +17,9 @@ COMPILE FUNCTION obj_WO_Mat_Log(Method,Parms)
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, NextKey, Popup, Get_Property, obj_RDS, Database_Services
Declare function Logging_Services, Environment_Services, RTI_CreateGUID, Error_Services
Declare function Logging_Services, Environment_Services, RTI_CreateGUID, Error_Services, Datetime
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, Btree.Extract, ErrMsg, Send_Dyn, RList, obj_WO_Log, Send_Event, obj_RDS
DECLARE SUBROUTINE obj_WO_Mat, Send_Info, obj_Notes, Logging_Services, Database_Services
DECLARE SUBROUTINE obj_WO_Mat, Send_Info, obj_Notes, Logging_Services, Database_Services, Lot_Services
$INSERT MSG_EQUATES
$INSERT WO_MAT_LOG_EQUATES
@ -27,6 +27,7 @@ $INSERT WM_OUT_EQUATES
$INSERT WM_IN_EQUATES
$INSERT WO_MAT_EQUATES
$INSERT RDS_EQU
$Insert WO_LOG_EQUATES
$INSERT LSL_USERS_EQUATES
$INSERT SRPMail_Inserts
@ -158,10 +159,79 @@ Create:
* END
Database_Services('WriteDataRow', 'WO_MAT_LOG', WOMatLogKey, WOMatLogRec, True$, False$, True$)
If Error_Services('HasError') then
ErrorMsg = Error_Services('GetMessage')
end else
If Error_Services('NoError') then
ReactType = XLATE('WO_LOG', WONos, WO_LOG_REACT_TYPE$, 'X')
If ReactType NE 'EPP' then
WONo = WoNos
CassNo = CassNos
WOMatKey = WONo : '*' : CassNo
RDSKey = XLATE('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSKey, 'RDS', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Services('CreateLotEvent', WOMatKey, 'WO_MAT', Datetime(), Action, '', '', 0, 0, '', UserID)
end else
Begin Case
Case Action EQ 'RCVD'
//WMI
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'REL'
//WMI
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ '1VER'
//RDS action, do nothing for now
Case Action EQ '1LOAD'
//RDS, do nothing for now
Case Action EQ '1UNLOAD'
//RDS, do nothing for now
Case Action EQ '1MO_PSTI'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ '1MO_QA'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'PACK'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'PSVER'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'SHIP'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'LBLCHK'
//WMO
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
End Case
end
ErrorMsg = ''
end else
ErrorMsg = Error_Services('GetMessage')
end
RETURN
@ -270,11 +340,7 @@ Post:
LockedToolID = ScanToolID
LockedScanEntry = ScanEntry
END ELSE
NULL
END
END
NEXT I
WMLRec<WO_MAT_LOG_WO_NO$> = LockedWONos
@ -298,5 +364,3 @@ Post:
end
RETURN

View File

@ -2517,8 +2517,6 @@ Service SignLoadStage(RDSNo, Username, WaferQty, LLSide, ScanEntry)
Error_Services('Set', ErrorMsg)
Response = False$
return
end else
Lot_Services('CreateLotEvent', RDSNo, 'RDS', Datetime(), 'LOAD', 'Load stage signed', Reactor, '', '', '', Username)
end
IF ReactorType NE 'EPP' THEN
@ -3893,3 +3891,5 @@ ClearCursors:
return

View File

@ -686,8 +686,9 @@ WRITE_RECORD_PRE:
If NewLoadSig EQ '' then
// Audit the LOT_EVENT table for missing LOAD event (i.e., signature)
If RowExists('LOT', RDSNo) then
LotEvents = Lot_Services('GetLotEventsInSequence', RDSNo)
ExistingNGLotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
If RowExists('LOT', ExistingNGLotId) then
LotEvents = Lot_Services('GetLotEventsInSequence', ExistingNGLotId)
If LotEvents NE '' then
LotEventsRev = SRP_Array('Reverse', LotEvents, @FM)
LotEventsTypesRev = Xlate('LOT_EVENT', LotEventsRev, LOT_EVENT_LOT_EVENT_TYPE$, 'X')

View File

@ -427,7 +427,6 @@ Event PUB_SIGN.CLICK()
Send_Event(@Window, 'READ')
Case SignEventType EQ 'Unsign'
// 1. Check if on hold. If so, then block event and inform user
WOMatKey = WONo:'*':CassNo
WOMatCurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)

View File

@ -1759,6 +1759,26 @@ Service ApplyAbortMetrology(RdsKeys)
end service
Service DetachRDSFromWO(RDSNo)
ErrorMessage = ''
If RowExists('RDS', RDSNo) then
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
if Error_Services('NoError') then
RDSRec<RDS_WO$> = ''
Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, False$, False$, False$)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Error detaching RDS ' : RDSNo ' from work order. RDS No not found in RDS table.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
@ -1778,3 +1798,5 @@ return

View File

@ -64,9 +64,9 @@ Options BOOLEAN = True$, False$
// Returns an array of active services for the indicated server.
//----------------------------------------------------------------------------------------------------------------------
Service GetServices(Server)
Services = ''
If Server NE '' then
Sentence = 'SELECT SERVICES WITH SERVER EQ ' : Quote(Server) : ' AND WITH ACTIVE EQ "Yes"'
rv = Set_Status(0)
@ -82,7 +82,7 @@ Service GetServices(Server)
end
Repeat
end
Sentence = 'SELECT SERVICES WITH SERVER EQ "" AND WITH ACTIVE EQ "Yes"'
rv = Set_Status(0)
RList(Sentence, TARGET_ACTIVELIST$, '', '', '')
@ -101,9 +101,9 @@ Service GetServices(Server)
end else
Error_Services('Add', 'Server argument was missing from the ' : Service : ' service.')
end
Response = Services
end service
@ -113,7 +113,7 @@ end service
// Returns an array of active services for the indicated server.
//----------------------------------------------------------------------------------------------------------------------
Service GetServiceKeys()
Services = ''
Sentence = 'SELECT SERVICES BY NAME'
rv = Set_Status(0)
@ -127,9 +127,9 @@ Service GetServiceKeys()
Repeat
end
Services[-1, 1] = ''
Response = Services
end service
@ -139,35 +139,36 @@ end service
// Returns the details of the indicated service.
//----------------------------------------------------------------------------------------------------------------------
Service GetService(Service)
ServiceDetails = ''
If Service NE '' then
ServiceDetails = Database_Services('ReadDataRow', 'SERVICES', Service)
end else
Error_Services('Add', 'Service argument was missing from the ' : Service : ' service.')
end
Response = ServiceDetails
end service
Service ProcessProcedureQueue()
Open 'PROC_QUEUE' to hProcQueue then
Select hProcQueue
Select hProcQueue
EOF = False$
Loop
ReadNext RequestKeyID else EOF = True$
Until EOF
Lock hProcQueue, RequestKeyID then
Lock hProcQueue, RequestKeyID then
Database_Services('GetKeyIDLock', 'PROC_QUEUE', RequestKeyId)
RequestRow = Database_Services('ReadDataRow', 'PROC_QUEUE', RequestKeyID)
If RequestRow NE '' then
Procedure = RequestRow<PROC_QUEUE.PROC_NAME$>
Params = RequestRow<PROC_QUEUE.PARAMS$>
If Procedure NE '' then
Dim ProcParams(10)
Dim ProcParams(11)
For each Param in Params using @VM setting pPos
ProcParams(pPos) = Param
Next Param
@ -183,7 +184,8 @@ Service ProcessProcedureQueue()
Case NumArguments EQ 7 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7))
Case NumArguments EQ 8 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8))
Case NumArguments EQ 9 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8), ProcParams(9))
Case Otherwise$ ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8), ProcParams(9), ProcParams(10))
Case NumArguments EQ 10 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8), ProcParams(9), ProcParams(10))
Case Otherwise$ ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8), ProcParams(9), ProcParams(10), ProcParams(11))
End Case
end
end
@ -197,12 +199,13 @@ Service ProcessProcedureQueue()
Unlock hProcQueue, RequestKeyID else Null
end
Repeat
end
end service
Service PostProcecure(ProcedureName, Params)
Service PostProcedure(ProcedureName, Params)
Response = ''
If (ProcedureName NE '') then
@ -210,17 +213,17 @@ Service PostProcecure(ProcedureName, Params)
RequestRow = ''
RequestRow<PROC_QUEUE.PROC_NAME$> = ProcedureName
RequestRow<PROC_QUEUE.PARAMS$> = Params
RequestRow<PROC_QUEUE.ENTRY_DTM$> = Datetime()
Database_Services('WriteDataRow', 'PROC_QUEUE', RequestKeyID, RequestRow, True$, False$, False$)
end else
Error_Services('Add', 'Error in ':Service:' service. Null ProcedureName passed in.')
end
return
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
/// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -55,7 +55,7 @@ $Insert WM_IN_EQUATES
Declare function Database_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime
Declare subroutine Database_Services,
Declare subroutine Database_Services, Set_Status, OBJ_WO_MAT_LOG
GoToService
@ -121,3 +121,46 @@ Service AddComment(WMInNo, Comment)
End Service
Service SetVoidFlag(WMInKey, Username)
ErrorMessage = ''
If RowExists('WM_IN', WMInKey) then
WMInRec = Database_Services('ReadDataRow', 'WM_IN', WMInKey, True$, 0, False$)
If Error_Services('NoError') then
WMInRec<WM_IN_VOID$> = True$
Database_Services('WriteDataRow', 'WM_IN', WMInKey, WMInRec, True$, False, False$)
If Error_Services('NoError') then
Set_Status(0)
WONo = Field(WMInKey, '*', 1)
CassNo = Field(WMInKey, '*', 3)
WOMLParms = ''
LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM
LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM
Action = 'WM_IN_VOID' ; WOMLParms := Action:@RM
WhCd = 'CR' ; WOMLParms := WhCd:@RM
LocCd = 'VOID' ; WOMLParms := LocCd:@RM
WONos = WONo ; WOMLParms := WONos:@RM
CassNos = CassNo ; WOMLParms := CassNos:@RM
UserID = Username ; WOMLParms := UserID:@RM
Tags = '' ; WOMLParms := Tags:@RM
ToolID = '' ; WOMLParms := ToolID:@RM
WOMLParms := ''
obj_WO_Mat_Log('Create',WOMLParms)
IF Get_Status(errCode) THEN
ErrorMessage = 'Error writing inventory transactions'
end
end else
ErrorMessage = 'Failed to write to the WM_IN record ' : WMInKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Failed to read WM_IN record ' : WMInKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Invalid WM_IN Key ' : WMInKey : ' passed to SetVoidFlag routine.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service

View File

@ -60,7 +60,7 @@ $Insert RETURN_TO_FAB_LOTS_EQUATES
Declare function Database_Services, SRP_JSON, Error_Services, Clean_Insp_Services, WO_Mat_QA_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Return_To_Fab_Services
Declare subroutine Database_Services, SRP_JSON, Error_Services, Extract_Si_Keys
Declare subroutine Database_Services, SRP_JSON, Error_Services, Extract_Si_Keys, Set_Status, obj_wo_mat_log
GoToService
@ -397,4 +397,47 @@ Service GetWaferMap(WMOKey)
end service
Service SetVoidFlag(WMOutKey, Username)
ErrorMessage = ''
If RowExists('WM_OUT', WMOutKey) then
WMOutRec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey, True$, 0, False$)
If Error_Services('NoError') then
WMOutRec<WM_OUT_VOID$> = True$
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec, True$, False, False$)
If Error_Services('NoError') then
Set_Status(0)
WONo = Field(WMOutKey, '*', 1)
CassNo = Field(WMOutKey, '*', 3)
WOMLParms = ''
LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM
LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM
Action = 'WM_OUT_VOID' ; WOMLParms := Action:@RM
WhCd = 'CR' ; WOMLParms := WhCd:@RM
LocCd = 'VOID' ; WOMLParms := LocCd:@RM
WONos = WONo ; WOMLParms := WONos:@RM
CassNos = CassNo ; WOMLParms := CassNos:@RM
UserID = Username ; WOMLParms := UserID:@RM
Tags = '' ; WOMLParms := Tags:@RM
ToolID = '' ; WOMLParms := ToolID:@RM
WOMLParms := ''
obj_WO_Mat_Log('Create',WOMLParms)
IF Get_Status(errCode) THEN
ErrorMessage = 'Error writing inventory transactions'
end
end else
ErrorMessage = 'Failed to write to the WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Failed to read WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Invalid WM_OUT Key ' : WMOutKey : ' passed to SetVoidFlag routine.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service

View File

@ -45,13 +45,16 @@ $insert LOGICAL
$insert RLIST_EQUATES
$insert COMPANY_EQUATES
$Insert NOTIFICATION_EQUATES
$Insert WM_IN_EQUATES
$Insert WM_OUT_EQUATES
Declare subroutine Error_Services, Work_Order_Services, Memory_Services, RList, Database_Services, SRP_JSON
Declare subroutine Btree.Extract, Set_Status, obj_WO_Log, obj_Notes, Print_Wo_Mat_In_Labels, Print_Wo_Mat_Out_Labels
Declare subroutine Print_Wmi_Labels, Print_Wmo_Labels, ErrMsg, Print_Cass_Labels, Logging_Services
Declare subroutine Print_Wmi_Labels, Print_Wmo_Labels, ErrMsg, Print_Cass_Labels, Logging_Services, Service_Services
Declare subroutine obj_WO_Mat_Log, WO_MAT_SERVICES
Declare function SRP_Array, Work_Order_Services, Memory_Services, Database_Services, SRP_Sort_Array, SRP_JSON
Declare function Company_Services, obj_Prod_Spec, Schedule_Services, Datetime, obj_WO_Log, obj_WO_Step, Memberof
Declare function Environment_Services, Logging_Services
Declare function Environment_Services, Logging_Services, Hold_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
@ -60,6 +63,13 @@ LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Re
Headers = 'Logging DTM' : @FM : 'User' : @FM : 'Notes'
objReleaseLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$,',', Headers, '', False$, False$)
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Void Log.csv'
Headers = 'Logging DTM' : @FM : 'User' : @FM : 'CassetteId' : @FM : 'Notes'
objVoidLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$,',', Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
GoToService else
@ -1044,6 +1054,263 @@ Service ConvertRecordToJSON(WONo, Record, ItemURL)
Response = jsonRecord
end service
Service RemoveWoMatCassetteFromWO(WoMatKey, Username)
ErrorMessage = ''
If RowExists('WO_MAT', WoMatKey) then
WoNo = Field(WoMatKey, '*', 1)
WOLogRecord = Database_Services('ReadDataRow', 'WO_LOG', WoNo, True$, 0, False$)
If Error_Services('NoError') then
WoMatKeys = WOLogRecord<WO_LOG_WO_MAT_KEY$>
Locate WoMatKey in WoMatKeys using @VM setting CassPos then
WoLogRecord<WO_LOG_WO_MAT_KEY$> = Delete(WOLogRecord<WO_LOG_WO_MAT_KEY$>, 1, CassPos, 0)
Database_Services('WriteDataRow', 'WO_LOG', WoNo, WoLogRecord)
If Error_Services('NoError') then
Work_Order_Services('UpdateReceivedQty', WONo)
Work_Order_Services('UpdateReleasedQty', WONo)
Work_Order_Services('UpdateUnscheduledQuantities')
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = "Unable to locate cass no " : WoMatKey : ' in the WO_LOG ' : WoNo : ' Record.'
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Invalid WoMat Key ' : WoMatKey : ' passed to RemoveWoMatCassetteFromWO routine.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service
Service SignVoidNonEpp(WOMatKey, Username)
ErrorMessage = ''
WONo = Field(WOMatKey, '*', 1)
CassNo = Field(WoMatKey, '*', 2)
ReactType = XLATE('WO_LOG', WONo, WO_LOG_REACT_TYPE$, 'X')
If ReactType EQ 'ASM' OR ReactType EQ 'ASM+' OR ReactType EQ 'HTR' then
RDSNo = Database_Services('ReadDataColumn', 'WO_MAT', WoMatKey, WO_MAT_RDS_NO$, True$, 0, False$)
If Error_Services('NoError') then
WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$)
IsVoided = WoMatRec<WO_MAT_VOID$>
If Not(IsVoided) then
IsOnHold = Hold_Services('CheckForHold', WoMatKey)
If Not(IsOnHold) then
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'RemoveWoMatCassetteFromWO':@vm:WOMatKey:@vm:Username)
If Error_Services('NoError') then
Service_Services('PostProcedure', 'WO_MAT_SERVICES', 'SetWoMatVoidFlag':@vm:WOMatKey:@VM:Username)
if Error_Services('NoError') then
Service_Services('PostProcedure', 'RDS_SERVICES', 'DetachRDSFromWO':@vm:RDSNo)
If Error_Services('NoError') then
LotEventParams = ''
LotEventParams<1,1> = 'CreateLotEvent'
LotEventParams<1,4> = DateTime()
LotEventParams<1,5> = 'VOID'
LotEventParams<1,6> = 'Lot voided by ' : Username
LotEventParams<1,11> = Username
If RDSNo NE '' then
LotEventParams<1,2> = RDSNo
LotEventParams<1,3> = 'RDS'
Service_Services('PostProcedure', 'LOT_SERVICES', LotEventParams)
end else
LotEventParams<1,2> = WoMatKey
LotEventParams<1,3> = 'WO_MAT'
Service_Services('PostProcedure', 'LOT_SERVICES', LotEventParams)
end
If Error_Services('NoError') then
//Add inventory transaction
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = 'Unable to void lot as it is already voided.'
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Cannot use this routine to void EpiPro lots.'
end
If ErrorMessage NE '' then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WOMatKey
LogData<4> = ErrorMessage
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WOMatKey
LogData<4> = 'Void queued successfully.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end
end service
Service SignVoidWMI(WMInKey, Username)
ErrorMessage = ''
WONo = Field(WMInKey, '*', 1)
CassNo = Field(WMInKey, '*', 3)
WoStepKey = Xlate('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
WoMatKey = WONo : '*' : CassNo
ReactType = XLATE('WO_LOG', WONo, WO_LOG_REACT_TYPE$, 'X')
If ReactType EQ 'EPP' then
WMInRec = Database_Services('ReadDataRow', 'WM_IN', WMInKey, True$, 0, False$)
IsVoided = WMInRec<WM_IN_VOID$>
If Not(IsVoided) then
IsOnHold = Hold_Services('CheckForHold', WoMatKey)
If Not(IsOnHold) then
Service_Services('PostProcedure', 'WM_IN_SERVICES', 'SetVoidFlag':@vm:WMInKey:@VM:Username)
If Error_Services('NoError') then
LotEventParams = ''
LotEventParams<1,1> = 'CreateLotEvent'
LotEventParams<1,4> = DateTime()
LotEventParams<1,5> = 'VOID'
LotEventParams<1,6> = 'Lot voided by ' : Username
LotEventParams<1,11> = Username
LotEventParams<1,2> = WMInKey
LotEventParams<1,3> = 'WM_IN'
Service_Services('PostProcedure', 'LOT_SERVICES', LotEventParams)
If Error_Services('NoError') then
//Check if WMO is also voided. If it is, remove it from the WO_MAT_KEY field in WO_LOG, and void the WO_MAT record
WMOKey = WMInKey; //the paired WMO key is the same as the WMIKey
IsWMOVoided = Database_Services('ReadDataColumn', 'WM_OUT', WMOKey, WM_OUT_VOID$)
If IsWMOVoided then
Service_Services('PostProcedure', 'WO_MAT_SERVICES', 'SetWoMatVoidFlag':@VM:WoMatKey:@VM:Username)
If Error_Services('NoError') then
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES','RemoveWoMatCassetteFromWO':@VM:WoMatKey:@VM:Username)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = 'Unable to void lot as it is already voided.'
end
end else
ErrorMessage = 'Cannot use this routine to void EpiPro lots.'
end
If ErrorMessage NE '' then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WMInKey
LogData<4> = ErrorMessage
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WMInKey
LogData<4> = 'Void queued successfully.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end
end service
Service SignVoidWMO(WMOutKey, Username)
ErrorMessage = ''
WONo = Field(WMOutKey, '*', 1)
CassNo = Field(WMOutKey, '*', 3)
WoStepKey = Xlate('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
WoMatKey = WONo : '*' : CassNo
ReactType = XLATE('WO_LOG', WONo, WO_LOG_REACT_TYPE$, 'X')
If ReactType EQ 'EPP' then
WMOutRec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey, True$, 0, False$)
IsVoided = WMOutRec<WM_OUT_VOID$>
If Not(IsVoided) then
IsOnHold = Hold_Services('CheckForHold', WoMatKey)
If Not(IsOnHold) then
Service_Services('PostProcedure', 'WM_OUT_SERVICES', 'SetVoidFlag':@vm:WMOutKey:@VM:Username)
If Error_Services('NoError') then
LotEventParams = ''
LotEventParams<1,1> = 'CreateLotEvent'
LotEventParams<1,4> = DateTime()
LotEventParams<1,5> = 'VOID'
LotEventParams<1,6> = 'Lot voided by ' : Username
LotEventParams<1,11> = Username
LotEventParams<1,2> = WMOutKey
LotEventParams<1,3> = 'WM_OUT'
Service_Services('PostProcedure', 'LOT_SERVICES', LotEventParams)
If Error_Services('NoError') then
//Check if WMI is also voided. If it is, remove it from the WO_MAT_KEY field in WO_LOG, and void the WO_MAT record
WMIKey = WMOutKey; //the paired WMO key is the same as the WMIKey
IsWMIVoided = Database_Services('ReadDataColumn', 'WM_IN', WMIKey, WM_IN_VOID$)
If IsWMIVoided then
Service_Services('PostProcedure', 'WO_MAT_SERVICES', 'SetWoMatVoidFlag':@VM:WoMatKey:@VM:Username)
If Error_Services('NoError') then
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES','RemoveWoMatCassetteFromWO':@VM:WoMatKey:@VM:Username)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = 'Unable to void lot as it is already voided.'
end
end else
ErrorMessage = 'Cannot use this routine to void EpiPro lots.'
end
If ErrorMessage NE '' then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WMOutKey
LogData<4> = ErrorMessage
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WMOutKey
LogData<4> = 'Void queued successfully.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
@ -1055,3 +1322,5 @@ ClearCursors:
Next counter
return

View File

@ -2,7 +2,9 @@ Compile function WO_MAT_Services(@Service, @Params)
#pragma precomp SRP_PreCompiler
Declare function Database_Services, Error_Services, SRP_Json, SRP_Com, Environment_Services, Logging_Services
Declare function Datetime
Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_Services, Logging_Services
Declare subroutine obj_wo_mat_log, Set_Status
$insert LOGICAL
$Insert APP_INSERTS
@ -424,3 +426,50 @@ Service CassetteIsLastInWo(WoMatKey)
Response = IsLastInWo
end service
Service SetWoMatVoidFlag(WoMatKey, Username)
ErrorMessage = ''
If RowExists('WO_MAT', WoMatKey) then
WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$)
If Error_Services('NoError') then
WoMatRec<WO_MAT_VOID$> = True$
HaveLock = Database_Services('GetKeyIDLock', 'WO_MAT', WoMatKey, True$)
If HaveLock then
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRec, True$, False, False$)
If Error_Services('NoError') then
Set_Status(0)
WONo = Field(WoMatKey, '*', 1)
CassNo = Field(WoMatKey, '*', 2)
WOMLParms = ''
LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM
LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM
Action = 'VOID' ; WOMLParms := Action:@RM
WhCd = 'CR' ; WOMLParms := WhCd:@RM
LocCd = 'VOID' ; WOMLParms := LocCd:@RM
WONos = WONo ; WOMLParms := WONos:@RM
CassNos = CassNo ; WOMLParms := CassNos:@RM
UserID = Username ; WOMLParms := UserID:@RM
Tags = '' ; WOMLParms := Tags:@RM
ToolID = '' ; WOMLParms := ToolID:@RM
WOMLParms := ''
obj_WO_Mat_Log('Create',WOMLParms)
IF Get_Status(errCode) THEN
ErrorMessage = 'Error writing inventory transactions'
end
end else
ErrorMessage = 'Failed to write to the WO_MAT record ' : WoMatKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Failed to get lock on WO_MAT record ' : WoMatKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Failed to read WO_MAT record ' : WoMatKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Invalid WoMat Key ' : WoMatKey : ' passed to SetWoMatVoidFlag routine.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service

View File

@ -1,7 +1,7 @@
compile insert LOT_EQUATES
/*----------------------------------------
Author : Table Create Insert Routine
Written : 28/10/2024
Written : 26/03/2025
Description : Insert for Table LOT
----------------------------------------*/
#ifndef __LOT_EQUATES__
@ -20,5 +20,7 @@ compile insert LOT_EQUATES
equ LOT_OPEN$ to 11
equ LOT_HOLD$ to 12
equ LOT_HOT$ to 13
equ LOT_LEGACY_LOT_ID$ to 14
equ LOT_VOIDED_LOT_RECORDS$ to 15
#endif

View File

@ -11,5 +11,7 @@ compile insert PROC_QUEUE_EQUATES
equ PROC_QUEUE.PARAMS$ to 2
equ PROC_QUEUE.LAST_ATTEMPT_DTM$ to 3
equ PROC_QUEUE.ERROR$ to 4
equ PROC_QUEUE.ENTRY_DTM$ to 5
#endif

View File

@ -0,0 +1,17 @@
compile insert VOIDED_LOT_EQUATES
/*----------------------------------------
Author : Table Create Insert Routine
Written : 26/03/2025
Description : Insert for Table VOIDED_LOT
----------------------------------------*/
#ifndef __VOIDED_LOT_EQUATES__
#define __VOIDED_LOT_EQUATES__
equ VOIDED_LOT_WORK_ORDER_LOG_ID$ to 1
equ VOIDED_LOT_VOID_BY$ to 2
equ VOIDED_LOT_VOID_DTM$ to 3
equ VOIDED_LOT_ENTITY_TYPE$ to 4
equ VOIDED_LOT_LOT_ID$ to 5
equ VOIDED_LOT_LEGACY_LOT_ID$ to 6
#endif