cancel
Showing results for 
Search instead for 
Did you mean: 

Lead selection issue on click of button after filter in webdynpro ALV

Former Member
0 Kudos

Hi Experts,

I just want to know how to set the lead selection after filter in webdynpro ALV. On click of button after filtering lead selection is getting removed . How to set the lead selection on click of button after filter. It's very urgent. I will be so thankful if i could i get reply as soon as possible.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Please follow the logic below:

After Binding your ITAB to the ALV context node: Write the code below

*************Refresh the SALV_WD_TABLE with*******************************************
*DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
DATA: ls_in TYPE if_salv_wd_table=>s_type_param_refresh_in.
  ls_in-dummy = '01'"all

lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_xyz( ). "xyz is the component created for ALV

   lo_interfacecontroller->refresh(
    in =         ls_in                      " if_salv_wd_table=>s_type_param_refresh_in
   ).

Note: this code will execute the WDDOMODIFY method to SALV_WD_TABLE before we select the row. This is the refresh method of ALV interface controller.

Now use the method:

set_lead_selection_index)  : to select the row.

Here you can just pass the '1' to select the first row of your ALV always.

Thanks

KH

0 Kudos

Hi Hadi Ali,

In your Actions Method,

Declare your Node Context reference and get the child node.

METHOD onactionadd_more_lines.

* Populate Line Items

   DATA: lo_nd_claim TYPE REF TO if_wd_context_node. " This is your context node in your contexts

   lo_nd_claim = wd_context->get_child_node( name = wd_this->wdctx_claim ).

   lo_nd_claim->set_lead_selection_index( EXPORTING index = 1 ). " Which line you want to highlight


ENDMETHOD.

former_member197475
Active Contributor
0 Kudos

Hi,

Have you tried to use the set_lead_selection_index method after your filter action???

BR,

RAM.