cancel
Showing results for 
Search instead for 
Did you mean: 

selected row in alv web dynpro

Former Member
0 Kudos

how can i know the row selected in the alv and the information??

thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Here are the steps to get the selected row & even the contents.

1. You have to create a new method subscribing to the ALV event ON_LEAD_SELECT

2. Add below code inside the method got created.

DATA:node_X                 TYPE REF TO if_wd_context_node,
                    elem_X                 TYPE REF TO if_wd_context_element,
                    stru_X                 TYPE if_main=>element_X .

  node_X = wd_context->get_child_node( name = wd_this->wdctx_X ).

* get element via lead selection
  elem_X = node_search_results->get_element( r_param->index ).

* get all declared attributes
  elem_X->get_static_attributes(
    IMPORTING
      static_attributes = stru_X ).
 "Here replace 'X' with your context node binded to ALV 

Regards,

Manne.

Answers (1)

Answers (1)

Former Member
0 Kudos

data:

lr_node type ref to if_wd_context_node.

lr_node = wd_comp_controller->get_data_node( ).

data:

l_lead_select type i.

l_lead_select = lr_node->get_lead_selection_index( ).

using above code u can get index of the line you have selected from the you have process the data in the internal table

Thanks,

ShaiK Shadulla