cancel
Showing results for 
Search instead for 
Did you mean: 

How to Input many records in RFC ?!!!

Former Member
0 Kudos

1. Hello, I am using an adaptive RFC model inside a Web Dynpro Application.In this project ,I'll input some data on web pages and these data will enter the table in R3 system.

The input field Like this: (in the InputField -


TableCellEditor)

<b>Name Sex Age Born .. …. ... …. <--- one titles</b>

John male 20 1987 … … <--- first record

Tom male 19 1988 … …. <-- second record

Blade male 20 1987 … … <-- third record

Rose famale 18 1989 … … <-- fouth record

…………………...many records……………………………<-- many records

Sumbit Button

When I click the |Sumbit Button| all records will enter the table in R3 system with use RFC and BAPI.

I did like this :

In Component Controller ,wdInit() method:

Zwf_XXXXXX_Input z_input = new Zwf_XXXXXX_Input();

wdContext.nodeXXXX_Input().bind(z_input);

AbstractList list = new Zco_XXXX_I.Zco_XXXX_I_List();

Zco_XXXX_I sxsq_i = new Zco_XXXX_I();

list.add(sxsq_i);

z_input.setT_XXXX_I(list);

When I input many records through web page, it only input One record in table then can't input any records at all !!!!!!!!!!

How can do it?

Thanks

yours : zunxian.cheng

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello zunxian.cheng,

You need 2 steps to do this:

1 - In the wdInit() do only this:

wdContext.nodeXXXX_Input().bind(new Zwf_XXXXXX_Input());

2 - Create other method to submit. Ex.: executeRFC():

Zwf_XXXXXX_Input model = wdContext.currentZwf_XXXXXX_InputElement().modelObject();

for (int i = 0; i < wdContext.node << node bind in table >>.size(); i++) {

IPublic<<Name Controller>>.I<< node bind in table >>Element element = wdContext.node<< node bind in table >>().get<< node bind in table >>ElementAt(i);

Zco_XXXX_I sxsq_i = new Zco_XXXX_I();

//Set Attributes

// sxsq_i.setXXX(element.getXXX);

model.addT_XXXX_I(sxsq_i);

}

model.execute();

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you!! I resolve it !

luciano_leitedasilva
Contributor
0 Kudos

Hi there,

You have to add new entries at the table. The examplo below add 10 elements.

Zwf_XXXXXX_Input z_input = new Zwf_XXXXXX_Input();

wdContext.nodeXXXX_Input().bind(z_input);

AbstractList list = new Zco_XXXX_I.Zco_XXXX_I_List();

for(int i = 0; i<10;i++){

Zco_XXXX_I sxsq_i = new Zco_XXXX_I();

list.add(sxsq_i);

}

z_input.setT_XXXX_I(list);

I hope it help!

Regards,

Luciano