Interviewers now expect object-oriented ALV. Build me an ALV with CL_SALV_TABLE where clicking an order number opens the order, and tell me when you would not use SALV.
Say your answer out loud first.
Practise another way
I select the data into an internal table and call CL_SALV_TABLE=>factory. Then I switch on the standard functions, set the order column's cell type to hotspot and register a handler for the link_click event.
In the handler I read the row, set parameter ID AUN and call VA03 with an authority check. I would not use SALV when users must edit cells, or for millions of rows: then the grid class or ALV with IDA fits better.
Why SALV. CL_SALV_TABLE wraps the ALV grid control behind a small object model: one factory call, then getter objects for functions, columns, sorts, filters, aggregations, selections and events.
No field catalog, no screen, no container needed for full-screen output. SAP's own cheat sheet recommends classes like this over using CL_GUI_ALV_GRID directly in new code.
CLASS lcl_handler DEFINITION.
PUBLIC SECTION.
CLASS-DATA orders TYPE STANDARD TABLE OF vbak WITH EMPTY KEY.
CLASS-METHODS on_link FOR EVENT link_click OF cl_salv_events_table
IMPORTING row column.
ENDCLASS.
CLASS lcl_handler IMPLEMENTATION.
METHOD on_link.
DATA(order) = orders[ row ]-vbeln.
SET PARAMETER ID 'AUN' FIELD order.
CALL TRANSACTION 'VA03' WITH AUTHORITY-CHECK AND SKIP FIRST SCREEN.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
SELECT * FROM vbak INTO TABLE @lcl_handler=>orders UP TO 500 ROWS.
TRY.
cl_salv_table=>factory( IMPORTING r_salv_table = DATA(alv)
CHANGING t_table = lcl_handler=>orders ).
alv->get_functions( )->set_all( abap_true ).
CAST cl_salv_column_table( alv->get_columns( )->get_column( 'VBELN' )
)->set_cell_type( if_salv_c_cell_type=>hotspot ).
SET HANDLER lcl_handler=>on_link FOR alv->get_event( ).
alv->display( ).
CATCH cx_salv_error INTO DATA(err).
MESSAGE err->get_text( ) TYPE 'I' DISPLAY LIKE 'E'.
ENDTRY.
Points that show experience.
- The table passed to
factorymust live as long as the ALV (a global or class attribute), because SALV keeps a reference to it. That is whyordersis a class attribute. double_clickis the other event;added_functionhandles your own toolbar buttons afterset_screen_status.get_columns( )->set_optimize( ),get_sorts( ),get_aggregations( )cover most layout wishes; after changing data callrefresh( ).CALL TRANSACTION ... WITH AUTHORITY-CHECKmakes the start authorization explicit, which ATC security checks expect.
When not to use SALV.
- Editable cells. SALV was built as a display tool.
CL_GUI_ALV_GRIDon a screen is the classic choice for editing, and on S/4HANA a RAP app with draft is the modern one. - Very large data. SALV needs every row in an internal table on the application server. ALV with IDA (
CL_SALV_GUI_TABLE_IDA=>create( )orcreate_for_cds_view( )) lets the database do paging, sorting, filtering and totals and fetches only the visible rows. - Fine control of individual cells, drag and drop, or several grids arranged in containers: grid class.
All of this is SAP GUI, so it applies to S/4HANA on-premise and Private Edition, not to ABAP Cloud.
Writes a working factory/hotspot/handler flow, explains the reference to the data table, and gives concrete limits with the right alternatives (grid class, ALV with IDA, RAP).
Can only describe REUSE_ALV_GRID_DISPLAY, or claims SALV can do everything the grid class can.
Passing a local table declared in a method to factory and then leaving the method. The ALV keeps a reference, so the data must stay alive (global or attribute) while it is displayed.
- Why must the data table outlive the factory call?
- How would you add your own toolbar button to this ALV?
- How does ALV with IDA differ from SALV for ten million rows?
- How do you show the same ALV inside a container on a screen?
1 candidate write-up, 3 official pages and 5 prep guides. Confidence: high. Checked 3 Dec 2026.
- Official page Backs the answer.
- Official page Backs the answer.
- Official page Backs the answer.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Prep guide Describes the round.
- Prep guide Gives the question.
- Prep guide Gives the question.
- Candidate write-up Gives the question.