cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Web Dynpro, ALV, Cardinality 0..n, Remove Select/Deselect All

Former Member
0 Kudos

Hi Everyone

I am developing a new application using ABAP Web Dynpro. I am using ALV. I want to give the user the option to select either 0 or multiple rows in the ALV grid. However, I want to hide the standard Select All/Deselect All push button that appears in the top left hand corner. This is because we do not want the user to simply select all and then click on a pushbutton to complete the process. If they wish to do this, they must manually select each item first of all. Anyone have any ideas? I've looked at the underlying ABAP classes for WD4A, but cannot find a method to do this.

Thanks in advance for your help!!

Jon

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Jon,

You can use SET_SELECTION_MODE Method of IF_SDALV_WD_TABLE_SETTINGS interface class,

and pass the value as CL_WD_TABLE=>E_SELECTION_MODE-SINGLE.

Hope this satisfy your requirement

Regards,

Sandipan

Former Member
0 Kudos

Hi Sandipan

The user must be allowed to select multiple rows. However, we want to force to manually select the rows, instead of using the Select All option. I now think that it is not possible to allow 0:n and to disable the select all button.

Kind regards

Jon

Former Member
0 Kudos

Hello,

To hide the buttons that appear at the top left of ALV, do the following:


lo_model->if_salv_wd_std_functions~set_edit_check_available(
    EXPORTING value  = abap_false )   .

  lo_model->if_salv_wd_std_functions~set_edit_append_row_allowed(
      EXPORTING  value  = abap_false )  .

  lo_model->if_salv_wd_std_functions~set_edit_insert_row_allowed(
    EXPORTING  value  = abap_false )   .

  lo_model->if_salv_wd_std_functions~set_edit_delete_row_allowed(
    EXPORTING  value  = abap_false )   .

  lo_model->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
  lo_model->if_salv_wd_std_functions~set_view_list_allowed( abap_false ).
lo_model->if_salv_wd_std_functions~SET_EXPORT_ALLOWED( abap_false ).
  

Hope this helps!

Regards,

Srilatha

Former Member
0 Kudos

Srilatha, you have hidden all of the buttons except for the one I want hidden

Former Member
0 Kudos

Hello,

Standard Select All / Deselect All option depends upon the Selection property of the UI element.

You have to choose the correct values in that property to hide that option.

Please let us know if this solves your issue.

Thanks

Pradeep

Former Member
0 Kudos

Unfortunately not Pradeep. In ALV you can hide standard functions, and I am hoping that Select All / Deselect All is one of these. Currently I think that I cannot hide the functionality without changing the cardinality. Which I cannot do, as I need to allow the suer to select 0 or more rows. But not using the standard button (we want to avoid the user being lazy and selecting all and then approving. We want them to manually select each row they want to approve)