Skip to Content
0
Former Member
Jul 07, 2010 at 05:32 AM

Java dynpro - bind a table in the input parameters of an RFC

20 Views

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();

}