Exception: RFC callback server not available while calling RFC

2.5k views Asked by At

I'm trying to upload a file from a server directory to the SAP CRM System (attachment to an Opportunity), therefore I am using the method create_with_file of the cl_crm_documents class.

To call this method I am using a RFC-Function created by myself. If I test my RFC-Function within the Function Builder, everything works fine. If I execute the RFC from a external System (in my case MS-Outlook) an error occurs: "Exception: RFC callback server not available".
I started the debugger and the program runs about half way through (So the connection works): The create_with_file calls a couple of functions until the RFC_START_PROGRAM function is called. The error occurs exactly at this line.

Does anybody know why the error occurs only if I call the function remotely? How to solve this?

1

There are 1 answers

1
vwegert On BEST ANSWER

I don't have access to a CRM system, but this is what's probably happening: The class you use tries to perform some action on the front-end PC using the SAP GUI. For this, it performs an RFC call back or the SAP GUI. This works fine as long as you are using the function builder because there's a GUI connection available. Once you use some other means to invoke the function module, the GUI is no longer there and the program won't work. I'd suggest you check the code to see whether there is some parameter or customization that allows you to suppress the RFC call...