on 05-28-2008 7:54 AM
hi
i have a scenario on click of button
a single row gets interted in the table
and there are about 15 to 20 elements in the single row
now i need to catch the whole single row instance
at once and set it to another structure .
i have structure called IT_car_data which is table
in which a single row got inserted not i need to
catch the row elements and set it to a structure
called IT_car which has same structure as IT_car_data .
can any one help me ?
Hi,
U can use following code for copying the current row from IT_car_data to IT_car.
IPrivateMycompView.IIT_carElement ele;
ele=wdContext.nodeIT_car().createIT_carElement();
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
By using wdCopyservice u can copy whole node not current Row.
Regards
Surender Dahiya
Edited by: Surender Dahiya on May 28, 2008 11:11 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
thanks for the reply
iam trying with the below code as what has been
posted but
ele.setCorrespondingele(wdContext.currentIt_Car_DataElement().getCorrespondingele());
in place of getCorrespondingele()
i cannot get 38 elements and its not so feasible .
in the table for first trial we have only single row
entry in the table IT_Car_Data which is table structure
the table may have 1000 of rows in the table later on .
scenario is i need to get or fetch the selected row elements
then set to a structure called IT_CAR elements and then
add this IT_CAR to the rfc and execute the RFC .
this is flow i need to goahead with .
any suggestions .
int n=wdContext.nodeIt_Car_Data().size();
int n1=wdContext.nodeIt_Carv_Data().size();
for(int i=0;i<n;i++)
{
if(wdContext.nodeIt_Car_Data().isSelected(i))
{
IPrivateSampleView.IIt_CarElement ele;
ele=wdContext.nodeIt_Car().createIt_CarElement(new Zlgs_Car_Data());
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
Hi,
ele.setCorrespondingele(wdContext.currentIT_car_dataElement().getCorrespondingele());//need to write for each attribute.
setCorrespondingele means ur are setting corresponding columns form IT_car_data to IT_car.
suppose u have 10 columns in a row then in this case u have to write the above statement for 10 times u cant escape from this situation.
As of now u dont have any option apart from previous to copy current row from one node to other.
Regards
Surender Dahiya
hi
thanks for the response
but there are 38 elements and i cannot
this setCorrespondingele (get.....)
38 times and about copying it_car_data to the
it_car this is not a feasible way
table contain 1000's of records and on select
of particular row the all the row data has to be
set to it_car and this structure will added to the RFC
wdcontext.contextzrfc.modelobject.addit_car(itcar);
then need to execute the RFC .
and there is also similar scenario where i have perform
same procedure as above . here too i cannot write
set 38 elements
You can get the selected row data:
wdContext.currentIT_car_dataElement()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.