cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Parameters from SAP to C' Method

Former Member
0 Kudos

Hey there,

I hav a great Problem. I wrote a C# Program which runs as a Server. whithin this I wrote a Method i want to call from ABAP. This method needs to get two static and various dynamic parameters. In C# it is quite easy to implement this, by "params object[]...", but how can I get these Parameters from SAP to my Application?

When I describe the Parameter for RFC then it works, e.g. by "[RfcParameter("INSTID",RFCTYPE.RFCTYPE_STRING,30,30,0,RFCINOUT.IN)]". Does i have to give a certain RFCTYPE? When i do so, it works? Please give help, i need this very urgent.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Although ABAP/RFC does not support the syntax of variable function arguments directly, you can achieve the similar effect by packing the variable parameters into a ABAP table. On the C# side, you need to move (or convert if required) the values contained in the table parameter to an object array before invoking your C# method with variable number of parameters.

Regards,

Guangwei Li

Former Member
0 Kudos

Ok, thanks for the advice.

So, I don't have a chance to make a call function'XXX' destination p_dest with variable parameters, so that a C# Application gets it into the object[] Array?

But in the COM4ABAP this is implemented. If you call the function com_invoke you also have dynamic parameters...

Perhaps this would be a nice funcionality for .NET Connector 3.0

Regards

Former Member
0 Kudos

Hello,

Sorry, the answer remains NO.

In COM4ABAP, this feature is implemented only for the generic invoking function COM_INVOKE itself, but not for those functions/methods invoked through COM_INVOKE. So this functionality is perhaps "nice" to the developer who wrote COM4ABAP. But for the users of COM4ABAP, it seemed not to make much sense.

Of course, the support to dynamic parameters will be important if you want to write a generic method invoker for .NET (something might be called as DOTNET4ABAP). There is for now no plan to provide this feature in the future releases of the .NET Connector.

Regards,

Guangwei

Former Member
0 Kudos

Ok, that was an answer to my question.

Although I am wondering, that COM4ABAP can handle dynamic parameters...

Regards,

Oliver

Answers (0)