cancel
Showing results for 
Search instead for 
Did you mean: 

problem adding multiple rows of the table to the RFC

Former Member
0 Kudos

hi

i have table with 100 rows and i have option for multiselection and i have set the cardinality and also selection property mode ,

my table name It_car_data

for(int i=0;i<n;i++)

{

if(wdcontext.nodeit_car_data().ismultiseledcted(i))

{

String make=wdcontext.nodeit_car_data().getit_car_dataelementat(i).getPmake();

simliraly there are 3 or 4 elements i have get the data

now there is a RFC structure called IT_Car which

has a class Z_It_Car

then i followed this procedure

Z_It_Car car=new Z-It_car();

car.setMake(make);

similarly i have set other elements .

col.add(car);

now i need add this structure to the RFC

is ther any other procedure where i get multiple rows

that iam not able to .

wdcontext.currentRFC.modelobject.addit_car()

} setIt_car()

can any one help me out ?

Accepted Solutions (0)

Answers (1)

Answers (1)

nikhil_bose
Active Contributor
0 Kudos

Do you want to export multiple values to RFC?

suppose this is the multi-structure of RFC

each element create the structure object and bind to the node.


for(int i = 0; i<n; i++) {
 Z_It_Car car=new Z-It_car();
car.set<Attribute>( <value>);
wdContext.nodeZ_It_Car().bind(car);
}

Please make a break point in ABAP and see all data is coming there.

nikhil

Former Member
0 Kudos

hi

thanks for the response

u code just an alternative to what i have done

and data that is multilpe data is coming to the structure

but the problem after binding the collection to the it_car

i need then add this structure to the RFC

may be using

wdcontext.currentrfc.modelobject.addit_car(return type is

it_car class);

or

wdcontext.currentrfc.modelobjext.setit_car(returntype is abstractlist)

then i need to execute the RFC

but that is not happening

any suggestios ?