Skip to Content

Highlight the table rows if the corresponding row's checkbox is checked...

Hello Experts,

How to highlight a table row, if "checked" a row?? - Webdynpro - ABAP - SALV_WD_TABLE

Requirement: As the selected rows are highlighted(Below Image), the same functionality needed through Checkbox selection.

Thank you.

Regards,

Zayidu A

1.png (101.2 kB)
2.png (193.2 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Nov 19, 2018 at 01:28 PM

    When user check any box, event ON_DATA_CHECK should be raised (if_salv_wd_table_settings~set_cell_action_event_enabled) , so if you handle it you could change record color (wdui_table_cell_design)

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Raymond,

      Thank you so much for your reply.

      But still, I couldn't achieve the functionality in the way you said to implement; in fact, the debugger doesn't open/stop at that event handler ON_DATA_CHECK's method when I check an item.

      Requesting you to please give the sample code or any other idea.

      Thank you..

  • Nov 19, 2018 at 02:01 PM

    Hi Zayidu,

    If you want multi selection in ALV just like that normal table then you can enable that as well like it is shown in the below url.

    http://www.onsap.com/questions/139/how-to-have-multiple-selection-in-web-dynpro-alv

    Else if you want it to be a check box then there is cell action event, in that event you can check if that check box is selected and you will get the row number.

    http://abaperstreet.blogspot.com/2014/07/using-checkbox-in-alv-webdynpro-with.html?m=1

    Now here get the table binding node context and set that particular record as selected. You can see in the below url how to set select the item.

    https://blogs.sap.com/2013/05/23/multi-select-rows-in-webdynpro-alv-with-out-using-ctrl-key/

    Using this combination of multiple blogs you can solve your requirement.. :)

    BR,

    Mahesh

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Mahesh,

      Thank you so much for your reply.

      I have done all the above, and also I implemented one of the solutions mentioned by Raymond; but still, it couldn't be achieved.

      Thank you.