cancel
Showing results for 
Search instead for 
Did you mean: 

Table editor row identification for an action on table row

Former Member
0 Kudos

Hi Experts,

I have a table editor with 5 columns and one of the column is a LinkToAction element.

Now when i have multiple lines in this table, I want to know on action of click of the linktoaction of a particular row, i want the row number and its details.

How can i know which row's action was clicked?

Any clue is highly appreciated.

Ajay

Accepted Solutions (1)

Accepted Solutions (1)

saravanan_narayanan
Active Contributor
0 Kudos

Hello Ajay,

while creating the action handler for LinkToAction, check the checkbox 'Transfer UI Parameters' (available at the bottom of the popup). this will create the action handler with input parameter CONTEXT_ELEMENT.

At runtime, the CONTEXT_ELEMENT will hold the instance of the context element on which the action is performed.

BR, Saravanan

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ajay,

If you want details of row which the link to action is clicked,

you can get the corresponding context element in the event handler of the action for Link to Action.

method ONACTION.
  DATA cont_ele TYPE REF TO IF_WD_CONTEXT_ELEMENT.
  cont_ele = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
endmethod.

In the above code, Cont_ele will have the reference to the context element corresponding to the

link to action which was clicked.

Cheers,

Kris.

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

can you read the context_element of the Link to action

use get_static_attributes method..

pass the context_element..

you will have the values of the row selected

Edited by: ssm on Jul 25, 2011 6:23 PM