cancel
Showing results for 
Search instead for 
Did you mean: 

insert multiple records from web dynpro

Former Member
0 Kudos

Hi,

How to insert multiple records from web dynpro applications to SAP backend system ?

Thanks,

sowmya

Accepted Solutions (1)

Accepted Solutions (1)

former_member197348
Active Contributor
0 Kudos

Hi Sowmya,

IPrivate<viewname>.I<node>Element ele;
for (int n =0; n < MAXSIZE;n++) {
ele = wdContext.node<node>().create<node>Element();
//set atributes
ele.set<atb1name>(atbvalue);
ele.set<atb2name>(atbvalue);
,.......
wdContext.node<node>().addElement(ele);
}

If you get any error, please search this forum, there are lot of threads for similar requirements and problems. Still if you are not able to resolve, you are welcome to get back in the same thread.

All the best.

Siva

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sowmya,

I am looking for a similar requirment. Could you please explain me the process of how you resolved this problem. I would appreciate your help.

regards,

Gopal.

Former Member
0 Kudos

Hi soumya..

if want to multiple row selected then save into the Sap back End..

value node--table.

Backend value node=table_bapi_input;

back end internal table --tableback.

int size=wdcontext.nodeTable().size();

int lead=wdcontext.nodeTable().getLeadSelection();

table_bapi_input in=new table_bapi_input();

wdcontext.nodetable_bapi_input().bind(in);

for(int i=size-1;i>0;i--){

tableback set=new tableback()

if(lead==i || wdcontext.nodeTable().ismultiSelection(i)){

set.setName(wdContext.nodeTable().getTableElementAt(i).getName();

}

in.addZc_input(set);

}

wdContext.currenttable_bapi_inputElement().modelobject().excute();

wdContext.nodeOutput().invalidate();

thanks

jati