Skip to content
IT Canvass
SAP ABAP development · Lesson

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.

Want to learn this properly?

Our live, instructor-led SAP Training covers this hands-on, with real projects and a certification path.

Check your understanding

  1. Which statement is true of ALV?

    • A. A client is a self-contained tenant within an SAP system, with its own master data, transaction data and…
    • B. PP configuration (customizing) sets up production planning to match the manufacturing environment, order…
    • C. This consistency and power is why ALV is the default for list output.
    Show answer

    C. This consistency and power is why ALV is the default for list output.

    Covered in the “Why ALV” section of this lesson.

  2. Which of these also applies to ALV?

    • A. Expecting the GUI menu tree in Fiori, it is app-based.
    • B. Reading raw tables where a CDS view/report is better.
    • C. There are older (REUSE_ALV_* function modules) and object-oriented (CL_SALV_TABLE, CL_GUI_ALV_GRID) ALV APIs.
    Show answer

    C. There are older (REUSE_ALV_* function modules) and object-oriented (CL_SALV_TABLE, CL_GUI_ALV_GRID) ALV APIs.

    Covered in the “ALV variants” section of this lesson.

  3. Which part of the Learn SAP curriculum covers ALV?

    • A. SAP ABAP development
    • B. SAP Fiori
    • C. SAP navigation
    Show answer

    A. SAP ABAP development

    This lesson sits in the SAP ABAP development section of the Learn SAP course.

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.
CallWhatsAppEnquire