cancel
Showing results for 
Search instead for 
Did you mean: 

Reg ALV - Urgent

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

srinivasa_raghavachar
Participant
0 Kudos

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.

Former Member
0 Kudos

this code make column 'NAME' editable or noneditable...i want to make this change for a particular row..like for row index x i want my column 'NAME' editable..

Answers (0)