From dc8665d553dcb503203b3f3cc02bbedeec295340 Mon Sep 17 00:00:00 2001 From: MESOISYSADMIN Date: Thu, 12 Sep 2024 09:57:27 -0700 Subject: [PATCH] removed sap hold queue code --- LSL2/STPROC/SAP_MONITOR.txt | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/LSL2/STPROC/SAP_MONITOR.txt b/LSL2/STPROC/SAP_MONITOR.txt index 5aba35d..268cae8 100644 --- a/LSL2/STPROC/SAP_MONITOR.txt +++ b/LSL2/STPROC/SAP_MONITOR.txt @@ -157,36 +157,6 @@ BEGIN CASE IF SAPBatchNo NE '' THEN obj_SAP('AddTransaction','WO_MAT_HOLD':@RM:SAPBatchNo:@RM:Sloc:@RM:NewMatHoldFlag) - END else - writeRec = 0 - TransAction = 'WO_MAT_HOLD' - SAPHoldRec = TransAction:@FM:WoMatKey:@FM:SLoc:@FM:NewMatHoldFlag:@FM:Datetime() - SAPHoldID = NextKey('SAP_HOLD') - //for all hold transactions, check SAP_HOLD to see if record for WOMatKey exists. If so then remove - //all Hold records instead of adding another transaction since it hasn't transacted in SAP anyway - If NewMatHoldFlag EQ '0' then - ! DJS - 04/05/2021 - The code was searching an index that does not exist on a column that does - ! not exist. I changed the column from KEY to SEQ and indexed SEQ to fix this. - -* HoldKeys = Database_Services('SearchIndex','SAP_HOLD', 'KEY', WOMatKey, 0) - HoldKeys = Database_Services('SearchIndex','SAP_HOLD', 'SEQ', WOMatKey, 0) - For each key in HoldKeys using @FM - Rec = Database_Services('ReadDataRow', 'SAP_HOLD', key,'','','') - if Rec then - For each key2 in HoldKeys using @FM - Database_Services('DeleteDataRow','SAP_HOLD', key2,'1','1') - next key2 - return - end else - writeRec = 1 - end - Next key - end else - writeRec = 1 - end - If writeRec NE '0' then - Database_Services('WriteDataRow', 'SAP_HOLD', SAPHoldID, SAPHoldRec) - end END END END