cancel
Showing results for 
Search instead for 
Did you mean: 

not getting correct number of output from RFC

Former Member
0 Kudos

hii,

I have a RFC zsm_actual_allocation where i need to pass a set of userid 's to fetch details of their allocation.The RFC structure is like this :

Zsm_Actual_Allocation_Input input = new Zsm_Actual_Allocation_Input();

Zsm_User_List userList = new Zsm_User_List();

Zsm_User_List is for binding a set of userid's to the RFC. While passing more than one userid to the RFC and executing it, i get the details of only one userId....The corresponding code i have used is :

if(CopyPSNumberNode.size()!=0)

{

for(int j=CopyPSNumberNode.size()-1;j>=0;--j)

{

CopyPSNumberElement = CopyPSNumberNode.getCtx_vn_CopyPSNumberElementAt(j);

userList.setUser_Id(CopyPSNumberElement.getPSNumber());

userList.setUser_Name(CopyPSNumberElement.getUserName());

input.addT_User(userList);

}

}

AllocationInputNode.bind(input);

wdThis.wdGetTdc_DataCustController().execute_zsm_actual_allocation_input();

Does anybody have any clue why am getting output details of only 1user while am sending more than 1user to the RFC..?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

move "Zsm_User_List userList = new Zsm_User_List();" inside the for loop and then try.

Regards,

VJR.

Former Member
0 Kudos

Hi,

Zsm_User_List userList =null;
userList = new Zsm_User_List();

The above 2 lines of code is for adding detials of multiple users.So that many number of objects has to be created.

So use the given code and try once

if(CopyPSNumberNode.size()!=0)

{

for(int j=CopyPSNumberNode.size()-1;j>=0;--j)

{

Zsm_User_List userList =null;

userList = new Zsm_User_List();

CopyPSNumberElement = CopyPSNumberNode.getCtx_vn_CopyPSNumberElementAt(j);

userList.setUser_Id(CopyPSNumberElement.getPSNumber());

userList.setUser_Name(CopyPSNumberElement.getUserName());

input.addT_User(userList);

}

}

Former Member
0 Kudos

Thanks,

Now am getting the required number of output.

Answers (1)

Answers (1)

Former Member
0 Kudos

have you checked in se37 the RFC is working fine.

If it is working fine there then it will be a problem with the java side.

You are passing both user id and user name to the RFC no?

Check the output structure also.

Thanks and Regards

shanto aloor