removed sap hold queue code
This commit is contained in:
parent
0cd1d45e44
commit
dc8665d553
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user