on 07-07-2010 6:32 AM
Hi ,
JAVA Webdynpro - I have to bind a table in the input parameters of an RFC.
The code below is taking in the N num of rows but is repeating the last row N times and
sending it to the RFC.
Ztsgt_Pos_Name postionTab = new Ztsgt_Pos_Name();
Ztsgt_Pos_Name.Ztsgt_Pos_Name_List positionTabList = new Ztsgt_Pos_Name.Ztsgt_Pos_Name_List();
int e = wdContext.nodePosition_List_update().size();
int f = 0;
for( f = 0; f < e; f = f+1 )
{
wdContext.nodePosition_List_update().setLeadSelection( f );
postionTab.setPosition_Nm( wdContext.nodePosition_List_update().currentPosition_List_updateElement().getPosition_Nm() );
postionTab.setPosition_Dscr( wdContext.nodePosition_List_update().getPosition_List_updateElementAt(f).getPosition_Dscr());
positionTabList.addZtsgt_Pos_Name( postionTab );
}
UpdatePosit.setPosition_List( positionTabList );
try {
wdContext.nodeZRFC_3318_UPDATE_VEND_POSITION().nodePosition_List5().invalidate();
wdContext.currentZRFC_3318_UPDATE_VEND_POSITIONElement().modelObject().execute();
wdContext.nodeOutput5().invalidate();
} catch (WDDynamicRFCExecuteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Hi,
Place follwoign line within for loop as first line; which will solve your issue:
Ztsgt_Pos_Name postionTab = new Ztsgt_Pos_Name();
Regards,
ganga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SMI SAP Project Team,
Please check the code for loop and lead selection when you setting the values.
for( f = 0; f < e; f++)
Refer to below documents:
Hope it will helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.