cancel
Showing results for 
Search instead for 
Did you mean: 

How to activate both CELL_ACTION and ON_CLICK event in ALV WDA

Former Member
0 Kudos

I have a use case where some of my ALV columns are editable and some not.

In that ALV,  first non-editable column, on click, should open ME23 tcode and on Enter on 2nd editable column, my custom logic should be called and populate it with new values.

But the sad part is, the event ON_CLICK is only triggered if the method IF_SALV_WD_TABLE_SETTINGS~SET_CELL_ACTION_EVENT_ENABLED is set to FALSE Otherwise, the event ON_CELL_ACTION is triggered. Both don't work together.

So, is there a way around to activate both or address this requirement ?

Thanks

Geeta

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Geetha,

You make the first non-editable column as LinkToAction. So that you can get the event triggered ON_ACTION for both first column and other editable column as well.

Make cell action enabled:  lr_config->if_salv_wd_table_settings~set_cell_action_event_enabled( abap_true ).

For both columns, same ON_ACTION gets triggered and using column name and value you can execute respective logic to meet your requirement.

Please refer the below snap shot for column details on_action

Hope this helps you.

Regards,

Rama