cancel
Showing results for 
Search instead for 
Did you mean: 

WD ALV - Access filtered values

former_member182374
Active Contributor
0 Kudos

Hi Experts,

In ALV there is a standard option to filter values.

Assuming I use a filter, how can I iterate on the result? (filtered values)

Regards,

Omri

Accepted Solutions (1)

Accepted Solutions (1)

Abhinav_Sharma
Contributor
0 Kudos

Hi Omri,

You need to create a action, lets say 'APPLY'. You can read the filter values of ALV onActionApply. Try with the following code:

    DATA: lr_alv TYPE REF TO iwci_salv_wd_table,
        l_value TYPE if_salv_wd_table=>s_type_param_get_ui_info,
        lt_rows_selected type if_salv_wd_table=>s_type_param_get_ui_info-t_displayed_elements,
        row_idx type i.

      lr_alv = wd_this->wd_cpifc_alv( ).

  IF NOT lr_alv IS INITIAL.

    l_value = lr_alv->get_ui_info( ).
    lt_rows_selected = l_value-t_displayed_elements.

  ENDIF.

loop at lt_rows_selected into row_idx.
*  Read the elements from the mapped ALV data node based on the row_idx

* Your business logic
endloop.

Regards

Abhinav

former_member182374
Active Contributor
0 Kudos

Thanks!

Answers (0)