cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify the Row no. when a button is clicked in a table.

Former Member
0 Kudos

Hi,

I would like to use a button in table column, in this case how would I identify the row no. when the user click the button. Is that clicking button affects context change log. Please help me out here.

Cheers,

Senthil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

if it is an alv table then you need to you can get the selected row from r_param->index of the event handler ON_CLICK

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanx Guys.. Solved

Former Member
0 Kudos

How did you do finally ? i do have the same problem !!!

Former Member
0 Kudos

In your button's event handler, call the method wdevent->get_context_element('CONTEXT_ELEMENT'), which will return you the element on which the button was clicked. Do a get_static_attributes to get the row data. I dont think the context change log will be updated on a button click.

mohammed_anzys
Contributor
0 Kudos

Hi

I think you want to know the row number, in this case , what i would suggest is , in the action ,there is a parameter WDEVENT , which gives you the complete row where you clicked.

In WDEVENT , you have GET_CONTEXT_ELEMENT method as well as GET_DATA method to fetch the data and it doesnt require any lead selection.

Thanks

Anzy