moved costly calls to the backend procedure queue to speedup sap transaction processing and releasing material
This commit is contained in:
@ -59,7 +59,7 @@ Equ Comma$ to ','
|
||||
|
||||
Declare function Database_Services, obj_NCR, obj_SAP, Environment_Services, Logging_Services, Datetime
|
||||
Declare subroutine Error_Services, Database_Services, obj_NCR, obj_SAP, Material_Services, Work_Order_Services
|
||||
Declare subroutine Logging_Services, obj_Notes, Schedule_Services
|
||||
Declare subroutine Logging_Services, obj_Notes, Service_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WM_IN'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
@ -123,17 +123,17 @@ READ_RECORD_PRE:
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
|
||||
READ_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
* LockOwner = Record<WM_IN_LOCKED_BY$>
|
||||
* If LockOwner EQ '' then Record<WM_IN_LOCKED_BY$> = @User4
|
||||
|
||||
return
|
||||
|
||||
|
||||
READONLY_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
@ -143,6 +143,7 @@ READONLY_RECORD_PRE:
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
|
||||
READONLY_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
@ -151,9 +152,11 @@ READONLY_RECORD:
|
||||
// Record = ''
|
||||
return
|
||||
|
||||
|
||||
WRITE_RECORD_PRE:
|
||||
return
|
||||
|
||||
|
||||
WRITE_RECORD:
|
||||
|
||||
// Look for schedule events that may need to be updated.
|
||||
@ -161,7 +164,7 @@ WRITE_RECORD:
|
||||
CassNo = Field(Name, '*', 3)
|
||||
ProcessedDTM = Datetime()
|
||||
// This service will determine if the cassette needs to be marked as complete.
|
||||
Schedule_Services('MarkCassProcessed', WONo, CassNo, ProcessedDtm)
|
||||
Service_Services('PostProcedure', 'SCHEDULE_SERVICES', 'MarkCassProcessed':@VM:WONo:@VM:CassNo:@VM:ProcessedDtm)
|
||||
|
||||
WfrCount = DCount(Record<WM_IN_SLOT_NO$>, @VM)
|
||||
If WfrCount LT 25 then
|
||||
@ -179,34 +182,12 @@ WRITE_RECORD:
|
||||
|
||||
return
|
||||
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
|
||||
// Log which user and computer station attempted to delete the record
|
||||
* LogData = ''
|
||||
* LogData<1> = LoggingDTM
|
||||
* LogData<2> = Name
|
||||
* LogData<3> = @User4
|
||||
* Logging_Services('AppendLog', objDeleteLog, LogData, @RM, @FM)
|
||||
*
|
||||
* // Send an LSL message to FI admins to alert them
|
||||
* Recipients = Xlate('SEC_GROUPS', 'OI_ADMIN', 'USER', 'X')
|
||||
* SentFrom = 'SYSTEM'
|
||||
* Subject = 'WM_IN Delete Attempt'
|
||||
* Message = 'An attempt to delete WM_IN record ':Name:' was made by ':@User4:'.'
|
||||
* AttachWindow = ''
|
||||
* AttachKey = ''
|
||||
* SendToGroup = ''
|
||||
*
|
||||
* Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
* obj_Notes('Create',Parms)
|
||||
|
||||
// Stop the system from deleting the record
|
||||
* ActionFlow = ACTION_STOP$
|
||||
|
||||
return
|
||||
|
||||
|
||||
DELETE_RECORD:
|
||||
|
||||
return
|
||||
|
||||
|
||||
@ -218,6 +199,7 @@ ClearCursors:
|
||||
Next counter
|
||||
return
|
||||
|
||||
|
||||
Initialize_System_Variables:
|
||||
// Save these for restoration later
|
||||
SaveDict = @DICT
|
||||
@ -252,12 +234,16 @@ Initialize_System_Variables:
|
||||
end
|
||||
end
|
||||
@RECORD = Record
|
||||
|
||||
return
|
||||
|
||||
|
||||
Restore_System_Variables:
|
||||
|
||||
Transfer SaveDict to @DICT
|
||||
Transfer SaveID to @ID
|
||||
Transfer SaveRecord to @RECORD
|
||||
@FILE.ERROR = OrigFileError
|
||||
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user