Skip to Content
0
Former Member
Aug 31, 2012 at 05:48 AM

How to make the check box as editable

1451 Views

hi folks,

i want to make the check box as editable, i have written below code for checkbox, check box is getting displayed in output but this is not as editable check box, i want to make it as editable checkbox.

TRY.
CALL METHOD CL_SALV_TABLE=>FACTORY(
EXPORTING
* LIST_DISPLAY = IF_SALV_C_BOOL_SAP=>FALSE
R_CONTAINER = G_CUSTOM_CONTAINER
* CONTAINER_NAME = G_CUSTOM_CONTAINER
IMPORTING
R_SALV_TABLE = O_ALV
CHANGING
T_TABLE = it_data )
.
CATCH CX_SALV_MSG .
ENDTRY.

data: lr_events type ref to cl_salv_events_table.
data: gr_events type ref to lcl_handle_events.

lr_events = o_alv->get_event( ).

lr_columns = o_alv->get_columns( ).
lr_columns->set_optimize( gc_true ).
lr_column ?= lr_columns->get_column( 'CHECKBOX' ).
lr_column->set_cell_type( if_salv_c_cell_type=>checkbox ).
lr_column->set_long_text( 'CHECKBOX' ).


create object gr_events.


set handler gr_events->on_double_click for lr_events.
set handler gr_events->on_link_click for lr_events.

O_ALV->DISPLAY( ).

I am trying to use below code but not able to make editable checkbox.

*DATA: "lr_table TYPE REF TO cl_salv_table,
* lr_selections TYPE REF TO cl_salv_selections.
*DATA: lr_columns TYPE REF TO cl_salv_columns_table.
*
* lr_selections = o_alv->get_selections( ).
* lr_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).

*