CONTAX Logo

Reports in Clean Core S/4HANA: From ALV Grids to Code-to-Data

November 27, 2026  |  by Rick Kromkamp

In our last article, we introduced clean core as a contract between you and SAP: SAP keeps its released objects stable across upgrades, and you agree to build only on them. We also looked at the three tiers of extensibility (key user, developer, and side-by-side) and the rule of thumb that ties them together: choose the lightest tool that works. Now it's time to put that thinking into practice, one RICEFW category at a time (Reports, Interfaces, Conversions, Enhancements, Forms, and Workflows), and we'll start with the one nearly every ECC developer remembers best.

Every ECC developer remembers their first great Z-report. A selection screen, a few SELECT statements, a loop or two, and an ALV grid that made the business say "that's exactly what we needed." For years, that was the standard way to get answers out of SAP, and it worked. But it also meant that countless reports were reaching directly into raw tables, running their logic in ABAP, and quietly becoming one more thing to break at the next upgrade.

How It Worked in ECC

In ECC, a custom report was a Z-program. You wrote a selection screen, a pile of SELECT statements against raw tables, a few loops to group and calculate, and an ALV grid to display it. Complicated reports often had extensive lookups across multiple domains, grouping and aggregating at several different levels, filtering in the middle, then grouping and aggregating all over again.

How It Works in Clean Core

In S/4HANA clean core, that pattern fades away. The new principle is code to data: push the heavy lifting down into the database instead of pulling data up into ABAP loops. Internal reports are typically built with Core Data Services (CDS) views and queries, and larger analytical needs move to SAP's analytics and data platforms.

The Building Blocks

Stacked CDS views. Joins, associations, aggregations, and calculated fields all run inside the HANA database. The multi-stage logic of an old report often maps well here: view one joins and aggregates, view two filters and regroups on top of it, and so on. The key rule is that you build on released CDS views, not raw tables.

Embedded analytics queries. When the need is mostly analytical, CDS analytical queries (and the key user Custom Analytical Queries app) support calculated measures, restricted measures, and exception aggregation. This is the right tool for "calculate at this level, then roll up differently at that level."

SAP Analytics Cloud and SAP Datasphere. For heavy, cross-domain, or historical reporting, the clean core answer is a combination of two tools. SAP Analytics Cloud handles reports, dashboards, and planning applications. SAP Datasphere is a cloud data warehouse and data integration platform with built-in ETL/ELT capabilities, where you model data across SAP and non-SAP sources. Together they keep heavy analytical workloads off your transactional system.

When the Logic Genuinely Needs Code

Some reports simply can't be expressed cleanly in SQL. They need iteration, conditional branching, or multi-pass calculations. For those, the typical design pattern is a RAP custom entity with a query implementation class. Here is the easiest way to picture it, by mapping it to the classic report you already know:

The custom entity defines the shape of the result: the fields, with annotations that say which are filters and which are columns. The query implementation class is an ABAP Cloud class that does the work. It reads released CDS views with ABAP SQL, processes the results in internal tables (looping, grouping, and calculating just as you did before), and returns the result set. A Fiori elements list report then replaces the ALV grid, with filtering, sorting, and export provided by the framework.

There is one habit to unlearn. In ECC, your program ran once and ALV handled the display. Here, the app sends a request every time the user filters, sorts, or pages, and your class is responsible for honoring it. If your logic aggregates across the full data set, calculate on the full set first, then return only the requested page. And push as much filtering and aggregation as you can into the SQL, so you aren't reading everything into memory.

Choosing Between Them

That last row deserves a word ...

This is the classic "summary table" pattern, rebuilt for clean core. In ECC, many teams ran a heavy Z-program overnight, wrote the results to a Z-table, and had users report on that table. The clean core version of this is:

  • A scheduled application job, written in ABAP Cloud, reads released CDS views, runs the multi-stage logic, and writes the results.

  • The results land in a custom business object (a RAP-managed table).

  • A Fiori list report or an embedded analytics query sits on top of that stored snapshot.

The whole thing runs inside S/4HANA, using developer extensibility.

How it compares to Datasphere

When the on-stack pattern still makes sense

  • The results need to live inside S/4HANA, for example feeding a Fiori app, a transactional process, or a downstream calculation in the core.

  • Authorizations and drill-down to documents should behave like standard S/4HANA.

  • The logic depends only on S/4HANA data and the volume is manageable.

  • The customer doesn't have Datasphere, or the report doesn't justify adding it.

Where it falls short

This pattern puts the heavy processing on the transactional system, which runs against the principle of keeping heavy analytical workloads off it. A large nightly job competes with your business processes for resources. So the more the report looks like true analytics (large history, many domains, non-SAP data, multiple persisted stages), the more it belongs in Datasphere.

Summary: What's Next

If there's one idea to take from this article, it's that the report didn't go away. It moved. The selection screen became a filter bar, the ABAP logic moved down into the database through CDS views, the calculations that needed more flexibility found a home in embedded analytics queries or RAP custom entities, and the heavy, cross-domain reporting moved out to SAP Analytics Cloud and SAP Datasphere. Choose the lightest option that meets the need, and you end up with reports that are faster, easier to maintain, and unaffected by the next upgrade. But reports are only half of the data story. They're about getting information out of SAP so people can see it. In the next article, we'll look at what happens when systems need to talk to each other: the RFCs, IDocs, flat files, and custom services that ECC customers accumulated over the years, and how clean core replaces them with a far more structured approach to interfaces.

Final Thoughts

If your organization is evaluating its S/4HANA strategy and wants expert guidance, CONTAX is here to help. Visit www.contax.com or contact info@contax.com to start the conversation.

About the Author

Rick Kromkamp

Rick is a Business Intelligence evangelist and practitioner in the art of data modelling.

Talk to Our Team

Questions about SAP, EDI or Acumatica? We're glad to help.