Skip to Content
author's profile photo Former Member
Former Member

Selecting multiple Checkboxes to update ALV table is not working and is only updating the first row when I save changes in the table


I have a requirement to display an ALV table with checkbox as the first field. There are three options on the tool bar of the ALV table namely "Select All", "Deselect All" and "Save changes" . When I click "Save changes", the last field needs to be updated with a value(New Supervisor). When I click select all option, checkboxes of all the rows need to be selected. Select All works fine, but when I click on Save changes, it always updates the "first row only" irrespective of selecting other rows.

Below is the logic I've used in my webdynpro.

  • I wrote an event handler for the event "ON_CELL_ACTION" wherein the index of the row that has been selected is passed. Then the node is bound.
  • An event handler has been written for the event "ON_FUNCTION" wherein the logic is written to update the rows with checkboxes (which ever rows I've selected in the input). This contains code for "Select All" , "Deselect All" and "Save Changes" by passing event id = IF_SALV_WD_TABLE_FUNCTION->id where { this IF_SALV_WD_TABLE_FUNCTION->id would be 'SELECT' , 'DESELECT' and 'SAVE_BTN'} .

R_PARAM is delcared as type ref to IF_SALV_WD_TABLE_FUNCTION in the method parameters.

if r_param->id = 'SELECT'.


elseif r_param->id = 'DESELECT'.


elseif r_param->id = 'SAVE_BTN'.

....logic to update the last field for all the selected rows...


Select and Deselect All are working fine. But, when I read the node within "Save changes" logic, it is always pointing to the first line if the table which is evident that the selection is not working fine.

P.S: Earlier, my webdynpro had "row-selector" option and multiple records were updated corrently. But, I had to replace row-selector with Check box as per the user requirement and the logic doesn't seem to work.

Appreciate help or ideas to update the selected rows instead of just updating the first row.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 26, 2016 at 01:55 AM

    Binding the modified internal table to the node will take care of this. Closing the thread.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.