abapalv

Custom button in application toolbar of cl_salv_table?


I am making a report by using cl_salv_table, and I want to make a button on toolbar of the ALV grid which will show a predefined popup.

I was able to make a button on the toolbar and set the "Functional code" as details, and I saw in the debug mode that on clicking the button the "sy-ucomm" is set to details but it is not going the case loop.

Any suggestion?


Solution

  • Please look at the program SALV_DEMO_TABLE_SELECTIONS how to implement event handlers correctly, basically method on_user_command in the class lcl_handle_events is what your looking for.