cancel
Showing results for 
Search instead for 
Did you mean: 

how to retrive more than one row value from table

Former Member
0 Kudos

hi,

I had create one table if i entered value in more than one row, the second row override the first row value and while printing it in flat file i am getting the second value entered twice.

i created one context for each column.

plz provide me a solution..........

very urgent..........

Regards,

Kiruthika

Accepted Solutions (1)

Accepted Solutions (1)

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Create seperate element for each row and then set values.

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

{

IPrivate<view name>.I<node name>Element element = wdContext.node<node name>().create<node name>Element();

wdContext.node<node name>().addElement(element);

element.set<Att>();

}

to retrive:

int s=wdContext.node<node name>.size();

for(int j=0;j<s;J++){

wdcontext.node<nodename>.getnodeelementAt(j).getAttribute();

}

Check this link about tables

https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4

Regards,

Vijayakhanna Raman

Answers (4)

Answers (4)

Former Member
0 Kudos

thank u!

I solved the problem by ur reply

Former Member
0 Kudos

Hi,

Don't create context for each column. create one node on context menu and add one attribute to that node. finally bind this node to the table.

write the following code.

IPrivate<view_name>.I<node_name>Node node= wdContext.node<node_name>();

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

{

IPrivate<view_name>.I<node_name>Element element = wdContext.create<node_name>Element();

element.set<Attribute_name>(<value>);

node.addElement(element);

}

to retrive:

int len=wdContext.node<node_name>.size();

for(int j=0;j<len;j++)

{

String str=wdcontext.node<node_name>.getnodeelementAt(j).get<Attribute_name>();

}

Former Member
0 Kudos

Hi Prabhu,

Select the selectionMode to multi in the table property,

and the node cardinality to 1..n or 0..n. Try this.

http://help.sap.com/saphelp_nw2004s/helpdata/en/5a/088b41b4b3b25fe10000000a1550b0/frameset.htm

Kind Regards

Mukesh

Former Member
0 Kudos

Hi Prabhu,

Kindly ensure me whether you are using any loop to get those values from table

Regards,

Saravanan K