What is a CDS view
Core Data services are new next-generation modeling object from SAP. In short words, it will be the one-stop place for all the modeling with embedding DDL (Definition), QL (Query) and DCL (Control). It works with Code push down approach with database doing the heavy lift.
You can find more about CDS in below SAP link. CDFS has two flavors. 1) ABAP CDS which behave as full ABAP native object defined in ADT. 2) HANA CDSW which is more native to Hana database modeling.
More about CDS concepts -
*Below blog is intended for ABAP CDS modelling
CDS view types
We have three main types of CDS View (Few others for Extensions)
Basic view – First level of CDS virtual model which is mostly one on one replication of database table. Basic views can be Dimension type or Fact type. The basic view will be mostly private and avoid user consumption for BI
Composite view - Composite view have joins/associations between Fact and Dimension basic views. Composite views are like cubes. we can define aggregation types and calculations in Composite view
Consumption view – Query views on top of composite view with all the end user semantics and can be consumed in any BI tool including Firoi apps
Setting up Eclipse and ADT
Step 1 – Login to Eclipse and start ABAP Prospective
Step 2 – Create a new ABAP project for the desired backend system
Step 3 – Add the package where the objects will be stored as a favorite so it can be easily accessible
Creating a Basic view on ACDOCA table
Navigate to Core data services under the above added package.
Step 1 – select new from the context menu on core data services and give a relevant name as per naming standards
If the change management is turned on, it will prompt to select a transport. After selecting the transport request, a pop-up with predefined templates are available to kick-start, select “Define view”
Click finish. The template will come up with standard annotations and please update the code with relevant names and add table fields names.
Key annotations :
Validate the code and activate.
Check data preview.
Creating a Composite view
Composite views are intermediate views where typically all the semantics and calculations are done.
Step 1 – Create a new CDS view same as basic view ( ABAP annotations will define the view type)
(Optional = select annotation type template for predefined code skeleton)
Below is the Composite view definition with Associations and data category is Cube. Data extraction annotation will also adds extends CDS view as an extractor in ODP
Finally, create a Consumption view/ Query. Below annotation will create Odata and Transient Bex for BI consumption.
Key annotations :
@odata.publish: True – creates a OData service for UI / Fiori consumption
@analytics.query: True – Creates a Transient Bex for BI consumption
Once the consumption view with analytics query annotation is activated we can check the transient query in RSRT T code
Bex query naming: 2C
Consuming in Fiori Query Browser App
Navigate to SAP Gateway system and activate the OData services for the above CDS View
Login to Fiori Launchpad
Pre reqs – Query Browser app and Security setup is done
Consuming from Analytics – Cloud
Create a Live/Import connection ( You can use the existing one if you want)
Create a Model and consume the Transient Query (2C)
Planning models can be created on Transient Bex planning queries with required Annotations.
Please reach out to us, Let Tek -Analytics take care of S4 Analytics strategic planning and development for you :)
- Karthik Addula
Last week we successfully configured analytics cloud with on-premise sap application for one of our customers. Below is the detailed architecture over over-view of the integration
S4 1610 Fp02 On-premises, BOBJ 4.2, BW4 and HANA 2.0. All the applications are running on amazon virtual private cloud.
SAP Analytics cloud connection type
Import Connection – Requires SAP Cloud connector, the data connection is not live, cannot be useful for live stream data
Direct – Using the standard INA services in an SAP application, Analytics cloud will directly connect to source systems. Requires to open up the ports to cloud
Reverse Proxy – making use of a web server paths in a DMZ layer, Live data connections can be created. We used Apache as a web-server for this setup
Live Data connection using the reverse proxy
High-level configuration steps
*Additional installation and config is required for tomcat
**SAML SSO is supported