We have a product that interfaces with SAP via QM-IDI. A customer is reporting certain data errors that raise RFC_SYS_EXCEPTION. In looking at our source, we have included code from sap rfc example code to process many of the rfc calls. there is a function called rfc_error which is being called when RFC_SYS_EXCEPTION is raised. It basically write out the diag messages from the RfcLastErrorEx structure, issues RfcClose and finally exit(1), which aborts our program immediately. In cases where RFC_EXCEPTION is raised, it does not go through this pathway, but rather we mark in our system the upload request so it will not be reissued, and let the program continue to process other upload/download requests.
I've read up on the exception as it says the remote system (SAP) will close the connection automatically for that exception, but I could not find details on what types or errors can happen that raise that exception and if any are so severe that we must terminate our (external) program.
I'm looking for reference material (the sdk I've seen, but a bit terse in my view) on how one must deal with these exceptions and something more about what they mean that after that the system_failure and communcation_failure exceptions may occur.
Trying to determine if it is safe to remove the exit(1), set aside the request, reestablish the connection and let other requests try to get processed. The errors from the customer were data related, one was a invalid date format and another was a value that was the wrong datatype (string when number was required). Those don't seem fatal, but I don't know enough about what other things can raise RFC_SYS_EXCEPTION from the SAP side and if they can be handled all the same or certain exceptions require different handling.
I'm fine if it logs the errors (like now), prevents the request from being resent (until the issue is corrected later by admins) and reconnects to work on other independent uploads/downloads.