cancel
Showing results for 
Search instead for 
Did you mean: 

Link to action

Former Member
0 Kudos

Hi Guru's,

I am developing an application where in i have two views. In the first view i display header details in a table and in the second view displays the item details for a row selected in the first view. I am using link to action for a particular table column in first view. The problem is that i am not able to determine the row selected and pass the value clicked on to next view.

Please help on how to do that?

Thanks,

Das

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Das,

In the OnAction of your LinkToAction, define an action handler. Inside this, action handler, you have an importing parameter WDEVENT. You can get the selected element as follows -

lo_el_node = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).

lo_el_node->get_attribute(

exporting

name = `ATTR`

importing

value = lv_attr ).

*Have your logic for filling in the second view here.

wd_this->fire_outto_view2_plg( ).

Please note that you may or may not have the rows of the tables as selectable. So just getting the lead selection may not work. Using the WDEVENT parameter is always a safer approach.

Regards,

Neha

Former Member
0 Kudos

Thank you Neha. Solved my problem.

Thanks,

Das

Answers (1)

Answers (1)

former_member515618
Active Participant
0 Kudos

Hi Das,

The lead seleceted record holds the values user has clicked on.

CLEAR: stru_node_<details>.

context_element->get_static_attributes(

IMPORTING

static_attributes = stru_node_<details> ).

Set the attributes selected to a Component controller context node and read the same in the next view.

Hope this helps.