cancel
Showing results for 
Search instead for 
Did you mean: 

Display data for selected row in a Table

Former Member
0 Kudos

Hi,

I have a table in My application.Im bringing the data from R/3 to that table.i want to display the data in the selected row . how to achieve it ?..

Regards,

Ramganesh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ramganesan,

You could set the main table's Singleton property to TRUE, pass the lead selected element and use a supply-function to load data to be displayed in a second 'detail' table.

You could refer:

/people/sap.user72/blog/2005/03/15/supply-functions-in-webdynpro

Alternatively, by displaying more data retrieved "IN" the selected row itself, you could employ a table popin.

Refer:

http://help.sap.com/saphelp_erp2005/helpdata/en/23/5e9041d3c72e7be10000000a1550b0/frameset.htm

Regards,

Adithya

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ramesh,

try this.

In table onleadselection() method write this code.

int size= wdContext.current<outputnode>.size();

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

{

String rowval = wdContext.current<outputnode>().getAttribute();

or

String f+=wdContext.node<Output>.get<outputElementat>(i).get<Field>();

String 2 = same above ..

String 3= ....

}

Display where ever do u need.

this is for do u have more rows in the table .

Only you have one row write the same code in that method with out for statement....

Thanks

Lohi

Message was edited by: Lohitha M

Former Member
0 Kudos

Hi,

Can you explain selected row in detail format?

Regards,

Saravanan K

former_member189631
Active Contributor
0 Kudos

Hi Saravanan ,

Im getting data from r/3 and displaying it in a table.I have done this by data Binding bw the context node and a Table. while executing this application the table has 5 rows .if i select a table row it should display the all details corresponding to that ROW. How to do it ?

Former Member
0 Kudos

Hi,

I think you get the required things in table.Next you can get the selected row by,

wdContext.current<node>.get<Element>();

by this you can get the one by one column

Here node is the one you binded to the datasource and element refers to the attributes in the node

Regards

Saravanan K

sridhar_k2
Active Contributor
0 Kudos

Hi,

Based on your selection, where do you want to show the selected Details? Will it be on Corresponding Input Fields?

If you want to get lead selection and Get Elements use the below code.

wdContext.nodeTestNode().getLeadSelection();

//Get Elements

String element = wdContext.currentTestNodeElement().getTestElement();

Regards,

Sridhar