Start of Content Area

 Process documentation Using Pre-Defined Exceptions for RFC  Locate the document in its SAP Library structure

The RFC interface defines two additional exception types:

      SYSTEM_FAILURE

This exception reports all failures and system problems on the remote machine.

      COMMUNICATION_FAILURE

This exception is raised whenever a connection or communications failure occurs. It does not report system problems (such as abnormal termination) that occur on the remote machine.

Requesting Error Messages

In the function modules that you call, you should define exceptions for any error reporting, and not just the MESSAGE keyword.

CALL FUNCTION Remotefunction

   DESTINATION Dest

   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.

Note

You can use MESSAGE onlywith the two system exceptions described here.

 

 

End of Content Area