on 05-13-2006 3:13 PM
The following is my requirement.
I have to make the entire row of my ALV Table Ineditable
based on the content of a field in that row.
e.g.
Say, In my ALV table, i have a column field 'STATUS'
If in a row, the status cell has value 'Released' then that entire row should be ineditable else editable.
Need your Inputs ASAP.
Thank U..
Sravan
Hi Sravan,
For this, you have to make the column editable and then use the property called set_visible_fieldname.
I assume currently you have made your ALV editable.
Next to make an ALV selectively editable or non-editable, add a string attribute say 'EDITYESNO'. Based on the value of your release status set the the value of 'EDITYESNO' to '02'(Editable) or '00' (Non-editable).Say the column name you want to make editable or non-editable is 'NAME', then use the following code.
set cell editor for input fields
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_input_field TYPE REF TO cl_salv_wd_uie_input_field,
lr_column type ref to CL_SALV_WD_COLUMN.
lr_column_settings ?= l_value.
lr_column = lr_column_settings->get_column( 'NAME' ).
CREATE OBJECT lr_input_field EXPORTING value_fieldname = 'NAME'.
lr_input_field->set_visible_fieldname( 'EDITYESNO' ).
lr_column->set_cell_editor( lr_input_field ).
Regards,
Srini.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.