cancel
Showing results for 
Search instead for 
Did you mean: 

event from checkbox in an alv column and access changed element/row

Former Member
0 Kudos

back again

I have a column in my alv with checkboxes (1 per cell).

when the checkbox is activated I want to enable a button at the view.

when the button is clicked I want only to transfer the changes of the rows in the alv with the activated checkboxes in its column.

1. how can I fire an event "enable_button" when a checkbox in the column is activated ? I would then enable the button in the eventhandlermethod. can I determine this event for the whole column because at designtime its not known how many rows the column would have.

2. when all this works with the eventhandler and the clicked button...how can I then read out only the rows from the context which are changed with activated checkbox in alv? I need the index of the checkbox so that I coud access the right element in the context.

3. do I have to start the DATA_CHECK method in my eventhandler after clicking the button to update my context?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Thorsten.

you can add an event handler for ON_CELL_ACTION of ALV in the view controller which embedds the ALV.

This handler will be called each time you click the checkbox.

The handler method has the importing parameter r_param of type IF_SALV_WD_TABLE_CELL_ACTION.

you can use r_param->index to find out which row the selected checkbox is in.

Cheers,

Sascha

Former Member
0 Kudos

thank you sascha...so my question is answered but I can´t find the button for changing the status of this thread to "answered".

greetings thorsten