Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

get row index of cell in table

Hello,

I am using table control in my application. In this table there is one column has button. While pressing on perticular button, i want to edit row of that table in which that button has pressed. but i did not know how to get index of that cell.

regards,

Sid.

Former Member
Former Member replied

Hi,

Use the code given below:

method ONACTIONONLINKCLICK .
  data: lr_element type ref to if_wd_context_element,
          lv_index type i.
 
  lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
  lv_index = lr_element->get_index( ).

You can also refer this thread: selecting a value from table

https://forums.sdn.sap.com/click.jspa?searchID=25609762&messageID=7042255

You'll get the index of the row clicked in lv_index variable.

I hope it helps.

Regards

Arjun

Edited by: Arjun Thakur on May 4, 2009 11:26 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question