Custom CDS Views in SAP S/4 HANA Public Cloud
And Custom Analytical Queries Explained Practically
When people talk about analytics in SAP S/4HANA Public Cloud, the conversation usually lands on one question sooner or later:
How do we get exactly the data we need—without breaking the clean core idea?
In most projects, the answer is a combination of Custom CDS Views in SAP S/4HANA Public Cloud and Custom Analytical Queries. They are not complicated concepts, but they are often misunderstood—especially where CDS ends and where the analytical query begins.
This article explains both, in a clear and practical way.
Table of Contents
Custom CDS Views in SAP S/4HANA Public Cloud: The Data Foundation
A Custom CDS View is where you shape and prepare your dataset.
In SAP S/4HANA Public Cloud, these are created using the Custom CDS Views app and are based on released SAP interface views, which ensures upgrade safety and clean core compliance.
What Custom CDS Views Are Commonly Used For
In real projects, teams use Custom CDS Views for analytics to:
- Select only the required fields instead of using large standard views
- Combine related business objects (for example, customer, billing, and product data)
- Define associations and filters suitable for analytical scenarios
- Add simple calculated fields when standard models do not fully meet reporting needs
Important Design Principle
In the public cloud, Custom CDS Views are:
- Read-only
- Analytics-oriented
- Not classic ABAP development
They are meant to provide a clean, reusable data model not transactional logic.
Custom Analytical Queries in SAP S/4HANA Public Cloud: Turning Data into Insight
Once the dataset is ready, Custom Analytical Queries in SAP S/4HANA Public Cloud define how the business consumes and analyzes the data.
Using the Custom Analytical Queries app, you configure:
- Measures key figures such as revenue, quantity, or margin
- Dimensions; customer, product, fiscal period, plant, etc.
- Filters and variables for prompts and focused analysis
- Drill-down behavior; how users navigate the data
- Currency and unit handling critical for financial accuracy
Simply put:
A CDS view gives you the data structure, while the analytical query turns it into a usable report.
How Custom CDS Views and Analytical Queries Work Together
A practical way to think about this setup is:
- Custom CDS View → models the data
- Custom Analytical Query → presents and consumes the data
Typical Project Flow
- Build a Custom CDS View containing the required fields, associations, and calculations
- Create a Custom Analytical Query on top of that view
- Define measures, dimensions, filters, and drill-down logic
- Publish and consume the query in:
- SAP Fiori analytical apps
- SAP Analytics Cloud (SAC)
This separation keeps data modeling reusable and avoids duplicated logic.
A Simple, Real-Life Example
A finance team requests:
“Revenue by customer and product, by fiscal period, including margin.”
A standard implementation approach would be:
- Create a Custom CDS View in SAP S/4HANA Public Cloud using released billing and sales interface views
- Include required fields and add a calculated margin
- Build a Custom Analytical Query with:
- Revenue, cost, and margin as measures
- Customer, product, and fiscal period as dimensions
- Publish the query as a Fiori tile or SAC data source
This type of requirement appears in almost every SAP S/4HANA Public Cloud project.
Why This Analytics Approach Works So Well
Teams consistently choose Custom CDS Views and Custom Analytical Queries because they offer:
- Clean core compliance; extensions without modifications
- Upgrade safety; based on released SAP content
- Speed; no long development cycles for reporting needs
- Reusability; one CDS view can support multiple queries
- Live analytics; real-time insight on transactional data
Practical Tips That Save Time in Projects
- Start with the right released interface views a wrong base causes downstream issues
- Keep Custom CDS Views focused and simple
- Avoid “monster views” that try to solve every scenario
- Use consistent naming conventions across views and queries
- Handle currencies and units early to avoid incorrect results
- Test performance using realistic filters and data volumes
Closing Thoughts
In SAP S/4HANA Public Cloud, Custom CDS Views in SAP S/4HANA Public Cloud and Custom Analytical Queries are the standard way to close analytical gaps while respecting SAP’s clean core principles.
When CDS is treated as the clean data layer and analytical queries as the consumption layer, analytics becomes easier to maintain—and far easier to scale as business requirements grow.