cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Standard functions

Madhu2004
Active Contributor
0 Kudos

Hai,

I have a requirement where in to make a fiels editable in ALV.

for this code snippet is cumpulsory.

<b>DATA : lr_table_settings TYPE REF TO if_salv_wd_table_settings.

lr_table_settings ?= l_value.

lr_table_settings->set_read_only( abap_false )</b>

But if i add this code four predefined buttons are also displaying in the tool bar of alv.(inset row, delete row, append row,check).

i donot want these to be displayed.

for this i used the following code:

<b>l_value->if_salv_wd_std_functions~set_edit_insert_rows_allowed( abap_false ).</b>

even though that button is being displayed.

can any one help be how to disable these buttons.

regards,

Madhu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Madhu.

These methods do not work?

IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_APPEND_ROW_ALLOWED

IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_CHECK_AVAILABLE

IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_APPEND_ROW_ALLOWED

IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_CHECK_AVAILABLE

IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_DELETE_ROW_ALLOWED

If you do not need ALV standard functions you also can use standard Table UI Element which is easier to handle.

Cheers,

Sascha

Madhu2004
Active Contributor
0 Kudos

Thanks for the reply.

i want editable ALV without check,insert rows,delete rows and append rows button.

can u help me in getting that.

if so,plz provide me some sample code

Former Member
0 Kudos

Hi Madhu:

This works for me:


  DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings,
        lr_std            TYPE REF TO if_salv_wd_std_functions.

  lr_table_settings ?= l_value.
  lr_table_settings->set_read_only( abap_false ).
  lr_table_settings->set_enabled( abap_true ).
  lr_table_settings->set_selection_mode( cl_wd_table=>e_selection_mode-multi ).
  
  lr_std ?= l_value.
  
  lr_std->set_edit_append_row_allowed( abap_false ).
  lr_std->set_edit_check_available( abap_false ).
  lr_std->set_edit_append_row_allowed( abap_false ).
  lr_std->set_edit_check_available( abap_false ).
  lr_std->set_edit_delete_row_allowed( abap_false ).
  lr_std->set_edit_insert_row_allowed( abap_false ).

Answers (0)