cancel
Showing results for 
Search instead for 
Did you mean: 

Index of the Table control - No lead selection activated

Former Member
0 Kudos

Hi guys,

I have a table control where there is no lead selection.... One colum of the table contains push button on all rows and I need to find the row id based on the click of the which row button... How to do this???

regards,

Prabhu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prabhu ,

write the below piece of code in the button Action .

DATA lo_nd_node_table TYPE REF TO if_wd_context_node.
  DATA lo_el_node_table TYPE REF TO if_wd_context_element.
  DATA ls_node_table TYPE wd_this->Element_node_table.
*   navigate from <CONTEXT> to <NODE_TABLE> via lead selection
  lo_nd_node_table = wd_context->get_child_node( name = wd_this->wdctx_node_table ).

  CALL METHOD wdevent->get_context_element
    EXPORTING
      name  = 'CONTEXT_ELEMENT'
    RECEIVING
      value = lo_el_node_table.  " getting the clicked line


  CALL METHOD lo_nd_node_table->SET_LEAD_SELECTION
    EXPORTING
      ELEMENT = lo_el_node_table.  " Setting the lead 

  data lv_index type i.
  CALL METHOD lo_nd_node_table->GET_LEAD_SELECTION_INDEX
    RECEIVING
      INDEX = lv_index. " getting the index of the lead line

Hope it will Helpfull .

Regards

Chinnaiya P

Edited by: chinnaiya pandiyan on Jun 28, 2010 12:04 PM

Answers (0)