ALV
ALV (the ABAP List Viewer, now SAP List Viewer) is the standard framework for displaying tabular data in ABAP with rich, ready-made features, sorting, filtering, totals, column selection and export, without building them yourself. Nearly every custom report uses ALV.
ALV’s saved layout variants let users keep their preferred column set and sorting, a big usability win.
- Rather than writing raw WRITE statements, ALV takes your internal table and renders a professional, interactive grid: users can…
- There are older (REUSE_ALV_* function modules) and object-oriented (CL_SALV_TABLE, CL_GUI_ALV_GRID) ALV APIs.
- Nearly every custom report uses ALV.
- Watch out: Hand-coding output instead of using ALV.
Why ALV
Rather than writing raw WRITE statements, ALV takes your internal table and renders a professional, interactive grid: users can sort, filter, rearrange columns, subtotal, and export to Excel, and can save their preferred layout as a variant. This consistency and power is why ALV is the default for list output.
The modern approach: CL_SALV
DATA lo_alv TYPE REF TO cl_salv_table.
cl_salv_table=>factory(
IMPORTING r_salv_table = lo_alv
CHANGING t_table = lt_orders ).
lo_alv->get_functions( )->set_all( abap_true ).
lo_alv->display( ).ALV variants
There are older (REUSE_ALV_* function modules) and object-oriented (CL_SALV_TABLE, CL_GUI_ALV_GRID) ALV APIs. For new development, the simple CL_SALV_TABLE is preferred for read-only grids; CL_GUI_ALV_GRID is used when you need editable grids or fine control.
Layouts and reuse
ALV’s saved layout variants let users keep their preferred column set and sorting, a big usability win. Building reports on ALV means you get all this for free and deliver a consistent experience.
Common pitfalls
- Hand-coding output instead of using ALV.
- Using old REUSE_ALV FMs for new development.
- Ignoring layout variants that users value.