cancel
Showing results for 
Search instead for 
Did you mean: 

Editable cell of type dropdown

0 Kudos

I would like to know how to solve this problem.

I have a cell (of the type dropdown by key) in an ALV, which has to be editable or not, depending on a value of another column? This is possible?

Since on having declared it like dropdown to the column, it does not leave me to put like not editable.

Regards.

Matías

Accepted Solutions (1)

Accepted Solutions (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

take another context attribute of type WDY_Boolean in your Context Node which is binded to the ALV.

Fill the Attribute with the appropriate value abap_true for enable and abap_false for disable.

From the GET_MODEL Method of your Interface Controller get the Instance of CL_SALV_WD_CONFIG_TABLE

lr_config_table->get_column() will return an Instance of the type CL_SALV_WD_COLUMN

lr_column->get_cell_editor() will return you the instance of CL_SALV_WD_UIE

type cast it to CL_SALV_WD_UIE_DROPDOWN_BY_KEY reference.

and call the method lr_dropdown_by_key->SET_ENABLED_FIELDNAME( '<the new context attribute name(boolean)>' ).

Abhi

0 Kudos

Thanks for the help Abhi.

Regards.

Matías.

Answers (0)