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