cancel
Showing results for 
Search instead for 
Did you mean: 

problem to invalidate the tanle

Former Member
0 Kudos

hi

i calling the RFC from the backend

and iam calling same RFC twice in two button

which will populate the data in the table

by fulfilling some conditions and data gets populated inthe

first table , as soon as i click on the second button

which calls the same RFC that i have used for the first button first table's data gets invalidated ,

so i have created a value data and used COPYService

to copy data for the first table , and problem solved

now the main problem is i want only one row to be

inserted inthe first table when i click the button ,

from the next time i click on the same first tables corresponding button it should invalidate the table and then

populated the new row . but iam able to see all

data or rows getting inserted int he table one after other

how can this be solved ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Whenevr u use Copyservice It copies all the data from one node to another.

In order to copy only one row u need create an element of ur value node and copy its content from first row of ur model node

then add this element to ur value node.

U need maintain a counter for ur button that is when clicking first time first row should added and on second time secone row should added.

Just store this Counter in a context say COUNTER.

suppose my model node is IT_car_data and my value node is

IT_car.

U can use following code for copying the current row from IT_car_data to IT_car.


IPrivateMycompView.IIT_carElement ele;
 wdContext.nodeIT_car().invalidate();
 ele=wdContext.nodeIT_car().createIT_carElement();
 wdContext.nodeIT_car_data.setLeadSelection(COUNTER);
 ele.setCorrespondingele(wdContext.currentIT_car_dataElement().getCorrespondingele());//need to write for each attribute.
 
 wdContext.nodeIT_car().addElement(ele);//after copying each value need to add that element to it_car

regards

Surender Dahiya