![]() * ALV events - the implementation of the on link click event follows further in the post To detect the event of user clicking on the hotspots, we will register an event handler for the ALV. Lr_column_1->set_cell_type( if_salv_c_cell_type=>hotspot ). To achieve this, we can set this column as having cell type of if_salv_c_cell_type=>hotspot. ![]() We want the column ‘TANUM’ to be clickable and display detail in the second ALV based on these clicks. Now our screen has correctly set container and we have created the first ALV. How to set column cells clickable? Hotspot and link click event! *factory( EXPORTING r_container = gr_container_2 The data table may, for example, display the details of the very first row as default option. Now we may proceed to create the second ALV in its own container. * Set ALV functions - should you wish to include any *factory( EXPORTING r_container = gr_container_1 Gr_container_2 = gr_splitter->get_container( row = 2 Gr_container_1 = gr_splitter->get_container( row = 1 When creating each ALV, I specify in which container they should go. Notice how I specify the number of requested rows and columns when creating the splitter. Then, compose everything together in the build_alv method. I do have my own class handling all the ALV-related things, therefore I have these set as instance attributes. I show it for two, but will work for whatever number you choose. Then place each ALV in its own container. This screen distribution can be achieved by creating a splitter and two containers. How to achieve split screen? Splitters and containers! In this post, I will describe how to make such a screen with two ALVs, utilizing CL_SALV_TABLE, displaying dependent information. ![]() And won’t it be practical to have all this in one screen, so users can check details quickly without constant back and forth between screens? This was indeed what users wanted and what I implemented for them. One ALV with headers and a second with details of selected row – quite a common use-case. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |