ALV Reports Part 6: Hotspot and Double-Click Drill-Down
Preview · a free account unlocks the full lesson
Let users navigate from ALV rows: hotspot columns and double-click events, the classic user command callback of REUSE ALV GRID DISPLAY, HOTSPOT CLICK / DOUBLE CLICK events of CL GUI ALV GRID, and drill-down to a detail ALV or a standard transaction with SET PARAMETER ID and CALL TRANSACTION.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Part 3 built an object-oriented ALV grid; now users want to click a row to see details, which is probably the single most requested ALV feature. A hotspot is a column rendered as a clickable link, where a single click fires an event, while a double-click works on any cell regardless of whether it's a hotspot.
With REUSE_ALV_GRID_DISPLAY, you pass i_callback_user_command = 'USER_COMMAND' and handle the function code '&IC1', which covers both double-click and hotspot clicks, inside that FORM. With CL_GUI_ALV_GRID, you instead register handler methods FOR EVENT hotspot_click and double_click using SET HANDLER. Whichever route you take, always run an AUTHORITY-CHECK before issuing a CALL TRANSACTION to a standard transaction from a drill-down.
In the classic callback approach using REUSE_ALV, mark the link column with hotspot = 'X' in the field catalog, and pass i_callback_user_command = 'USER_COMMAND'. The corresponding form, FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield, receives r_ucomm = '&IC1' for both a double-click and a hotspot click; from there, rs_selfield-tabindex gives you the row index, rs_selfield-fieldname the clicked column, and rs_selfield-value the actual cell value.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Related SAP topics
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.