RFC System Fields
When an RFC is made, the system field sy-subrc is initialized in the calling program, or set to the value that is specified in exception handling, just like whenever a function module is called. Each of the following system calls is initialized in the calling program too:
● sy-msgid
● sy-msgno
● sy-msgty and
● sy-msgv1 to sy-msgv4
If an error message or termination message is sent using statement Message while a remotely-called function module is being executed, exception SYSTEM_FAILURE is triggered in the calling program. You can assign a return value to this for the call. When exceptions occur, these system fields are supplied with the properties of the message.