on 12-10-2008 9:23 AM
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..?
Hi,
move "Zsm_User_List userList = new Zsm_User_List();" inside the for loop and then try.
Regards,
VJR.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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);
}
}
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.