SAP S/4HANA Embedded Analytics and Integration with BW/4HANA
Purpose and Target Audience:
Readers and consultants would get a holistic idea, end–to-end implementation approach for S/4HANA data reporting. This blog will guide on how to consume the CDS view by different applications. It will help with the integration concept of CDS based VDMs with SAP BW and BW/4HANA.
You will learn about the following topics:
- Operational analytics and how it differs from strategic analytics
- Embedded analytics in context with SAP S/4HANA and when to use it (Quite a few options are available when it comes to reporting (e.g., SAP BW/4HANA and associated technology like SAP Business Objects)
- This session will help to unravel when to use what, and where embedded analytics fits into all these
- Best practices involved while customizing an existing Core Data Services (CDS) view or while creating a brand new one
- How to customize a CDS view via a step-by-step
What is SAP S/4HANA:
SAP S/4HANA is SAP’s next-generation SAP Business Suite application on SAP HANA Platform. It came as a successor of SAP ECC.
The main features of SAP S/4HANA are:
- Simplification of business activity/process
- Improved efficiency in transaction recording (new simplified data architecture)
- Faster Analytics (using a virtual data model based on Core Data Services-CDS)
- Modern user interface (SAP Fiori), and planning and simulation options.
Generally two separate systems were used before to merge transactional and analytical requirements. SAP S/4HANA offers an integrated transactional and analytical platform to process complex analytic queries as a harmonious data collection.
SAP S/4HANA is a complete new product running on SAP HANA for simplification of the applications and the underlying data model (no indexes, no materialized aggregates so no redundancies).
S/4HANA Value Proposition:
SAPS/4HANA – Data Architecture (Really Simple)
S/4HANA Embedded Analytics and CDS views:
SAP S/4HANA embedded analytics is a collection of analytics features and a set of SAP content delivered self-service data representations (i.e. , virtual data models) to derive real-time insights from the data without any detail knowledge of underlying data structure. S/4HANA embedded analytics can be built directly into transactional business processes and can be consumed by separate analytics applications.
The goal is to improve both the efficiency and effectiveness of the business process through integration, analysis and visualization of analytics and KPIs, within the range of the business process execution.
It Consist of virtual data models based on CDS views covering role-based operational reports for lines of business and comes with tools for business users, power users and developers to analyze data and manage the lifecycle of reports and KPI.
CDS view based Virtual Data Model (VDM):
The Core Data Services (CDS) offers domain-specific languages and services to define and consume semantically rich data models. SAP provides a set of CDS views to serve as the functional representation of its operational data (both transactional and master data tables of SAP S/4HANA)[Discussed in detail later in this blog].
These virtual data models (VDM) are the foundation of the SAP S/4 HANA system and used by both business process and analytics to access data from the underlying physical tables. It is a structured representation of CDS views and follows consistent modeling rules.
It provides direct access to SAP business data using standard SQL or OData requests. These virtual data models can also be used for extracting data from the SAP S/4HANA system to SAP BW.
[Source : SAP]
S/4HANA Embedded Analytics – Fact Check:
- SAP S/4HANA embedded analytics is the collection of all analytics features in S/4HANA that enable operational reporting on live transactional data
- Achieved through the use of CDS views that are pre-delivered by SAP
- You have the option to create new views and/or enhance or modify existing views
- The consumption of these CDS views is controlled using “annotations”. Annotations enrich CDS data models with additional metadata. They begin with @.There are two types of annotations. The first type of annotations provides metadata which applies to the whole CDS view entity (e.g. specifying the table buffer settings of a view). Such annotations are listed before the statement DEFINE VIEW. The second type of annotations is used to have influence on a single item from the select list (e.g. specifying a field as Unit of Measure with @Semantics.unitOfMeasure). Annotations of this type are specified directly before the specific field.
- CDS views can be used in ABAP programs as well as for analytical processing
- There are specific annotations that enable this
- SAP delivers more than 8,900 CDS views as part of S/4HANA at no extra cost
- However, more than 90% of these pre-delivered views are not reporting capable
The key architectural components of SAP S/4HANA embedded analytics include:
- SAP HANA database,
- Virtual Data Model,
- Analytical Engine (embedded SAP BW),
- OData service
What is 1709 S/4HANA (On-Premise):
Following the success of product SAP S/4HANA 1610, SAP has released ‘SAP S/4HANA 1709’ as of September 15th, 2017. The SAP S/4HANA 1709 release is now generally available. This release runs on SAP HANA 2, the second generation of SAP’s in-memory database platform, which supports scale-out and usage of active-active for added performance. This enables customers to benefit from the latest innovations in the database system.
- Extended virtual data model and set of KPIs, for LOBs (e.g., FIN, SD, MM, QM, MM, PLM, PP, etc.) and industries (e.g., oil and gas)
- New SAP Fiori applications (see SAP Fiori Apps Library) including predictive and machine learning use cases
- New SAP Smart Business runtime
- Extended multidimensional reporting client
- Report function (guided process)
- Other functional enhancements (e.g., date function)
- Integrated applications using SAP Fiori 2.0 floorplans (analytical list page, overview page, etc.)
- Create tile for SAP Analytics Cloud story
High Level architecture:
[Source : SAP]
Creating Custom ABAP CDS View with OData Service (Step-by-Step Process Flow)
- CDS views – Introduction
- CDS views – Components
- CDS view creation (step-by-step)
- Create CDS view screens with DDL source file creation
- OData activation screens
- End-to-end decision flow
- Sample Analytical Apps by functional area
- CDS offers an SQL-based layer that extends the SQL-92 standard on top of ABAP Layer. It helps combining OLTP and OLAP models of data definition and data retrieval.
- CDS provides a range of advantages for businesses and developers, including:
- Semantically rich data models: CDS builds on the well-known E-R (Entity-Relationship) model and is declarative in nature, very close to RDBMS concept.
- Efficiency: CDS offers a variety of highly efficient built-in functions — such as SQL operators, aggregations, and expressions – for creating and modifying views.
- Support for annotations: CDS syntax supports domain-specific annotations that can be easily evaluated by other components, such as the UI, analytics, and OData services both for integration and visualization purpose.
- Support for conceptual associations: CDS helps you define associations that serve as relationships between different views. Path expressions can be used to navigate along relations. Introducing an abstraction of foreign key relationships and joins, associations make navigation between entities consumable.
- Extensibility: You can extend SAP-delivered CDS views with fields that will be automatically added to the CDS view along with its usage hierarchy.
CDS Views – Components
[Source : SAP]
CDS View Creation – How to Guide:
Here we will learn below aspects:
- How to create a CDS view based on ECC data (Example will use sales order header and item tables as a data source for sample report)
- Expose this CDS view as OData service
- Activate the OData service on SAP Gateway
Prerequisites: You should install the ABAP Development Tools extension for Eclipse in the ‘ABAP perspective’ with desired package selected
- Step 1:Right-click on package in which the CDS view will be placed
- Step 2:Select New ª Other ABAP Repository Object
- Step 3: Search for Core Data Services folder and select Data Definition. After entering CDS view name, it will ask for attaching the view to a transport request as below.
- Step 4: Select the transport where we want the DDL source file to be attached. Once this has been done you can either select “Finish”, which will automatically select the basic CDS view or you can select “Next”, which will bring you to a list of different DDL source file templates from which you can choose.
SAP Gateway exposes the consumption CDS views as an OData service, allowing SAP Fiori, SAP Business Objects BI tools and other third-party clients to access the consumption views directly or via the analytical engine.
- Step 5: Will introduce the code as given in the screen print below within the DDL source file along with the annotation for OData services as highlighted in the screen print.
- Step 6: Activation of OData service on front-end server (Gateway)
- After this, the OData service will be connected to corresponding back-end service
- Now, we start working on the front-end server. Once we enter the /n/IWFND/MAINT_SERVICE T-code we will get the following screen. Click “Add Service” button.
- Step 7: In the screens below provide System Alias and Technical Service Name and click “Get Service” button, which will make the new back-end service appear in the list.
- Step 8: Then select the Technical Service Name and click “Add Selected Services” button as shown below. Add package assignment (in our case local package or $TMP) and click OK.
- Step 9: If we go back and refresh the CDS view, we can observe the round shape symbol at OData annotation, which means OData service is generated. Place the cursor on the symbol and click on the OData-Service link as shown below:
- Step 10:This will lead to the OData service web browser
Step 11: Finally we can see the OData service working fine
Analytical App with ABAP CDS Views
This diagram will show how you build custom embedded analytical apps using the various embedded analytics tools and frameworks within SAP S/4HANA.
Exposing/Consuming CDS Views Using Different SAP Toolkits
CDS Views – Integration and Consumption
The lists of applications which can consume CDS views for analysis are below:
- SAP BW
- Embedded SAP BW
- Standalone SAP BW
- SAP Fiori
- Query Designer and multidimensional reporting
- Sample analytical app list by functional area
- SAP BI suite tool sets — Like Webi, Crystal Reports, Lumira etc.
SAP BW integration with CDS views needs to be divided in below two scenarios:
- Embedded SAP BW natively present within S/4HANA box
- External SAP BW (standalone) system of which the latest offering is BW/4HANA
SAP BW as a Data Warehouse (External)
- Consolidated, BW-owned persistence
- Multiple sources (SAP and non-SAP)
- Explicit modelling of semantics, storage, security for analytics
S/4HANA one of many sources
Embedded BW (in S/4HANA)
- No BW-owned persistence
- Embedded into single source (S/4HANA)
- Reuses S/4HANA security which is more transactional in nature
Embedded into S/4HANA
Embedded SAP BW – Pros and Cons :
Look at the below basic facts before you choose Embedded BW for analytic purpose.
- SAP BW has been automatically included in SAP ERP systems since SAP NetWeaver®0
- This BW supports all BW native functionality including SAP BPC processes (separate license)
- Embedded SAP BW is used to support certain business processes in the SAP Business Suite and in SAP S/4HANA (e.g., Integrated Business Planning for Finance, using SAP Business Planning and Consolidation [BPC])
- The version of SAP BW used in the embedded scenario is SAP BW 7.5 powered by SAP HANA
Note: SAP strongly recommends against using embedded SAP BW for EDW use cases
Comparison: Standalone BW (BW/4HANA) Vs. S/4HANA Embedded Analytics
S/4HANA Integration with BW and BW/4HANA:
Virtual data integration:
SAP BW can leverage content built using CDS views – most prominently SAP S/4HANA Analytics. There is a dedicated Source System type ODP-CDS in SAP BW (since release 7.4) that allows you to load data from a CDS view into SAP BW.
SAP S/4HANA Analytics content can be virtually consumed and combined with data in SAP BW via open ODS views. In embedded SAP BW area any CDS with analytical annotations are automatically available as BEx query
Extract data from SAP S/4HANA to SAP BW using CDS views via ODP source system type
SAP BW Consuming CDS Views
- Consuming via RSRT transaction (via Transient Query View)
SAP Fiori Consuming CDS Views
From the Fiori User Interface (UI), CDS views can be accessed in the below ways:
- Query Browser in Fiori Launchpad: Query Browser tile, which displays the available CDS views. The CDS view output can be accessed through “Open in Design Studio”.
- Multidimensional Reports: Based on Web Dynpro grid application that we have as a template. It renders all sorts of analytical CDS queries. All queries can be rendered in the same way. Functionality is the same for analytical reports.
SAP BI Suite Integrating and Consuming CDS Views
- Every component of the SAP BI suite can consume the CDS views
- SAP also delivers pre-built reports and contents built in SAP BI client tools such as WebI, Crystal Reports and Design Studio that can be leveraged and extended based on business use cases
- SAP BI apps can be published as tiles in the SAP Fiori front-end of S/4HANA
SAP BI Suite Integrating and Consuming CDS Views – Advanced Analysis for MS Excel
SAP BI Suite Integrating and Consuming CDS Views – Design Studio
SAP BI Suite Integrating and Consuming CDS Views – SAP Lumira
Summary & Conclusion:
- SAP S/4HANA embedded analytics is the collection of all analytics features in S/4HANA that enables operational reporting on live transactional data
- Standard Core Data Services (CDS) views are pre-delivered by SAP
- You can create new views and/or enhance/modify existing views
- Consumption of CDS views is controlled using “annotations” and there are analytics specific annotations
- Analytics developers will need to up-skill to understand these annotations, and how CDS views can be created, modified, and enhanced
- CDS views are used in ABAP programs as well as for analytical processing
- There are specific annotations to enable this
- S/4HANA embedded analytics does not replace the need for an EDW
like SAP BW, but in turn complements it
Some of product Architecture diagram and product definition has been taken from help.sap.com to share the unique information about the product with Consultants/ Readers.
The entire view, expressed in this blog, is based on my personal knowledge at time of writing this blog.