on 05-29-2008 10:01 AM
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 ?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.