Hi,
I am working on this ALV events tutorial [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd28494a-0801-0010-45a3-fc359d82d3e8 ].I have completed it and works fine.Now I am trying to enhance it.
Where I provide a check box column and if users checks it PRICE column should become editable.
For this
1-I have created attribute READ_ONLY of type BOOLEAN under same context node.
2-Created Checkbox for that attribute READ_ONLY & output has checkbox column now.
I tried creating ONCLICK -event handler -event-ON_CELL_ACTION and wrote following code .
when I debug it is not even comming into this method.
METHOD onclick .
DATA:lt_columns TYPE salv_wd_t_column_ref,
ls_columns TYPE salv_wd_s_column_ref.
DATA: l_column_settings TYPE REF TO if_salv_wd_column_settings.
lt_columns = l_column_settings->get_columns( ) .
LOOP AT lt_columns INTO ls_columns .
CASE ls_columns-id.
WHEN 'PRICE'.
* Create Editable cell
DATA: l_input_field TYPE REF TO cl_salv_wd_uie_input_field.
CREATE OBJECT l_input_field
EXPORTING
value_fieldname = ls_columns-id.
ls_columns-r_column->set_cell_editor( l_input_field ) .
" binding the attribute to the read only property
l_input_field->set_read_only_fieldname( 'READ_ONLY' ).
ENDCASE.
ENDLOOP.
ENDMETHOD.
What am I doing wrong.
I even tried it with ON_DATA_CHECK & ON_CLICK.
Rgds
Vara
Edited by: Vara K on Jun 24, 2009 7:05 PM