Tuesday, 10 October 2017

ABAP CDS in SAP BW

Introduction


ABAP Core Data Services (CDS) Views were introduced with SAP ABAP 7.40 SP05. CDS allows the creation of rather complex views that by far exceed the capabilities of database views created in SE11. Besides their role in the ABAP Programming Language, CDS Views are the technology behind the virtual data model on top of the SAP S/4HANA application tables which, e.g. is used in SAP S/4HANA Analytics.

ABAP CDS, SAP BW, SAP Tutorial and Material, SAP Guides, SAP Learning, SAP Job

This aspect – the role of CDS in SAP S/4HANA Analytics – frequently brings up the question whether or how CDS might be used in the context of SAP BW powered by SAP HANA or SAP BW/4HANA.

The purpose of this blog is to clarify the role of CDS in SAP BW.


ABAP CDS in SAP BW – the reporting perspective


Since CDS is used to build the Virtual Data Model in SAP S/4HANA, a frequently asked question is, whether CDS Views could also be used to build a virtual layer on top of BW InfoProviders, most prominently Advanced DSOs, which could be consumed in analytic front end tools like in the SAP S/4HANA environment. Or, whether CDS could be used to enhance a SAP BW data model with data from a Z-table. The clear answer to this is – for a number of reasons: No.


The SAP BW data model


Anyone familiar with the way SAP BW generates database tables from its high level (InfoObject based) data model, knows that SAP BW entities typically are split into multiple tables with implicit relationships managed by the BW application. In addition, many of these tables contain technical fields which are of critical importance when writing to or reading from the object. All the logic that is required to correctly interpret these fields and deliver correct and consistent query results, is part of the BW application which creates the correct JOINs and filters at query runtime. All the SAP BW modeling artefacts (e.g. CompositeProviders, Advanced DSOs) are built such that they are aware of all these aspects and relieve the user from a detailed understanding.


The SAP BW security concept


SAP BW secures data from un-authorized access via Analysis Authorizations. This is again a concept specifically designed with the SAP BW data model in mind and it differs significantly from standard filter-based database security concepts. And just as with the data model aspects above, the evaluation and interpretation of Analysis Authorizations is done in the SAP BW application. Therefore, accessing SAP BW data via SQL or OpenSQL (which is the standard way to consume CDS views), would completely bypass the security layers of SAP BW and open the way for un-authorized access, which is prohibitive in pretty much any real world scenario.

Mixed Scenarios


These aspects have since long been the main reasons why SAP does not support direct consumption of SAP BW generated tables. As you may be aware, SAP BW powered by SAP HANA or SAP BW/4HANA provide capabilities addressing specifically this point – opening up SAP BW for SQL consumption. The approach taken here is to generate SAP HANA Calculation Views from the SAP BW data model that incorporate all the dependencies within the data model and the correct interpretation of all the technical fields and creating SAP HANA Analytic Privileges from SAP BW Analysis Authorizations to ensure security.

Conversely, when it comes to integrating non-BW data (e.g. in a Z-table or Z-view) with the SAP BW data model, this is done via Open ODS Views, which – conceptually – put a “SAP BW-shell” around a table or view.

Thus, also in this environment, CDS does not play a role in SAP BW.

SAP BW Technical Content


Tracking and monitoring the operations of a SAP BW system is one of the areas, where CDS in fact is playing a role. For example, SAP BW comes with tables containing statistics on loading and querying data, status information about load requests, etc. With SAP BW 7.5 SP04, CDS based technical content is shipped that provides administrators/modelers with such information. Being built on CDS, this content is much leaner and simpler than traditional SAP BW technical content, does not require loading of the data to a SAP BW InfoProvider, or even activation of SAP BW objects.

Consuming CDS Views in SAP BW


SAP BW can, however, leverage content built using CDS Views – most prominently SAP S/4HANA Analytics. For one, there is a dedicated Source System type ODP-CDS in SAP BW (since release 7.4) that allows to load data from a CDS View into SAP BW. This integration currently does not provide all services known from the classic extractor based data provisioning, but in certain scenarios it can be a valid option. Secondly, SAP S/4HANA Analytics content can be virtually consumed and combined with data in SAP BW via Open ODS Views.

ABAP CDS in SAP BW – the ETL perspective


One specific use case where CDS views can play a role are the SQL expert routines in SAP BW Transformations. To simplify, for example, a complex look-up on customer specific Z-tables in a transformation, it can be very useful to define a CDS view on top of these tables and use that CDS view within the SQL export routine.
SAP Online Guides, Tutorials, Materials and Certifications.

Related Posts

5 comments:

  1. Looking for the best SAP ABAP Training in Bangalore, then don't delay join IntelliMindz SAP ABAP Training in Bangalore. Join our SAP ABAP training to get hands-on training and practice in SAP ABAP Software. Any Queries call @ 9655877677. IntelliMindz is the best IT Training Institute in Bangalore with placement, offering 200 and more software courses with 100% Placement Assistance.
    SAP ABAP Course in Bangalore
    SAP ABAP Course in Chennai
    SAP ABAP Online Course

    ReplyDelete
  2. Bajaj finance card benefits online apply Check this out now click here Bajaj Finance Card Benefits

    ReplyDelete