Merged PR 30013: Error Handling in OBJ_SAP SendRecord
Modified obj_sap SendRecord to let the calling gosub handle the deletion of the record. Most importantly blocked the deletion of a record upon failure to send via FTP.
This commit is contained in:
parent
55cebe9f3a
commit
b4922b45ea
@ -1093,7 +1093,7 @@ SendRecord:
|
||||
|
||||
OSWrite ToSAPScript ON ToSAPScriptName
|
||||
StartTime = Time()
|
||||
DELETE Buffer,TxSeqNo ELSE Null
|
||||
|
||||
Stat = 'VAR'
|
||||
|
||||
FTPCommand = "psftp ":FTPUser:"@":FTPServerIP:" -pw ":FTPPassword:" -b ":ToSAPScriptName:" -batch"
|
||||
@ -1118,12 +1118,14 @@ SendRecord:
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
Mona_Services('PostStatus', MonaOutboundResource, 'SFTP-Interface-Outbound', 'critical')
|
||||
ClearFlag = 0
|
||||
end else
|
||||
ClearFlag = 1
|
||||
Mona_Services('PostStatus', MonaOutboundResource, 'SFTP-Interface-Outbound', 'ok')
|
||||
end
|
||||
|
||||
StopTime = Time()
|
||||
ClearFlag = 1
|
||||
|
||||
OSDelete DosTable ;* Removes table from C: drive
|
||||
|
||||
RETURN
|
||||
@ -1502,3 +1504,4 @@ CheckForErrors:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user