ERPClimb logoERPClimb
Embedded Analytics
BW / Analyticsintermediate 8 min read

Designing Analytical CDS Views and Embedded BW Queries (Part 2)

Preview · a free account unlocks the full lesson

Key takeaway

Explains how to design and build analytical CDS views and embedded BW queries against S/4HANA data, including annotations, virtual InfoProviders, and integration with reporting tools.

In this lessonShow sections

Visual overview

Designing Analytical CDS Views and Embedded BW Queries (Part 2) — learning sheetIn one line: Explains how to design and build analytical CDS views and embedded BW queries against S/4HANA data, including annotations, virtual InfoProviders, and integration with reporting tools.ERPClimb.com / BW / LESSON 2/4 / LEARNING SHEETDesigning Analytical CDS Views and Embedded BW Queries(Part 2)1 · IN ONE LINEExplains how to design and build analytical CDS views and embedded BW queries againstS/4HANA data, including annotations, virtual InfoProviders, and integration with reportingtools.2 · KEY IDEAS EXPLAINED1Once the decision has been made to use embeddedanalytics for a given reporting requirement, theimplementation work centers on two closely relatedtechnical paths: pure ABAP CDS-based analyticalqueries, and embedded BW queries built on top ofCDS-based virtual InfoProviders. Understanding how…2Analytical CDS views are built using CDSannotations that describe analytical semantics ontop of a data model. A basic CDS view exposesfields from one or more underlying database tables(often joining several standard S/4HANA tables),and analytical annotations mark certain fields as…3Embedded BW builds on this by allowing a BW queryto be defined against a virtual InfoProvider thatis generated from an underlying CDS view (ratherthan against a physically loaded InfoCube orADSO). This virtual InfoProvider behaves like astandard BW InfoProvider from the BW modeling and…4A critical integration point is that these virtualInfoProviders can, in many landscapes, be combinedwith classic physical InfoProviders in aMultiProvider or CompositeProvider, allowing asingle BW query to blend real-time operationaldata with historically loaded BW content. This is…3 · DO · AVOIDBest practice!Common mistakeLayer CDS views (interface, composite,consumption) to keep reusable logic separate…Explicitly define currency and unit conversionannotations on all amount and quantity…Use CompositeProviders to blend virtual (live)and physical (historical) InfoProviders when…✕Designing analytical CDS views directly onheavily normalized custom tables without…✕Forgetting to define currency/unit conversionannotations, leading to incorrect aggregated…✕Mixing virtual and physical InfoProviders in aCompositeProvider without validating…4 · IN A REAL PROJECTA manufacturing company needed a plant-level production variance report combining current week live data withtwo years of historical variance data already stored in BW/4HANA ADSOs. The team built an analytical CDS viewover the current production confirmation tables, exposed it as a virtual InfoProvider in embedded BW, and…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Once the decision has been made to use embedded analytics for a given reporting requirement, the implementation work centers on two closely related technical paths: pure ABAP CDS-based analytical queries, and embedded BW queries built on top of CDS-based virtual InfoProviders. Understanding how these fit together is essential for intermediate-level design work.

Analytical CDS views are built using CDS annotations that describe analytical semantics on top of a data model. A basic CDS view exposes fields from one or more underlying database tables (often joining several standard S/4HANA tables), and analytical annotations mark certain fields as measures (with aggregation behavior such as SUM) and others as dimensions or characteristics. Additional annotations can define currency/unit conversion, hierarchies, and default aggregation.

These CDS views can be layered: a basic interface view exposes raw fields, a composite view adds joins and associations, and a consumption view (often prefixed for analytical use) adds the OData/analytical annotations that make it consumable by Fiori elements, SAP Analysis for Office, or embedded BW.

Embedded BW builds on this by allowing a BW query to be defined against a virtual InfoProvider that is generated from an underlying CDS view (rather than against a physically loaded InfoCube or ADSO).

This virtual InfoProvider behaves like a standard BW InfoProvider from the BW modeling and query design perspective — you can add restricted/calculated key figures, variables, navigational attributes, and hierarchies in the BW query designer — but at execution time, no BW-owned physical data is read; the query pushes down to the underlying CDS view, which in turn reads live application tables.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.