IT CanvassTalk to an advisor
SAP ABAP development · LessonBy , SAP Trainer, 13 yrs · Published · SAP S/4HANA 2023 · all levels

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.

Quick answer

ALV’s saved layout variants let users keep their preferred column set and sorting, a big usability win.

Key takeaways
  • 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.

Practice challenge

+0 XPStreak ×0
Question 1 of 3
Which statement is true of ALV?

Frequently asked questions

What does ALV stand for in SAP?
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.
What is worth remembering about ALV in practice?
ALV’s saved layout variants let users keep their preferred column set and sorting, a big usability win.
What is another point to note about 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.
What tends to go wrong with ALV?
Hand-coding output instead of using ALV. Using old REUSE_ALV FMs for new development. Ignoring layout variants that users value.
Already working on SAP and stuck on a live ticket?Get an expert SAP developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support