Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 4 of 5

Working with ALV lists

8 min

Many SAP GUI reports display their results in an ALV list (SAP List Viewer). Once you know ALV, you can work confidently in hundreds of reports, because they all share the same toolbar. ALV is the SAP GUI cousin of the Fiori list report from sap-fnd-103.

Selection screens first

Most reports start with a selection screen, where you restrict what the report reads: plant, material, date range, company code. Then you choose Execute (F8). For example, MB52 (warehouse stocks of material) asks for material, plant and storage location; Contoso’s Chicago warehouse lead enters plant 1720 and executes.

A good habit is to read the selection screen fully before executing. Many reports have more options than their first screen shows: expand hidden blocks, check the default values, and look for a field for the layout to use. Running a report with too broad a selection can take a long time and produce a list too large to check. Running it with too narrow a selection can make you miss the very documents you were meant to see.

The ALV toolbar

FunctionWhat it doesTypical use
Sort ascending / descendingOrders the rows by the selected columnLargest stock values first
Set filterShows only rows meeting a conditionOnly storage location 172A
Total (Σ)Adds up a numeric columnTotal stock value for the plant
SubtotalsTotals per group after sorting by a columnValue per storage location
Change layoutChoose, order and size columnsHide columns you do not need
Select / save layoutStore and reuse column, sort, filter and total settingsA standard layout for monthly checks
ExportSave the list to a spreadsheet or local fileSupporting evidence or analysis

ALV functions common to most SAP GUI reports

Layouts

A layout (once called a display variant) stores how the list looks: which columns, their order and width, sort order, filters, totals and subtotals. When you save a layout you can usually choose whether it is user-specific (only you see it) or available to all users, and whether it is your default, loaded automatically when the report runs. Whether you may save shared layouts depends on your authorizations.

Selection variants

A layout controls the output. A selection variant controls the input: it saves the values on the selection screen. Fill in the fields, then choose Goto → Variants → Save as Variant (or the save icon) and give it a name and description. Next time, use Get Variant to load it. Variants can also use dynamic date calculations, so "current month" stays current.

AspectSelection variantALV layout
ControlsWhat data the report readsHow the result list looks
Saved fromThe selection screenThe ALV result list
Contoso examplePlant 1720, storage locations, current monthColumns material, storage location, value; subtotal per storage location
Why it helps testingEvery tester reads the same data setEvery tester checks the same columns and totals
Two kinds of saved settings that make SAP GUI checks repeatable.

Used together, a selection variant and a layout turn a report into a repeatable check. A test step can say: "Run MB52 with variant UAT_1720 and layout /UAT_STOCK; confirm the total value for storage location 172A." Anyone can repeat it and should get the same answer from the same data.

A worked example

  1. Start MB52, enter material CMC-ALT-100, plant 1720, and execute with F8.
  2. In the result list, select the storage location column and sort ascending.
  3. Select the stock value column and choose Total, then Subtotals to see value per storage location.
  4. Choose Save Layout, name it for the test (for example /UAT_STOCK), and decide whether it is user-specific or shared.
  5. Go back to the selection screen and save the selection as variant UAT_1720 with a clear description.

What would you do?

Contoso’s inventory controller asks three testers to confirm stock values for plant 1720 after a valuation change. Each tester gets a different total. What is the most likely cause, and fix?

Key points
  • Reports start with a selection screen; Execute is F8.
  • ALV toolbar: sort, filter, total, subtotal, change layout, save layout, export.
  • A selection variant saves input values; a layout saves how results look.
  • Shared variants and layouts make report checks repeatable test evidence.

Check your understanding · not graded

Lesson check

  1. 1. What does an ALV layout store?

  2. 2. Where is a selection variant saved from?

  3. 3. Which key executes a report from its selection screen?