
Using Pre-Defined Exceptions for RFC
While any exceptions arising in the called function module are handled by the addition.
.. PERFORMING form ON END OF TASK , the RFC interface defines two additional exception types. These are:This exception reports all failures and system problems on the remote machine.
This exception is raised when a connection or communications failure occurs. It does not report system problems (for example, abnormal termination) that occur on the remote machine.
Requesting Error Messages
In the function modules that you call, you should use exceptions for any error reporting, and not the MESSAGE keyword.
CALL FUNCTION RemoteFunction
DESTINATION ‘hw1071_53’
EXPORTING...
IMPORTING...
TABLES...
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE msg
COMMUNICATION_FAILURE = 2 MESSAGE msg
The system sets the message variable (
msg ) to the system message. You can then display the message or log it in a file. You should not try to interpret message text in your program.
You can use MESSAGE only with the two system exceptions described here.