SAP HANA Live for S/4 HANA Basic How-To SAP HANA Live Browser HANA Modeling Enhancement and SAP HANA Live Extension Assistant Authorization and SAP HANA Live Authorization Assistant
ABAP CDS for S/4 HANA (aka S/4 HANA Analytics) S/4 HANA Analytics Overview ABAP for HANA Development Intro ABAP CDS View ABAP CDS View Authorization Other ABAP for HANA development sub-topics
HANA In-memory columnar store Faster OLTP + OLAP processing on single copy of data ACID compliant High speed transactions support Aggregations on fly No indexes for fast access Process compressed data Optimized for multi-core parallel processing Single Instruction, Multiple Data (SIMD) processing support NUMA optimization to enable future support for very large (12TB+) nodes (CPU/Memory)
HANA Columnar store to process transactions and queries OLTP+OLAP on single copy of data Delta storage is optimized for transactions Delta storage is merged periodically with main storage No data duplication – data kept either in delta storage or in main storage
Enabling contextual Business Insight with SAP Fiori: § § §
New working models combine different app types and demonstrate the value of SAP Business Suite 4 SAP HANA Combining real-time insights with analytics and transactional follow-up activities to allow better and faster decisions as well as instant execution Scenario specific content (KPI-definition, roles, ..) and drill-down applications/reports. All KPIs are based on the same KPI repository and services
Performance-driven Working Model
Fiori Launchpad
Smart Business Drill-Down
Analysis Path Framework
Analysis in SAP BI
SAP S/4HANA standard analysis
Analyze in SAP BI
and
Collaborate
SAP Smart Business executive edition*
Situation-driven Working Model HANA Search, C‘est Bon, Fact Sheet
Supplier Overview for Material 515 Current month Supplier
Personalize
Delivery Performance
3
Trading Volume Last Year
100
98%
550 K€
101
95%
1.230 K€
102
94%
270 K€
16
SAP Smart Business Cockpits § Real-time
insight to action combining pre-defined and responsive analytics and transactional followup activities to allow better and faster decisions § Addressing managers and key roles in an organization § One company wide KPI repository to allow simple definition of KPIs, evaluations and thresholds § Based on SAP Virtual Data Models § Accessible from the Fiori Launchpad
Business Intelligence Help organizations make better decisions Enterprise business intelligence Empower business users across the entire organization with anytime, anywhere access to key insights delivered in context
Data discovery and visualization Help business people, with various skill levels, to better understand data and use it to inspire their audience
Trusted data discovery Deliver agility to business analysts and instant insight to decision makers alongside scale and trust to IT and management
Typical results
13x
ROI Through investment in analytics1
In 75% Reduction customer churn rate 2 1. “2014 Analytics Market Survey,” Nucleus Research. 2. SA Health business transformation study.
HANA Native Capability Boosting Analytics: Spatial Processing New insights from enriching business data with spatial data Store and process spatial data with other data types No need to create spatial indexes, tessellation, etc. Spatial data types – Points, lines, polygons – Multi-dimensional support including 3D and measurement dimension Spatial functions – Area, distance, within, touches, intersects, adjacent Built in geo-content – Maps, political boundaries, roads, Point of Interests (POI) Spatial join operators for SQL and Calculation Views – Contains, crosses, intersects, overlaps, touches, within – Automatically add latitude and longitude to address
SAP HANA Platform Spatial Engine Spatial Data Types Spatial Functions Geocoding Maps & POI
HANA Native Capability Boosting Analytics: Predictive Analytics Transforming the future with today’s insights 65+ prepackaged predictive algorithms – Supports association, clustering, classification, regression, time series etc. AFM graphical modeling tool support to develop predictive applications using PAL and R-Script SAP Predictive Analytics leverage Automated Predictive Libraries (APL) libraries and PAL SAS processing run natively in SAP HANA eliminating date redundancy Leverage R advanced functions transparently
SAP HANA Studio / Web IDE
SAP Predictive Analytics
Application Function Modeler (AFM)
Tools & Application s
SAP HANA Platform Predictive Analysis Libraries (PAL)
HANA Native Capability Boosting Analytics: Search, Text Analytics and Mining Insights from unstructured data Store text and binary files in SAP HANA for native text analysis and search Support various file formats (txt, html, xml, pdf, doc, ppt, xls, rtf, msg) Automatically detects 31 languages Search – Fuzzy, linguistic, synonymous search, using SQL
SAP HANA Platform Search Engine Text Analytics
Linguistic Processing Entity, Fact Extraction
Text Analytics – Extract relevant information from text (Linguistic Markup, Entity, Sentiment Extraction)
Text Mining
Text Mining – Rank and Categorize documents by comparing with a set of pre-classified documents
All Applications Best integration to SAP S/4HANA S/4 KPI monitoring with SAP Smart Business, executive edition Integrate with Fiori Launchpad and Smart Business cockpits Native data access to S/4 Virtual Data Model and SAP BW
Agnostic platform Integrate with all business applications – SAP and non-SAP Optimized access all sources – relational, OLAP, and big data Real-time predictive insights built in SAP HANA
Understand the past, predict the future and drive execution
Monitor, simulate and drive change in real-time
29
SAP HANA Live for S/4 HANA Overview
HANA Live Fundamentals What is HANA Live? Foundation for operational reporting based on SAP HANA Operational reporting on SAP HANA means Live reporting on operations of any SAP Business Suite System within customers landscape*
What does HANA Live include? SAP Virtual Data Model (VDM) Delivery of Application Logic based on standard SAP Business Suite tables optimized for reporting in SAP HANA. Direct (read) access on Business Suite tables for Live reporting Provides direct access to SAP business data using standard SQL or OData requests.
Business relevant reporting scenarios based on the VDM optimized within HANA Analytic views. * A Minimum Release is required, please see HANA Live Master Guide
SAP HANA Live architecture Foundation for new class of applications SAP HANA Live defines access to application data and exposes a data model that is easy to understand and tailored to analytical uses cases. The data model of SAP’s Business Suite - generally optimized for data throughput and best performance in transactional scenarios – has been adapted for HANA Analytics to support easy consumption based on operations provided by the HANA database. This adaptation of the data model has been achieved by the definition of a layered set of database views, which is referred to as virtual data model or VDM in this context. The top layer of the VDM provides customers and partners with views that they can consume easily using various tools (e.g. BOBJ tools) and technologies (e.g. HTML5).
SAP HANA Live Example of Virtual Data Model: IncompleteDelivDocumentQuery 1. Exclusive use of SAP HANA Studio modeler for creation of the calculation views 2. Use Joins to consume reuse views 3. Use of calculated attributes 4. Implemented in Graphical calculation views
Time-to-Value: Steps to be taken to be up an running Experience at customers and from internal tests:
4. Start Reporting!
Steps 1-4 take usually 2-4 hours (more in case of a side-by-side scenario for initial data load) 3. Activate Hana Live Views and set up users 2. Deploy on the S/4 HANA hdb server 1. Download respective packages from the Service Marketplace
SAP HANA Live Content creation/Production Rules 1. SAP Standard Content for the Virtual Data Model are developed in a sub-package under sap.hba.) 2. Virtual Data Model content for ERP EhP0 are developed in sap.hba.ecc and based on ERP 6.0 EhP0 SP12, other component contents are at the same package level, e.g. the package of Simple Finance is under sap.hba.sfin700. 3. HANA-based Analytics HANA content doesn’t depend on any enhancements/corrections to the ABAP backend systems. 4. HTML5-based UI applications are developed in a sub-package under sap.hba.apps, which contains application-specific views, OData services and HTML5 artefacts for this application 5. Content, which is not intended for general reuse by customers like VDM content, but which might be shared between several HTML5 applications or which is the basis for KPI definitions, are built in a sub-package under sap.hba.r. Subpackages under sap.hba.r are based on VDM packages and can also contain OData services and KPI definitions. 6. Content (e.g. for rapid prototyping, private experiments etc.) shall be created in a sub-package under tmp.
HANA Live Browser The HANA Browser application which accompanies SAP HANA Live for SAP Business Suite is available as an option for business users who want to interact with HANA content views using an internet web browser instead of using the SAP HANA Studio. § Enable
search, browse, tag and consume HANA analytical content views, or preview data.
§ Display
a cross-reference of all the views and tables related to the selected view.
§ Easily
launch reports in Microsoft Excel based on the selected view.
HANA Live Browser - Installation Download the SAP HANA Live Browser application from SAP Solution Manager or directly from SAP Service Marketplace at https://service.sap.com/swdc . All SAP HANA Live tools can be found under SAP HANA CONTENT TOOLS 1.0, incl. help documents.
Import Delivery Unit (or install *.zip via hdbalm) Import package HCO_HBA_AF_EXPLORER.tgz using either SAP HANA Studio Content Import or using the REGI IMPORT command from the SAP HANA client.
HANA Live Browser - Installation Note 1914584 - SAP HANA Live Browser FAQ
Assign roles Once the import is done, two roles are created automatically in the system Assign the role sap.hba.explorer.roles::Business to users who will work with only a few Views which are added to their favorites Assign the role sap.hba.explorer.roles::Developer to users who will use the application with full privileges e.g. call "_SYS_REPO"."GRANT_ACTIVATED_ROLE"('sap.hba.explorer.roles::Developer','SYSTEM');
Access the SAP HANA Live Browser The user with the previlege can access the application using the following URL: http://:80/sap/hba/explorer/index.html
SAP HANA Live for S/4 HANA HANA Modeling Enhancement and SAP HANA Live Extension Assistant
The 3 SAP HANA Modeling Views in a Nutshell SAP HANA Engines Overview •
•
•
Attribute View: Gives context to, and selects subset of columns and rows from data tables. Used for all type of joins. In most cases used to model master data like entities (like Product, Location, Business Partner) Analytic View: Used for calculation and aggregation (star-schema-like). Adds transactional tables and measures (key figures), calculates aggregates (e.g. No. of Products sold per year), joins Attribute Views. It is defined at least on one fact table. In most cases used for exposing transactional data by joining the fact table with Attribute Views. Calculation View: Performs complex calculations not possible with other views and uses SQLScript. It can be defined as graphical view (modeled with SAP HANA Information Modeler) or scripted view (SQLScript procedures). Analytic
SAP HANA Live Modifying SAP HANA Live Models -Recommendations §
§
§
§
Changing Private, Re-Use and Query Views is not recommended Changes will be lost when a new release is installed When you install the new content, it will not prompt you to use your content or the new standard version The customer is encouraged to copy Query Views and use Re-Use Views in developing their own content, preferably with a separate naming convention
SAP HANA Live Technical View Types in SAP HANA Live Technical View Types HANA currently offers 3 types of views: attribute views, analytical views and calculation views. Calculation views again have two flavors: They can be modeled graphically or script-based. Our mid-term vision is to have only one view type which combines all flavors of the current triple. Calculation views currently offer the broadest feature set and are most likely to evolve into the future single view type. Therefore for HANA-based Analytics the following rule holds: Dos For HANA-based Analytics at Business Suite graphical calculation views shall be used as the preferred view type. If required features are not yet available in graphical calculation views, script-based calculation views may be used instead. Please inform SAP, which features are missing in the graphical calculation view. Don’ts/Avoid using attribute views and analytical views unless technical features are needed which are only provided by these view types. Inform SAP, which features are missing in the graphical calculation view.
Locate the required standard SAP HANA Live query view
2.
Copy the entire SAP HANA Live model*
3.
At the lowest level of the model identify the table field and add it as an output column
4.
Modify the column name if required in the semantic node
5.
Modify all higher levels in the model to include the new attribute(s)
6.
Validate, Save and Activate all the changed models
7.
Use Data Preview to confirm attributes are now exposed
8.
Build reports / applications on the new model
* You may not need to copy the entire model if the fields are actually included at the lower levels but are then missing from higher levels, simply copy the levels you need to modify and then consume the standard unchanged levels into your model.
SAP HANA Live Combining Custom tables and Views -Motivation
§
Purpose: You want to create your own custom Calculation View that consumes multiple predelivered HANA Live models and combines these with your own custom table
§
Background: The customer has created one customer specific table with the classification of countries into their potential for future sales (the values are saturated or emerging).
§
This classification table is updated regularly by marketing / sales and replicated to HANA in realtime
SAP HANA Live Combining Custom tables and Views –used Reuse views
§
From SAP HANA Studio: 1. Create/Find the Z-(customer) table from the related schema and (pre)view data in the table for verification 2. Do not use SAP standard schema for z-tables not part of ABAP DDIC , instead use a different custom schema, e.g. Zxxxx 3. Create a calculation view(subtype Graphical) in the Zxxxx schema, CV_CustomCurrentSalesLoc - Add the SAP HANA Live standard views „SalesOrderHeader“ and „CustomerBasicDataQuery“ and Z-table - Add two Joins
Identify the required standard SAP HANA re-use view(s) from the required SAP HANA Live model
2.
Create a new calculation view that consumes the standard re-use view(s) and the custom table(s) and/or view(s)
3.
Use either joins and/or unions to develop the combining logic*
4.
Add required columns to the output in the semantic node**
5.
Validate, Save and Activate the new model
6.
Use Data Preview to confirm combination logic is working
7.
Develop reports/applications on the new model
* You may also need to use projection nodes to develop calculated attributes in order to harmonize the columns before the join / union can take place. ** For OLAP models also work on the aggregation logic before the final output.
Hierarchy Definition: Level-Based / Parent-Child Relationship HANA supports 2 kinds of hierarchy definitions: Parent-Child-Relationship and Level-Based Hierarchy. The Level-Based Hierarchy definition is using different fields of a table representing different levels of a hierarchy. The Parent-Child-Relationship stores only the relationship between parent and child nodes in the hierarchy. Level-Based Hierarchy
Overview - SAP HANA Live Extension Assistant To extend HANA Live Views we generally make a copy of it and then make changes to it as per our needs. You can check the document given in the blog mentioned above on how to extend HANA Live Views. Now SAP has created a new tool called SAP HANA Live Extension Assistant. Using this tool we can easily extend Reuse Views and Query Views.
Installation - SAP HANA Live Extension Assistant First download HANA Content Tools from Service Marketplace and then import Delivery Unit HCO_HBA_T_EXTN.tgz It also generates a role sap.hba.tools.extn.roles::ExtensibilityDeveloper and we will need to assign this role to the User to work with this tool. Now to complete the installation, Go to Help -> Install New Software and click on Add button and enter the details as shown below. The path would be http://hostname:80[instancenumber]/sap/hba/tools/extn
Extend View - SAP HANA Live Extension Assistant Once this tool is installed, and we R-Click on any View, we can see the option Extend View. This option is enabled only for HANA Live Reuse and Query Views and disabled for Private Views as shown left.
Extend Reuse View - SAP HANA Live Extension Assistant It will create a new View with the same name as the Reuse View Here we will select the package where we want Extended View to be created. All the fields that are present in the Reuse View are marked as Grey and we cannot change them On the left side, we get list of all the tables that are used in the View. These tables only show those fields that are not used in the View.
Extend Reuse View - SAP HANA Live Extension Assistant We can select any field from the table and add it, lets say we want to select SAKAN field from the table, so we will click on SAKAN field and then Click on the + button on right side of the screen, this will add it to our view.
Extend Reuse View - SAP HANA Live Extension Assistant Then we will select Next... by default the Join type is Left Outer Join and we cannot change it but we can change the Cardinality of the View.
Extend Reuse View - SAP HANA Live Extension Assistant On the right side, it shows fields for Join. As the table SKA1 is already used in this View, so it proposes fields for Join, we can either use these fields or add our own fields by selecting + button as shown below.
Summarization - SAP HANA Live Extension Assistant Benefits: Simply and easily to extend an existing Query or Reuse View if we just want to add additional Columns from the underlying Tables the View is already using. If we update HANA Live Views later on then out Extended View also get updated. Limitations: We cannot extend Query Views with Unions and we can also not directly extend Query Views in which Aggregation Node is present at levels other than Top Node(Node before Semantic Node). At present we can not add fields from other Tables(Tables that are not used in a View) to an existing Reuse View.
SAP HANA Live for S/4 HANA Authorization and SAP HANA Live Authorization Assistant
SAP HANA Live Authorization § HANA Authorization Concept § Overview of Use Cases § Description of HANA Authorization concept § Consequence on SAP HANA Live content Modeling
Process authorization within HANA using privileges
Insight to action: Trigger from reporting application Business Suite capabilities, e.g. display of sales order items or call BAPIs Ø
Access with named user. To access transactional data the named user shall have the same authorizations as in ERP.
Ø
If for write/read access of transactional data existing Suite reports/Uis/BAPIs are used authorization would be processed within ERP (no additional effort regarding auth.).
93
Access Control on Data inside HANA DBMS
Access (SELECT) to a specific table or view is restricted by SQL SELECT Object Privilege.
Access to a specific column can be restricted by creating a view with a subset of columns and granting the SELECT privilege only on this view.
Access to specific rows are restricted by Analytic Privileges.
Start Authorization for Calculation Views Access to an activated calculation view is controlled by SQL SELECT object privilege for the generated catalog object.
Row-based Authorizations for Calculation Views Read access to certain data is restricted by Analytic Privileges (AP) filtering the attribute values (like a SQL WHERE clause). If no relevant AP for a view can be found for a user, access is rejected with a Not authorized error (despite the SELECT privilege on the view). Evaluation of Analytic Privileges 1.
Restrictions for different attributes in one AP are combined with AND AP: (A=‘a’ AND B=‘b’)
2.
Restriction for the same attribute in one AP are combined with OR AP: ((A=‘a’) OR (A=‘abc’))
3.
Different Analytical Privileges are combined with OR AP1: (A=‘a’ AND B=‘b’) OR AP2: (A=‘abc’ AND C=‘c’)
HANA Authorization Concept for Nested Calculation Views
Analytic Privileges • Views can be explicitly registered for or excluded from Analytic
Not authorized! Not authorized!
Privilege check.
• Access to the top view of a hierarchy of calculation views is only View 1
ü
possible if the user was granted Analytic Privileges for all views registered for Analytic Privilege check.
View 6
View 4
ü
ü Not authorized!
View 2
View 5
à HANA Live authorization concept requires to register only query views for AP check and to exclude all non-query views from AP check with the advantages:
View 7
à Customer has to maintain instance based access
ü
ü
restrictions exclusively on the query views intended for direct user access.
à FULL Analytic Privileges not longer required for any underling view of a query view.
Basic principles Control access to query views by SQL SELECT Object Privilege. Define row based access restrictions by Analytic Privileges exclusively on query view level. All underlying non-query views of a query view are explicitly excluded from Analytic Privilege check. Never grant SQL SELECT Object Privilege on none-query views (reuse view or private view) to a business user. Never grant SQL SELECT Object Privilege for table to a business user directly. Reference in an Analytic Privilege for a query view only one model.
Consequences for Content Modeling Allowed Dependencies Only query views are designed for direct consumption. A query view must not be consumed by another view. It is always the top view in a hierarchy of views. (HTML5) Application
How to Activate for a Query View the Analytic Privilege Check Select for all query views in the properties of the Semantics node in the drop down list box ‘Apply Privileges’ the value ‘Analytic Privilege’.
Prerequisite: HANA Studio version : 1.0.70 - Build id: 20131112183658 or later
How to Exclude a None-Query View from Analytic Privilege Check Select for all none-query views (Category Reuse or Private) in the properties of the Semantics node in the drop down list box ‘Apply Privileges’ the empty value.
Prerequisite: HANA Studio version : 1.0.70 - Build id: 20131112183658 or later
Why not to grant SQL privileges for activated objects with SQL GRANT statement? Privileges that were granted with GRANT statement by a user are revoked when that user is dropped or loses the privilege that was granted. GRANT SELECT ON "_SYS_BIC"."tmp.d035508/GC_USRBF2_AP" TO "D035508B";
D035508 SELECT*
D035508B SELECT
DROP USER "D035508" CASCADE;
D035508 SELECT*
D035508B SELECT
Imagine D035508 is the user administrator of the HANA system.
Privilege Management for Activated Objects on HANA Technical user _SYS_REPO will only be used to grant privileges on activated objects. All other users grant privileges on behalf of _SYS_REPO by calling stored procedures created by _SYS_REPO with security mode “definer” (code based authorization). CALL GRANT_PRIVILEGE_ON_ACTIVATED_CONTENT('SELECT', '"_SYS_BIC"."tmp.dxxxxx/GC_USRBF2_AP"', 'DxxxxxB'); Graphical User Editor in HANA Studio also calls these stored procedures automatically.
In SAP ECC, security is very tightly defined at the application layer. The SAP ECC does not define security at the database table level; therefore there are no restrictions when querying these core tables directly. The HANA LIVES views consume core SAP ECC tables, and therefore doesn’t inherit SAP ECC security. Analytical Authorization Assistant (AAA) tool is provided to implement SAP ECC security on the HANA Live views.
Overview - SAP HANA Live Authorization Assistant The complete process of selective data access includes the assignment of analytic privileges and the SQL privilege for a query view to a role and the assignment of the role to users:
Create Analytic Privileges via this assistant
Assign Analytic Privileges and SQL Privileges (for a query view) to a role
This can be accomplished via the standard functions in this tool.
Then the users can access the authorized data using the query views.
107
Installation - SAP HANA Live Authorization Assistant To process the installation, Go to Help -> Install New Software and click on Add button and enter the details as shown below. The path would be http://hostname:80[instancenumber]/sap/hba/tools/auth
Generate Analytical Privilege Analytical privileges on Query views can be done in two ways. a) If you are using ABAP user security: Analytics Authorization Assistant (AAA) shall decrease overall TCO for authorization maintenance b) If you are using None ABAP users: regular users who will be consuming these views from reporting tools and don’t have a ABAP user ids, need to create Analytical Privileges in a regular way. This will give you flexibility of the naming of APs and create a custom restriction. You will follow similar process to create APs on Non-Query views as on Query views if needed. NOTE: When Granting Access on Query Views to Non-ABAP Users Grant on Individual Query Views Only.
Implementation - SAP HANA Live Authorization Assistant Here is the window when starting: Specify package to store analytic privileges, and select the query views on which the analytic privileges to be created.
Implementation - SAP HANA Live Authorization Assistant If you select the ABAP user, a summary of the generated/updated analytic privileges for the selected ABAP user displays. If the HANA role does not exist, a role in the format ROLE_ is created and the generated analytic privileges are assigned to the role. If the HANA role already exists, it is updated with the newly generated analytic privilege. Similarly while selecting the ABAP role.
Implementation - SAP HANA Live Authorization Assistant The picture below is the example result role (runtime role):
At last, we get one role for the selected query views, incl. their related value help views. The role can be assigned to HANA users or other roles for authoring.
Implementation - SAP HANA Live Authorization Assistant Use Update Analytical Privilege option when any changes happen in ECC and you want to reflect in HANA. The update analytic privilege tool identifies the changes in the ABAP authorizations and new restrictions are created when you run the tool. The valid analytic privileges are retained in the role and newly created analytic privileges are added. If the analytic privilege is not valid, it is removed from the role and if analytic privilege is not assigned to any role, it is deleted.
Summarization - SAP HANA Live Authorization Assistant Reduced Manual Effort You can select multiple query views for multiple users and create analytic privileges for all the query views. You do not need to manually check for privileges in the SAP ABAP system and manually create privileges for each query view. Hence, the mass process available with this tool reduces the effort required to create analytic privileges for query views. The existing analytic privileges can be reused between different users. Semi-Automated Generation After you select a single or multiple query views for the generation of the analytic privilege, the SAP HANA Live Authorization Assistant automatically transforms the users’ ABAP authorizations to HANA analytic privileges.
Appendix •Note 1799254 – Schema mapping for HANA based Analytics •Note 1782065 – Tables for SAP HANA Analytics for SAP Business Suite •Note 1914584 – SAP HANA Live Browser FAQ •Note 1800631 – SAP HANA: Limitations for HANA-based Analytics •Note 1778607 – SAP HANA Analytics Framework for SAP Business Suite •Note 1799010 – Tag View for SAP HANA Analytics Foundation Browser •Note 1796718 – Analytics Authorization Assistant •Note 2045570 – SAP HANA Live Authorization Assistant Migration tool •Note 1976487 – Information about adjusting customer-specific programs to the simplified data model in SAP Simple Finance http://help.sap.com/hba http://help.sap.com/sfin http://www.saphana.com (search for “HANA Live”)
ABAP CDS for S/4 HANA aka S/4 HANA Analytics Overview
SAP S/4HANA Real-Time Analytics Architecture No latency • No data duplication • Ready-to-use content • Integration scenarios with SAP BW •
SAP S/4HANA Application Hybrid Transactional and Analytical Applications
Analytical Apps and BI Clients e.g. SAP BusinessObjects BI
e.g. SAP Smart Business cockpits
Full ABAP Lifecycle Integration • Supporting ERP authorizations • Supporting ERP hierarchies • Part of the general Extensibility concept • Supporting more business cases (analytics, search, fact sheets, planning,…) •
Avoid Redundancy Non disruptive with equally named views for previous total/index tables FAGLBSIS, FAGLBSAS
Index Tables BSXX (6)
Legacy Data
Equally Named Views
Document Header + Line Items
GLT0, KNC1 KNC3, LFC1 LFC3
FAGLFLEXT
Classic GL + OPS Delta (3)
NewGL Delta
NewGL Index Views (2)
Classic GL + OPS Index Views (7)
Classic GL + OPS Totals (5)
NewGL Totals View
BSEG_ADD
BKPF
BSEG
FAGLFLEXA
Doc Header + Line Items
• • •
BKPF, BSEG/BSEG_ADD and FAGLFLEXA unchanged Index and totals tables replaced by compatibility views (aka equally named views) Enable a smooth transition to the new data model in the standard as well as in the partner and customer coding.
SAP NetWeaver Application Server for ABAP 7.5 One common foundation for SAP Business Suite and SAP S/4HANA on premise
Some facts about the AS ABAP 7.5 • Compatible successor of AS ABAP 7.4 • Runs on innovation kernel 7.45 • Unicode systems support only • Supports SAP HANA and classical databases
Innovation without disruption • Big Data, SAP HANA, real-time simplified, SAP Fiori and Cloud • Common programming model for transactional and analytical apps
ABAP CDS for S/4 HANA aka S/4 HANA Analytics ABAP CDS View
Core Data Services (CDS) Infrastructure for defining and consuming semantically rich data models. CDS extends SQL to capture the business intent avoiding complex and error prone statements supporting a database / HANA optimized programming model. It is SQL based §
Close to database offering/exploiting DB capabilities (in particular HANA) and enabling well-performing built-in/out of the box analytical and search capabilities
§
SQL language is well-known outside of SAP, too, supporting partner & customer development
§
Makes semantic relations between entities become transparent and executable as modelled associations, which are easy to consume
serves as central source and/or anchor for metadata §
Enables rich data modeling for example supporting defining (Fiori) user interfaces (e.g. labels, value help, currency, quantity, identification fields, measures, default aggregation, validity dates, navigation)
§
Semantical properties are inherited to consuming views, also to customer extensions
§
Enables metadata reuse accross frameworks/engines
is supported by ABAP (Open SQL/AnyDB) and HANA is supported by generic frameworks/engines (Draft, SADL, Analytical Engine, ...)
Advanced view definition with Core Data Services (CDS) Integration into ABAP
Definition of semantically rich data models by means of ‘view entities’ in ABAP DDL Source Objects (R3TR DDL) Code pushdown support through extended view functionality Enhanced access functions in comparison to Open SQL: e.g. unions and associations
ABAP CDS (Views) Why/When you should use it Benefits based on „ABAP-managed“ approach: • Leverage DDIC Semantics (à DDIC Type system) • ABAP Infrastructure (=DBI) ensures “Open SQL”-Behavior/ AnyDB-Support • E2E Extensibility (across Tables & Views, across DB- and other ABAP artifacts) • Consistent LM (Software Logistics, Where-used, …) with all other ABAP artifacts •
Support of ZDM
Further reasons: • functional gaps in HANA CDS (e.g. scope of current annotations, no Analytic Engine) • common user/role/authorization management in ABAP • usage of ABAP CDS in non-analytical ABAP-based scenarios (OData services SEGW integration, draft handling)
Core Data Services – A Family of Domain Specific Languages (DSLs)
Core Data Services
DDL
QL
DML
DCL
DDL – define data models DCL– control access to data (used for DDLs of type (#DIMENSION, #FACT, #CUBE or those being published for direct OData consumption)
Data Definition Language (DDL) CDS DDL = SQL DDL + … Entities with structured and custom-defined types Associations i.e. captured relationships Annotations to extend the meta models Calculated Fields pre-defined in data models
CDS Annotations Metadata for different domains enable reuse of CDS Views The CDS Core Model can easily be reused also for other domains (e.g. UI, OData, Search, Planning, etc.) Specialized metadata for these other domains can be added via annotations without impacting/changing the underlying core model. CDS view example @EndUserText.label: 'Financial Statement sFIN' @Analytics: { dataCategory: #FACT } define view WSFinancialStatementQuery as select from WSFinancialStatement { key ChartOfAccounts, key GLAccount, …, @Semantics.currencyCode: true key CompanyCodeCurrency, @Semantics.amount.currencyCode: 'CompanyCodeCurrency' @DefaultAggregation: #SUM @EndUserText.label: 'Amount In Company Code Currency' AmountInCompanyCodeCurrency, … }