cancel
Showing results for 
Search instead for 
Did you mean: 

Declare ref value in RFC Web Service call

Former Member
0 Kudos

Hello all,

How do u declare the required ref value in RFC fucntion when they require "[]" in .NET environment?

When I tested "BAPI_SALESORDER_GETSTATUSService", the second input requries a ref value w/ "WS_2_RFC_Test.Salesorder.BAPISDSTAT[]" type. But I just only see close to that under the web service is WS_2_RFC_Test.Salesorder.BAPISDSTAT, there is no such '[]'. Please tell me how do I declare that parameter.

Regards,

Steve

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Steve,

How are you doing ?

WS_2_RFC_Test.Salesorder.BAPISDSTAT[] sdStatArray;

sdStatArray = new WS_2_RFC_Test.Salesorder.BAPISDSTAT[5];

will create a new array of 5 elements with the type BAPISDSTAT,

in the function call use :

myFunctuinCall( ref parameterX, out paraY, ref sdStatArray);

please ensure that you instantiate all objects passed by ref.

with respect,

amit

Former Member
0 Kudos

Hi Steve,

WS_2_RFC_Test.Salesorder.BAPISDSTAT[] is an array of type BAPISDSTAT.

You may define a structre type as input/output parameter in RFC.

Corresponding proxy classes will be generated in .NET. You declare an array of that type, populate it with values and pass it.

Hope I understood your question?

Former Member
0 Kudos

Hi Jitesh,

Could u show me how to correctly declare the array?

Regards,

Steve

Former Member
0 Kudos

Where do you want to declaring array/structure? It's not very difficult in any language. Please refer to the language documentation and you would be able to do so.

Or let me know. I will glad to help.