cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

I can't call any new functions (RFC) -- but old ones work fine. What might be happening?

wesleynz
Explorer
1,739

I'm working in a new environment (S4) and we have several objects imported from the old environment. Among these objects are several RFCs.

From the CPI (Neo) I can call any of these RFCs without any problems, but I cannot call any new RFC created directly in the environment. I've already tried the following:

  • Create a new function in an old function's group.
  • Copy an existing function -- either to the same function's group or in any other new FG.

In both cases the new functions are never called via CPI. The same error occurs in all of them: "Error getting function". Of course all of them are active and also working fine if I test them locally.

This is not a problem with the Cloud Connector because there is communication with the environment and because I am using the Z prefix to be able to call any function. As I said, any and all Z functions, even if not explicitly entered into the CC, are called successfully.
I've never seen anything similar. Any idea what might be happening?

Accepted Solutions (1)

Accepted Solutions (1)

Ulrich_Schmidt1
Product and Topic Expert
Product and Topic Expert

"Among these objects are several RFCs."

You mean "RFMs"?
("RFC" is the name of a network communication protocol, like for example "HTTP". "RFM" stands for "remote-enabled function module", which are the objects that can be called via the network protocol RFC. This is analogous to: if you develop a WebService that can be called via HTTP, you would say "I am developing a WebService" and not "I am developing an HTTP".)

Regarding the error: please go to SE37 and check on the "Attributes" tab, whether the new FMs you created, have the flag "Remote-Enabled Module" activated.

If that's not the problem, activate the RFC trace in CPI, so we can see the exact error message coming back from the SAP System when JCo tries to lookup the function module definition. "Error getting function" does not look like an RFC level error message, it looks more like a CPI level error, so probably CPI is overwriting the real technical error message with this generic error message here.

wesleynz
Explorer
0 Likes

Thank you Ulrich for your help. I was looking at the traces logs trying to find some relevant information but did not find anything useful so I changed the logs levels at CC and I was requested to restart it. Immediately after restart all the new RFM started to work properly.

Also thank you for correcting me concerning RFC x RFM.

Thanks

Ulrich_Schmidt1
Product and Topic Expert
Product and Topic Expert
0 Likes
Hm, a restart of the Cloud Connector should have nothing to do with whether a function module is callable or not. Perhaps it's just a problem of "buffering" on SAP system side? E.g. you created the new FM on application server A and then tried to call it via an already existing user session to application server B, and it just takes a while, before it becomes visible on B? I have also seen in the past, that changes to an FM (e.g. adding a new parameter) don't become visible in an existing user session. You need to log out and log in again for the change to become visible. Perhaps the same applies not only to FMs, but also to function groups? In any case, we would need an RFC trace showing the unsuccessful attempt to execute that new FM in order to find out what's happening.

Answers (0)