cancel
Showing results for 
Search instead for 
Did you mean: 

Table Details

Former Member
0 Kudos

Suppose I have two views like --TableView & TableDetailView.

In 'TableView' there is a table and button called 'Details'.If I select a row from the table & click the button 'Details' then it will go to the another view 'TableDetailView' & then show the row details.

Please provide me the code.I have already designed the views.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Anindita,

You can create 2 view with tables in both the views. The mapping needs to be done in both the tables to the respective data sources. On the init of the first view, i.e., 'TableView', you can display the values of the table (using an RFC, say). On the click event of the button 'Details', you can call another RFC that would fetch the details of the row, depending on the row selected, and display them in 'TableDetailView'. Hope this helps. Do revert in case of any clarifications.

Regards,

Divyata

chander_kararia4
Contributor
0 Kudos

HI Anindita,

After doing the proper mapping just do ths:

- Get the leadselection value from the first table. This is to get the info as which row is selected / which row's details button is clicked.

- Get all the values of that row using leadselection value as the key value.

- on the basis of that, get the values to be shown in another table.

- Show the values in the table exactly as u have done for the first table.

regards

Chander Kararia

Former Member
0 Kudos

Hi Banerjee,

Suppose in that table you have 2 columns say name and address whose binded value attributes are name and address under the node table, and also two more attributes say tname,tadd all of type string,

you would ve already binded an action to that button

write the following code inside that onAction

>wdContext.currentTableElement().setTname(wdContext.currentTableElement().getName());

>wdContext.currentTableElement().setTadd(wdContext.currentTableElement().getAddress());

>wdThis.wdFirePlugTableViewOut();

(Provided you have already defined the outbouund plugs navigation link to to that TableDetailsView and mapped the tname and tadd to component and inturn to the TableDetailsView, there you can display these 2 details by mapping it to various fields, Hope you got me let me know in case of any doubts )

Regards,

Sam CharlesJ.

Former Member
0 Kudos

Hi,

To do this you dont need any code.

If you have done the mapping properly from the controller to views it will display the data

Controller----


> View 1 --->Table View

Controller----


> View 2 --->Table Details View

From the table view if you select a row and the leadselection is proper table details view will display this.

Regards

Ayyapparaj