cancel
Showing results for 
Search instead for 
Did you mean: 

ALV table - cell editor??

Former Member
0 Kudos

Hi,

I am facing a strange issue, that my alv table is opening as editable format even i havnt write editable coding in doinit() method. i have written my coding in domodify().

coding as follows:

WHEN 'PRIORITY'.

DATA: lr_column_settings_PRIORITY TYPE REF TO if_salv_wd_column_settings,

lr_column_PRIORITY TYPE REF TO cl_salv_wd_column,

lr_input_field_PRIORITY TYPE REF TO CL_SALV_WD_UIE_DROPDOWN_BY_KEY.

lr_column_settings_PRIORITY ?= lo_value.

lr_column_PRIORITY = lr_column_settings_PRIORITY->get_column( 'PRIORITY').

if MODIFY_PARAM eq ABAP_TRUE.

*Getting the columns settings.

CREATE OBJECT lr_input_field_PRIORITY EXPORTING SELECTED_KEY_FIELDNAME = 'PRIORITY'.

lr_column_PRIORITY->set_cell_editor( lr_input_field_PRIORITY ).

lr_table_settings->set_read_only( abap_false ).

else.

CREATE OBJECT lr_input_field_PRIORITY EXPORTING SELECTED_KEY_FIELDNAME = 'PRIORITY'.

lr_input_field_PRIORITY->set_enabled( abap_false ).

lr_column_PRIORITY->set_cell_editor( lr_input_field_PRIORITY ).

lr_table_settings->set_read_only( abap_false ).

ENDIF.

What is wrong in this and how initially table is populating as editable?

Please help me on this issue.

Thanks,

GS

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

Did you check like this

lr_table_settings->set_read_only( abap_true ).

Regards and Best wishes.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I found the issue. I have passed parameter in domodify(). Now i removed that and code works well. Thanks for all your support.

GS

Former Member
0 Kudos

Hi,

I have tried by giving abap_true also. Still i am facing the same issue. any other suggestions..?

Thanks,

GS

Former Member
0 Kudos

Try this out:

  • show tab COLUMN SELECTION in Settings page

CALL METHOD wd_this->alv_conf_table->if_salv_wd_std_functions~set_column_selection_allowed

EXPORTING value = ABAP_false.

here alv_conf_table refers to CL_SALV_WD_CONFIG_TABLE.

Former Member
0 Kudos

CREATE OBJECT lr_input_field_PRIORITY EXPORTING SELECTED_KEY_FIELDNAME = 'PRIORITY'.

lr_column_PRIORITY->set_cell_editor( lr_input_field_PRIORITY ).

lr_table_settings->set_read_only( abap_false ).

else.

CREATE OBJECT lr_input_field_PRIORITY EXPORTING SELECTED_KEY_FIELDNAME = 'PRIORITY'.

lr_input_field_PRIORITY->set_enabled( abap_false ).

lr_column_PRIORITY->set_cell_editor( lr_input_field_PRIORITY ).

lr_table_settings->set_read_only( abap_false ).

ENDIF.

Write down the Read only property in your code as ABAP_TRUE.