RFC callback server not available Exception while trying to execute cl_crm_ducuments=>create with file via RFC

StackOverflow https://stackoverflow.com/questions/5093039

  •  05-12-2019
  •  | 
  •  

Question

I'm trying to upload a file from a server directory to the SAP-CRM System (As an attachment of 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 from remote and what I could do to solve this problem.

Was it helpful?

Solution

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...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top