cancel
Showing results for 
Search instead for 
Did you mean: 

"Callback not supported" error when invoking a function from C# .Net

Former Member
0 Kudos

I've been tasked with incorporating the SAP .Net Connector into our application to execute a custom function in a client's SAP system.  The client examples I found in the documentation seemed simple enough.  I have configured and can retrieve a destination without issue, create the function and load its parameters.  However, when I invoke the function, I receive the following error:

System.NotSupportedException: Callback not supported
    at SAP.Middleware.Connector.RfcConnection.RfcReceive(RfcFunction function)    at SAP.Middleware.Connector.RfcFunction.RfcDeserialize(RfcConnection conn, IRfcIOStream stream)
    at SAP.Middleware.Connector.RfcFunction.RfcCallReceive(RfcConnection conn, IRfcIOStream stream, RFCID rid)
    at SAP.Middleware.Connector.RfcFunction.RfcCallReceive(RfcConnection conn)
    at SAP.Middleware.Connector.RfcFunction.Invoke(RfcDestination destination)

The code is pretty simple:

RfcDestination rfcDestination = RfcDestinationManager.GetDestination("MyDest");

IRfcFunction irfcfFunction = rfcDestination.Repository.CreateFunction("MyFunction");

irfcfFunction.SetValue("PARM1", "VALUE1");

irfcfFunction.SetValue("PARM2", "VALUE2"); //etc..

irfcfFunction.Invoke(rfcDestination); // error happens here

I've never worked with SAP or this connector before, and I really don't quite know how to correct this.  Any suggestions would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Ken,

The function module that you invoke in ABAP does execute a so-called callback via CALL FUNCTION 'A_FUNCTION_MODULE' DESTINATION 'BACK'. For NCo 3.0, it was decided not to support this feature. Hence, you cannot invoke function modules that try to use this functionality, because NCo will reject the callback invocation, like seen in your example. Other function modules will work nicely.

Best regards,

Markus

Former Member
0 Kudos

Thanks for the info and the quick response Markus!  It is much appreciated.

Ken

Answers (0)