ZS4HCDS Complete PDF [PDF]

  • 0 0 0
  • Gefällt Ihnen dieses papier und der download? Sie können Ihre eigene PDF-Datei in wenigen Minuten kostenlos online veröffentlichen! Anmelden
Datei wird geladen, bitte warten...
Zitiervorschau

ZS4HCDS S/4HANA Development Fundamentals SAP Development University November, 2016

Internal

Welcome And Introduction

Welcome to the S/4HANA Development Fundamentals Classroom, , 09:00 – 17:00 CET Your instructor:

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

2

Overview – S/4HANA Development Fundamentals Day 1 Unit 1

Introduction – Technical Concepts, ADT

Exercise 01

Exercise 02

Unit 2

Introduction to Core Data Services

Exercise 03

Exercise 04

Exercise 05

Exercise 06

Exercise 07

Exercise 09

Exercise 10

Exercise 11

Exercise 12

Exercise 13

Lunch Break Unit 3

Core Data Services: SQL Features

Exercise 08

Day 2 Unit 4

Advanced Concepts in CDS Lunch Break

Unit 5

New Features in Open SQL

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

3

Overview – S/4HANA Development Fundamentals Day 3 Unit 6

Virtual Data Model (VDM)

Exercise 14

Lunch Break Unit 7

HANA Native Code Push Down

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Exercise 15

Exercise 16

Exercise 17

Internal

4

Appendix – S/4HANA Development Fundamentals Appendix Lessons and Exercises A1

Helpful ABAP Language Enhancements

Exercise 18

A2

Introduction to SAP HANA Studio

Exercise A2

A3

Guided Performance Analysis

Exercise 19

A4

VDM Analytical Perspective

A5

CDS Unit Testing

A6

Fiori Programming Model

A7

Miscellaneous

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Exercise 20

Internal

5

Unit 1 – Introduction

Unit 1 – Introduction Lesson 1 – SAP HANA Basics and Technical Concepts

What Made SAP HANA Possible?

HW Technology Innovations

SAP SW Technology Innovations

Multi-Core Architecture (8 CPU x 10 Cores per blade)

Row and Column Store

Massive parallel scaling with many blades

Compression Partitioning

64bit address space – 4 TB in current servers Dramatic decline in price/performance

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

No Aggregate Tables + + ++

Insert Only on Delta

Internal

10

Innovations Shift Bottlenecks Past: Data transfer via network

Now: Application Server

Still to be considered: Data transfer via network

CPU Core CPU Cache CPU waiting for data to be loaded from memory into cache

Performance bottleneck in the past: Disk I/O

Main Memory Disk

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

11

New Bottlenecks Become Important – How To Avoid Them? Two Challenges 1. Optimize loading data into the CPU cache  Introduce columnar data storage  Use compression for database tables

2. Avoid CPU idle time – make use of parallelism  Process one request on several cores in parallel  Distribute table contents across blades (partitioning)

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

12

Row Store Data in table … Order Country Product 456 France corn 457 Italy wheat 458 Italy corn 459 Spain rice

… organized in rows Sales 1000 900 600 800

SELECT SINGLE * … WHERE ORDER = 457 Works fine in row store

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

456

France

corn

1000

457

Italy

wheat

900

458

Italy

corn

600

459

Spain

rice

800

SELECT SUM(Sales) … Row store not optimal

Internal

13

Column Store Data in table … Order Country Product 456 France corn 457 Italy wheat 458 Italy corn 459 Spain rice

… organized in columns Sales 1000 900 600 800

SELECT SINGLE * … WHERE ORDER = 457 Very expensive on column store

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

456

France

corn

1000

457

Italy

wheat

900

458

Italy

corn

600

459

Spain

rice

800



SELECT SUM(Sales) … Ideal for column store

Internal

14

Columnar Dictionary Compression  SAP HANA operates directly on compressed data, using integers  More in-cache, less main memory access, less data to be loaded into cache & CPU  More advanced encodings depending on circumstances

Logical Table Order

Country

Product

456 457 458 459 460 461 462 463 …

France Italy Spain Italy Denmark Denmark Belgium Italy …

corn wheat rice rice corn rice rice rice …

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Sales 1000 900 600 800 500 600 600 1100 …

Dictionary 1 2 3 4 5

Belgium Denmark France Italy Spain

5 entries  3 bits to encode

Compressed column 1 2 3 4 5 6 7 8 …

3 4 5 4 2 2 1 4 …

Where was order 460? Internal

15

Fewer Non-Unique Index Required  Full column scans are usually fast enough – far fewer non-unique indexes required  Only if table contains 100 000s of rows consider a non-unique index comprising a single column only Leads to an “inverted index” in SAP HANA

Logical Table Order

Country

Product

456 457 458 459 460 461 462 463 …

France Italy Spain Italy Denmark Denmark Belgium Italy …

corn wheat rice rice corn rice rice rice …

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Sales 1000 900 600 800 500 600 600 1100 …

Dictionary 1 2 3 4 5

Belgium Denmark France Italy Spain

5 entries  3 bits to encode

Create in exceptional cases only! Inverted Compressed index column 1 2 3 4 5 6 7 8 …

3 4 5 4 2 2 1 4 …

1 2 3 4 5

7 5,6 1 2,4,8 3

Which orders in Italy?

Where was order 460? Internal

16

When Use Row Store, When Column Store? Column store is best for:

Row store is more suitable when:

 Column based operations on large number of rows

 Table mainly contains distinct values  Low compression rate

 Large number of columns, many unused

 All columns of are relevant

 Aggregations and intensive search

 No aggregation or search on non-indexed columns

 Master and transactional data

?

 Table is fully buffered  Table has a minor number of records  Table contains unstructured data

© 2016 SAP SE or an SAP affiliate company. All rights reserved. © SAP AG 2012

Internal

20

Implications: Code-To-Data Paradigm

Classical Approach Calculations

Application Layer

l

Data Layer Calculations New Approach

In-Memory Computing Imperative:

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Movement calculations into the database Only transfer results Internal

21

Highlights of SAP NetWeaver AS ABAP ≥7.4 – Overview

ABAP applications using SAP HANA ABAP development guidelines

Guidelines

Improved tools for performance analysis Extensions to ABAP language Creating and consuming SAP HANA content with ABAP Re-use components optimized for SAP HANA

Transparent optimizations

Transparent Optimizations

SAP NetWeaver AS ABAP ≥7.4

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

22

How To Use Column Store Or Row Store For ABAP Table? ABAP Dictionary Extensions in ABAP 7.4 “Storage type” of ABAP tables can be set with SAP NetWeaver ABAP 7.4.

ABAP Dictionary Table

Use ABAP Dictionary  Technical settings  DB-specific properties

? Default on SAP HANA  Column store

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

23

Exercise 01: Log on to the ABAP System In this exercise you will:  Log on to the ABAP system(s) used during the course

 Determine the SAP HANA store used for ABAP Dictionary table BUT000  Determine which non-unique indexes for ABAP Dictionary table BUT000 are created on SAP HANA

Time: 10 min

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

24

Where can you find more information? ABAP Platform  ABAP for HANA Group: https://jam4.sapjam.com/groups/Fu55Xg4QjvITMyNjFr5dIT  ABAP for HANA on SCN: http://scn.sap.com/community/abap-for-hana

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

26

Unit 1 – Introduction Lesson 2 – Introduction to ABAP Development Tools (ADT)

An Eclipse-based Development Environment

Eclipse™ is SAP’s strategic platform for highly integrated design-time and development tools.



SAP ABAP Development Tools are Eclipse-based; tools based on existing Eclipse frameworks



Common development environment for SAP HANA and ABAP (ADT) going forward

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

29

ABAP Development Tools for SAP NetWeaver – Architecture New ABAP Development experience  Enables cross-platform development, e.g. SAPUI5, Java, SAP HANA  One client to connect to several ABAP back-ends  ABAP development tools specifically for SAP HANA  UI development tools for Web Dynpro and Floorplan Manager  ABAP Debugger integrated in Eclipse

Developer

Eclipse Client SAP HANA Studio

SAP Logon

ABAP Development Tools (ADT)

SAP GUI for Windows

Eclipse Platform

ABAP back end 1

SAP HANA Database © 2016 SAP SE or an SAP affiliate company. All rights reserved.

And

ABAP back end N

Or

Classic Database Internal

30

Working with ABAP Projects ABAP Project  Connection to ABAP system using a particular user  Access any ABAP repository object  Add frequently used ABAP packages to Favorite Packages for fast access

Connection to ABAP System ABAP Class

Function Pools

ABAP Interface ABAP Programs

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

31

Working with ABAP Projects – Editors Native – with Eclipse Look & Feel

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Integrated SAP GUI

Internal

32

Working with ABAP Projects – Shortcuts https://go.sap.corp/adt_ref_card

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Navigation: hold Ctrl key

Internal

33

Working with ABAP Projects – Editing Source Code Many helpful features    

Keyword completion incl. code templates Ctrl+Space: Content Assist (Code completion) CtrlL+1: Quick Fix Refactoring capabilities e.g. extract method

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

34

Troubleshooting Tools – ABAP Debugger in Eclipse Debug perspective  Opens when code runs and hits breakpoint  Step over, into, resume … as usual  Display variables & tables

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

35

CDS Development Environment  Based on Eclipse platform and therefore integrated in ABAP in Eclipse  Textual and Graphical  Rich feature set for fast development Code completion Enhanced data preview Quick-Fix function Syntax highlighting

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

36

ABAP Development Tools Data Preview

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

37

Getting ABAP Development Tools for SAP NetWeaver Get ABAP Development Tools for SAP NetWeaver from: SAP Software Download Center  http://service.sap.com/swdc

SAP Development Tools for Eclipse  http://tools.hana.ondemand.com/

Also see SAP Community Network  http://scn.sap.com/community/abap/eclipse  http://scn.sap.com/community/abap/hana

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

38

Installed Features Overview of installed features in Eclipse / SAP HANA Studio / ADT  Menu item Help  About  Detailed list of features using Installation Details

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

39

Installing and Updating Features Keeping an Eclipse installation up-to-date

Installing additional plug-ins

 Menu item Help  Check for Updates

 Configure Available Software Sites  Menu item Help  Install New Software

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

40

Exercise 02: Create an ABAP Project in ADT In this exercise you will:  Open ABAP Development Tools and connect to an Application Server ABAP

 Make a development package a favorite in your project  Write a simple ABAP program and debug it using ADT

Time: 10 min

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

41

Where can you find more information? ABAP Platform  ABAP for HANA Group: https://jam4.sapjam.com/groups/Fu55Xg4QjvITMyNjFr5dIT See e.g. https://jam4.sapjam.com/wiki/show/gX0f6OS0B0ob4pbzC5mWxl for how you can easily install ADT and SAP HANA Studio within the SAP network.  ABAP for HANA on SCN: http://scn.sap.com/community/abap-for-hana

ABAP Development Tools for SAP NetWeaver (ABAP in Eclipse)  ADT Group on SAP Jam: https://jam4.sapjam.com/groups/557144

 ADT Quick Reference Card: https://go.sap.corp/adt_ref_card  ADT on SCN: http://scn.sap.com/community/abap/eclipse  ADT on Youtube: http://www.youtube.com/watch?v=BXg7xXrEAUw  Connecting to customer systems for support: TBA

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

42

Unit 1 – Introduction Lesson 3 – Introduction to the SFLIGHT Data Model

SAP Flight Data Model Overview

Real World

Data Model

ABAP Dictionary

Relational Database

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

46

SAP Flight Data Model

Departure City

Departure Airport

Arrival Airport

Destination City © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

47

Relational Data Model BC_CARRIER T

BC_AIRPORT T

BC_GEOCITY T

Airline

Airport

City

A

H

BC_PLANFLI

T

R R

Flight Schedule

H BC_SFLIGHT

T

Flight

H BC_BOOKING T

A

BC_CITAIRP

T

City Airport Assignment

BC_CUSTOM T

BC_COUNTER T

BC_TRAVLAG T

Flight Customer

Sales Office

Travel Agency

R

CR

CR

Flight Booking

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

48

Implementation Using Transparent Tables BC_CARRIER T

Airline

SCARR MANDT

CARRID CARRNAME

CURRCODE

URL

H BC_PLANFLI

T

Flight Schedule

SPFLI MANDT CARRID

CONNID AIRPFROM

AIRPTO

DEPTIME . . .

H BC_SFLIGHT

T

Flight

SFLIGHT MANDT CARRID

CONNID FLDATE

SEATSMAX

SEATSOCC

...

H BC_BOOKING T

Flight Booking

SBOOK MANDT CARRID

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

CONNID FLDATE BOOKID CUSTOMID COUNTER . . .

Internal

49

Transparent Tables Transparent Table

Field described by

Data Element points to

Domain

Table containing data

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

50

Lesson 3: Introduction to the SFLIGHT Data Model Summary You should now be able to: • Describe the SFLIGHT Data Model

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

52

Unit 2 – Introduction to Core Data Services

Unit 2 – Introduction to Core Data Services Lesson 1 – Motivation and Definition

Transformation of Application Design with SAP HANA Classic Applications

UI Rendering

Data-Centric Applications

UI Tier

UI & Client Side Application Logic

UI Application Logic Service Logic

Middle Tier Service Layer

Data-Centric Logic Database

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Relational Database

SAP HANA Database

Internal

57

Paradigm Changes in Application Programming

Data-To-Code: Intensive computations

in APPLICATION layer

Code-To-Data: Intensive computations in DATABASE layer

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

58

Motivation for Core Data Services

?

Can’t everything be done with SQL

In principle yes, but …

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

! Internal

59

Issue 1: Large Semantic Gap between Task and SQL Code Today Conceptual Level

Task:

Get the id, name and the respective zip code of the home address for all employees in org-unit ’Development’

Large Semantic Gap Implementation Level

SQL: SELECT

e.id, e.name, a.zipCode FROM Employee e INNER JOIN OrgUnit u ON u.id = e.orgid LEFT OUTER JOIN Address a ON e.id = a.id AND a.type=’HOMEADDR’ WHERE u.name=‘Development’.

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

60

Issue 2: SQL Complexity Leads to Imperative Code Conceptual Level

Issue:

Due to the complexity of SQL, developers are using code instead of SQL Performance gaps: Loops in loops, nested queries with many round trips, … Implementation Level

Code:

SELECT * FROM Employee INTO TABLE it_empl WHERE orgunit = 4711. “ I know 4711 is the LOOP AT it_empl. “ id of the dev unit WRITE it_empl-id. WRITE it_empl-name. SELECT * FROM Addresse INTO TABLE it_addrs WHERE id = it_empl-id. LOOP AT it_addrs. IF it_addrs-type = ‘HOMEADDR’. WRITE it_addrs-zipcode. ENDIF. ENDLOOP. ENDLOOP.

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

61

CDS Brings Conceptual and Implementation Level Closer Together Conceptual Level

Task:

Get the id, name and the respective zip code of the home address for all employees in org-unit 4711

Smaller Semantic Gap, Less Coding required Implementation level

CDS:

SELECT id, name, homeAddress.zipCode FROM OrgUnit[ name = ’Development’ ].employees

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

62

Next generation data definition and access for database centric applications

ABAP CORE DATA SERVICES

Common data model

Capture business intend

Improved programming model

Semantically rich

Reduced complexity

For all application domains

Declarative

Extending SQL

Rich set of build-in functions

Close to conceptual thinking

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Code pushdown capabilities

Internal

63

Core Data Services – A Family of Domain Specific Languages

The Core Data Services (CDS) are a collection of domain-specific languages and services for defining and consuming semantically rich data models.

DDL

QL

DCL

Data Definition Language

Query Language

Data Control Language

Model and retrieve data on a semantic level higher than SQL

Consume CDS entities via Open SQL in ABAP

Define authorizations for CDS views

Extends native SQL means for increased productivity

Fully transparent SQL extensions

Modelled and declarative approach Integrates with classic authorization concepts

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

64

ABAP integration SAP NetWeaver ABAP

Infrastructure ensures Any-DB support

OPEN SQL CDS ABAP

Proven and consistent ABAP Lifecycle Management and extensibility (S)QL Engine

Highly reusable and extensible CDS artifacts CDS also available in native SAP HANA © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Lifecycle Management

Leverage DDIC semantics

Any SAP supported DB

Internal

65

Core Data Services at a Glance

Domain specific languages (DDL, QL, DCL)

Common Basis for Domain-Specific Frameworks e.g. UI, Analytics, Odata, BW,…

Declarative, close to conceptual thinking

@AnalyticsDetails.aggregationBehaviour: SUM

CDS is completely based on SQL

Built-in Functions and Code Pushdown

Any ‘Standard SQL’ features directly available like joins, unions, build-in functions, …

Table Functions for Breakout Scenarios

Fully Compatible with Any DB

Extensible

Generated and managed SQL Views

On model level thru extensions

Modern Open SQL

On meta-model level thru annotations

Semantically Rich Data-Models

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Rich Set of Built-in SQL Functions

Internal

66

CDS Views in ABAP

AS ABAP

Lifecycle

Core Data Services View

Standard ABAP Transport (CTS)

HANA view deployed during CDS view activation Only CDS View definition is transported

deploy

SAP HANA

ABAP stack as Master for editing, activating and transporting Core Data Services (CDS) View

SAP HANA View

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Only ABAP Development Tools for SAP NetWeaver required ABAP CDS provides read access to data only

Internal

67

Benefits of CDS Views Compared to ABAP Dictionary Views Classical ABAP Dictionary Views

Support on all DBMSs

Join/Union, Projection, Selection

inner join & simple selection only

not supported

ABAP Core Data Services Views

or

inner join, outer join, union

Calculation expressions, aggregation, grouping

Nested views (on views) not supported

Prefer CDS Views as the more powerful tool © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

68

CDS View Building At a Glance!!! SQL View name

@AbapCatalog.sqlViewName: 'WDECDS_CONN3ANN' @ClientDependent: true @AbapCatalog.compiler.CompareFilter: true @AccessControl.authorizationCheck: #CHECK @EndUserText.label: 'Flight Connection with ABAP Annotations'

CDS View entity

@AbapCatalog.Buffering.type: #GENERIC @AbapCatalog.Buffering.numberOfKeyFields: 1 @AbapCatalog.Buffering.status: #ACTIVE

Buffering-specific annotation

define view Wdecds_Connection3_Annotations as select from spfli as c inner join scarr as a on c.carrid = a.carrid inner join sairport as af Joins on c.airpfrom = af.id inner join sairport as at Alias on c.airpto = at.id { key c.carrid,key c.connid, a.carrname, a.currcode as currency, Select list c.cityfrom, c.cityto, c.airpfrom, @EndUserText.label: 'Dep.Airp.Name'//Annotations before the field @EndUserText.quickInfo: 'Departure Airport Name' af.name as airpfrom_name, c.airpto, at.name as airpto_name @ “Data Preview” @AbapCatalog.sqlViewName:'S4HCDS_SEL_V09' define view s4hcds_sel_v9 as select from scarr as c { c.carrname as Carrier, c.carrid as ID }

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

87

Exercise 03: Define Views Using Core Data Services In this exercise you will:  Create a simple Core Data Services (CDS) view

 Use Data Preview tool to check the output of the CDS view  Use alias names for the fields and use Where clause  Write a simple ABAP program to consume the CDS view using Open SQL  See Student Manual, Exercise 3 Tasks 1-6

Time: 15 min

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

88

Lesson 2 – Basic Syntax of CDS Views Summary You should now be able to: • Describe the syntax structure of a simple CDS view • Define a simple CDS view with Select and Where Clause • Explain the Syntax Rules for CDS DDL • Explain the life cycle of CDS

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

91

Unit 2 – Introduction to Core Data Services Lesson 3 – Annotations

CDS: Common Basis for Domain-Specific Frameworks



Reusable and unified view model for all use cases



Annotations enabling flexible usage in different contexts



Efficient development

Business Logic

Planning

Analytics

CDS BI-Tools

OData

Search

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

94

Annotations 

Enrich CDS data models with additional metadata.



Annotations begin with @





ABAP Annotations:  Evaluated by the ABAP Core Data Services framework, namely the ABAP runtime environment itself Component Annotations:  Evaluated by frameworks of other SAP software components (e.g., ODATA, UI and Analytics)

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

95

Kinds of Annotations • • • • • • • • • • • • • • • •

AbapCatalog Annotations AccessControl Annotations Analytics Annotations AnalyticsDetails Annotations ClientDependent Annotations Consumption Annotations DataAging Annotations DefaultAggregation Annotations EndUserText Annotations EnterpriseSearch Annotations Environment Annotations Hierarchy Annotations MappingRole Annotations ObjectModel Annotations OData Annotations Search Annotations

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

• • • •

SearchIndex Annotations Semantics Annotations UI Annotations VDM Annotations

Internal

96

AbapCatalog Annotations Define technical settings of CDS entities in the ABAP dictionary. •

AbapCatalog.sqlViewName:



AbapCatalog.sqlViewAppendName: Database view for CDS extension



AbapCatalog.buffering.numberofkeyFields: Number of key elements for buffering generic areas (Default 000)



AbapCatalog.buffering.status :



Database view in ABAP dictionary that is generated at activation



#ACTIVE:

SAP Buffering active



#SWITCHED_OFF:

SAP buffering allowed but not active (Default)



#NOT_ALLOWED:

SAP buffering not allowed.

AbapCatalog.buffering.type: •

#SINGLE:

Buffering type- single records



#GENERIC:

Buffering type- generic area



#FULL:

Buffering type- full



#NONE:

Buffering type- none (Default)

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

97

AbapCatalog Annotations •

AbapCatalog.compiler.compareFilter: (Default: true) •

true

: the filter conditions of the path expressions of the view are compared. If the same filter condition occurs, the associated join expression is only evaluated once.



false

: a separate join expression is created and evaluated for each filter condition.

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

98

ClientDependent Annotation Defines the client handling when Open SQL is used to access a CDS entity •

ClientDependent: (Default: true) •

true

: The CDS view is client-specific. The view fields of the CDS entity do not cover a client column, from the perspective of an ABAP program. When accessed using SELECT, automatic client handling is performed.



false

: The CDS view is a cross-client view. No automatic client handling is performed.

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

99

EndUserText Annotations Enable an intuitive consumption of the data model in User Interfaces EndUserText.label: Defines a human-readable text that is displayed besides input fields or as column headers. EndUserText.quickInfo: Defines a human-readable text that provides additional information compared to the label text. The quickInfo element is used for accessibility hints or the mouse over function.

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

100

Example @AbapCatalog.sqlViewName: ‘S4HCDS_CONN3ANN‘ @AbapCatalog.compiler.compareFilter: true @AbapCatalog.Buffering.type: #GENERIC

@AbapCatalog.Buffering.numberOfKeyFields: 1 @AbapCatalog.Buffering.status: #ACTIVE @EndUserText.label: 'Flight Connection with ABAP Annotations‘

@ClientDependent: true define view s4hcds_Connection3_Annotations as select from spfli { // Projection list }

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

101

Take Away Annotations



Separation of metadata and core data model



Allow applications to add their specific view properties to the Data Model

Annotation allows independency from Core Data Model And can be defined at many view parts!



Annotations can be defined for view header, columns and parameters

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

102

Exercise 04: Make the CDS view cross-client In this exercise you will:  Use ClientDependent Annotation to make your view client independent

 See Student Manual, Exercise 4 Tasks 1-3

Time: 15 min

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

103

Unit 3 – Core Data Services: SQL Features

Unit 3 – Core Data Services: SQL Features Lesson 1 : Expressions and Built-In Functions

CDS Built-in Function Overview

Generic SQL Expressions • Simple- / Searched-Case

• Coalesce

Conversion Functions

String Functions

Arithmetic Functions

Date and Time Functions

• Unit-Conversion

• Concat

• Abs

• Days between

• CurrencyConversion

• Instr

• Ceil

• Add Days

• Left / Right

• Div (Integer)

• Add Month

• Cast

• Length

• Division (Dec)

• Current Tmstp

• Hex2Bin

• Lpad / Rpad

• Floor

• Date is Valid

• Bin2Hex

• Ltrim / Rtrim

• Mod

• Tmstp is Valid

• Decimal Shift

• Replace

• Round

• Seconds btw. Tmstps • Add seconds

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

109

Arithmetic Expressions

Supported operators +, - , * and unary Complex expressions bracketing of sub expressions possible

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

@AbapCatalog.sqlViewName: 'S4HCDS_SEL_VD12' define view s4hcds_sel_v12 as select from sbook { forcurkey, forcuram as Amount, cast( forcuram as abap.fltp ) + ( cast ( -forcuram as abap.fltp ) * 0.03 ) as reduced_amount, cast( forcuram as abap.fltp )* 0.03 as savings }

Internal

110

CASE Expressions Simple CASE Expression  The projection list can contain columns that are based on a case differentiation  These columns can be named explicitly  Example: The output is list of columns from table SBUSPART resulting TYPE as customer or Travel Agency based on the TypeCode. Supported expressions after

CASE: columns | built-in functions | arithm. expr. | path expr. | parameters WHEN: columns | literals | CASE | path expr. THEN: everything but built-in functions ELSE: everything but built-in functions

ELSE is optional Resulting column type

@AbapCatalog.sqlViewName: 'S4HCDS_SEL_VD10' define view s4hcds_sel_v10 as select from sbuspart { buspartnum as ID, contact, contphono, case buspatyp when 'FC' then 'Customer' when 'TA' then 'Travel Agency' else 'NA' end as Type }

derived from expressions after THEN and ELSE © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

111

CASE Expressions Searched CASE Expression  Operates like an if … elseif construct  Evaluates a series of boolean expressions and returns the result of the first expression that evaluates to true

CASE WHEN cond_expr1 THEN result1 [WHEN cond_expr2 THENresult2] [WHEN cond_expr3 THENresult3] ... [ELSE resultn] END ...

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

@AbapCatalog.sqlViewName: ‘S4HCDS_SCASE' define view s4hcds_searched_case as select from spfli { key carrid, key connid, distance, distid, case when distance >= 2000 then 'long-haul flight' when distance >= 1000 and distance < 2000 then 'medium-haul flight' when distance < 1000 then 'short-haul flight' else 'error' end as flight_type }

Internal

112

Nested CASE Expression Example 

Based on the flight details give priority as follows:  Carrid= AA => Priority 1  Carrid= LH and connid =400 => Priority 2  Carrid= LH and connid=except 400 => Priority 3  Carrid = others => Priority Unknown

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

@AbapCatalog.sqlViewName:‘S4HCDS_SEL_VD11' define view s4hcds_sel_v11 as select from spfli { carrid, connid, case carrid when 'AA' then 'Prio1' when 'LH' then case connid when '0400' then 'Prio2' else 'Prio3' end else 'Unknown' end as Priority }

Internal

113

CAST Expression  Supported Operands: Literal, column, path expression, build-in function, arithmetic expression

@AbapCatalog.sqlViewName: 'S4HCDS_SEL_VD12' define view s4hcds_sel_v12 as select from sbook  Various data types in ABAP namespace supported { forcurkey,  Result length determined at activation time forcuram as Amount,  No nesting of CAST expressions cast( forcuram as abap.fltp ) + ( cast ( -forcuram as abap.fltp ) * 0.03 )  Alias names required for resulting columns as reduced_amount, Example: cast( forcuram as abap.fltp )* 0.03 as savings Cast foreign currency amount from sbook as reduced_amount } and Savings.

Supported types in ABAP namespace:

char( len ), clnt, cuky( len ), curr( len, decimals ), dats, dec( len, decimals ), fltp, int1, int2, int4, lang, numc( len ), quan( len, decimals ), tims, unit( len )

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

114

Predefined Functions COALESCE Function •

COALESCE( arg1, arg2 ) - returns the value of the argument arg1 (if this is not the null value); otherwise it returns the value of the argument arg2



COALESCE can be used to set reasonable default values for the NULL values

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

AbapCatalog.sqlViewName: 'S4HCDS_SEL_VD13' define view S4hcds_sel_v13 as select from scustom as c left outer join sbook as b on c.id = b.customid { c.name as Customer_Name, c.city as Customer_city, coalesce( b.invoice , 'NULL') as invoice } where b.bookid = '00002406'

Internal

115

Predefined Functions SQL Functions String functions: • CONCAT(arg1, arg2) • LENGTH(arg) • LPAD/RPAD(arg, len, src) • REPLACE(arg1, arg2, arg3) • SUBSTRING(arg, pos, len)

@AbapCatalog.sqlViewName: 'S4HCDS_SEL_VD14' define view s4hcds_sel_v14 as select from sbook { lpad ( connid, 13, '0' ) as conn_id, carrid, ceil ( loccuram ) as amount_rounded_up }

Numeric functions: • ABS(arg), CEIL(arg), FLOOR(arg) • DIV(arg1, arg2), DIVISION(arg1, arg2, dec) • MOD(arg1, arg2), ROUND(arg, pos)

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

116

Predefined Functions Special Functions 

Delivered by SAP and not provided as native functions on every database platform



Conversion functions  CURRENCY_CONVERSION( p1 => a1, … )  UNIT_CONVERSION( p1 => a1, ... )  DECIMAL_SHIFT( p1 => a1, ... )



Date functions  DATS_IS_VALID  DATS_DAYS_BETWEEN

@AbapCatalog.sqlViewName: 'S4HCDS_SEL_VD15' define view s4hcds_sel_v15 as select from sbook { bookid, unit_conversion ( quantity => luggweight, source_unit => wunit, target_unit => cast( 'G' as abap.unit ) ) as weight_in_grams }

`

 DATS_ADD_DAYS  DATS_ADD_MONTH



Time function: TIMS_IS_VALID  Named Parameters  An actual parameter a1 has to be bound via the “=>” operator  Some parameters are optional © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

117

Example @AbapCatalog.sqlViewName: 'S4HCDS_FUNC_D1' @ClientDependent: true define view S4hcds_Func_Demo as select from sbook { CONCAT( carrid, connid ) as flightno, fldate, bookid, CONCAT( CONCAT( SUBSTRING(order_date,5,2), '-'), SUBSTRING(order_date,1,4) ) as ordermonth, case smoker when 'X' then cast(loccuram as abap.fltp)* 1.03 else cast(loccuram as abap.fltp) * 0.98 end as adjusted_amount, currency_conversion( amount => loccuram, source_currency => loccurkey, target_currency => cast('EUR' as abap.cuky(5)), exchange_rate_date => order_date ) as euro_amount } © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

118

Exercise 05: Enhance the CDS view with Expressions In this exercise you will:  Use CASE expression to define the column more descriptive

 Use CAST expression in floating point calculation  Use CONCAT function to combine 2 strings  Use currency_conversion special function to convert the currency  See Student Manual, Exercise 5 Tasks 1-5

Time: 15 min

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

120

Unit 3 – Core Data Services: SQL Features Lesson 2 – Aggregate Expressions

Aggregate Expressions  Aggregate Functions  MAX  MIN  AVG  SUM  COUNT  Can be used as elements with alternate name using AS in the projection list  Require a GROUP BY clause when aggregate functions are used along with other elements in the projection list

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

124

Aggregate Functions COUNT  You can calculate the number of rows in the result set using COUNT . Rows containing only NULL values are included.  How

many Records for booked flights with carrid: LH and connid : 0400

 You can calculate the number of different NOT-NULLvalues of a certain column.  You can use only a single column as parameter for COUNT DISTINCT. NULL values are not included.

@AbapCatalog.sqlViewName:'S4HCDS_SEL_VD16' define view s4hcds_sel_v16 as select from sbook { count( * ) as booked_flights } where carrid = 'LH' and connid = '0400'

---{ count( distinct planetype ) as } ----

planes

How many different entries of Plane Types?

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

125

Aggregate Functions MIN, MAX, SUM 

You can calculate the minimum or maximum value in a column.



What is the price range of the flights?



You can calculate the number of values within a single column.  NULL values are not included. 

@AbapCatalog.sqlViewName:'S4HCDS_SEL_VD17' define view s4hcds_sel_v17 as select from sflight { min( price ) as Min_Price, max( price ) as Max_Price, sum( price) as Total_Price } where carrid = 'AA' and connid = '0017'

You can only use a single column as parameter of SUM.

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

126

Aggregate Expressions Group By Clause  A table can be divided into (disjoint) groups of rows  A group is represented in the query result by a single row  Aggregate expressions will be evaluated separately for each group  Columns outside of aggregate functions must be listed in GROUP BY clause  What is the number of flights per planetype?

@AbapCatalog.sqlViewName:'S4HCDS_SEL_VD18' define view s4hcds_sel_v18 as select from sflight { planetype, count( * ) as Count_flights } where planetype = 'A340-600' or planetype = 'A319-100' group by planetype

 The WHERE condition is evaluated before the rows are combined using GROUP BY.  What is the number of flights per plane type?  Only plane type with number A340-600 or A319-100 included into the result set.

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

127

Aggregate Expressions Having Condition 

HAVING condition is evaluated after the group by clause is evaluated



HAVING condition can only be specified together with GROUP BY



Aggregate expressions can be specified in the HAVING condition

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

@AbapCatalog.sqlViewName: 'S4HCDS_SEL_VD19' define view s4hcds_sel_v19 as select from sflight { carrid, fldate, count(*) as flight_count } group by carrid, fldate having count(*) > 2

Internal

128

DEMO Aggregation

@AbapCatalog.sqlViewName:‘S4HCDS_CUSTAGGR' @ClientDependent: true @EndUserText.label: 'Customer With Aggregation Of Miles' define view s4hcds_Customer_Aggregation as select from scustom as c inner join sbook as b on c.id = b.customid inner join s4hcds_Connection5_Functions as f on and b.connid = f.connid { key c.id as id, c.name, c.street, c.city, c.country, sum(f.miles) as miles } group by c.id, c.name, c.street, c.city, c.country

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

b.carrid = f.carrid

Internal

129

Exercise 06: CDS view with Aggregate Expressions In this exercise you will:  Use COUNT aggregation function to find the total number of bookings

 Use MIN and MAX functions to find the minimum and maximum booking amount  Use HAVING condition to restrict the result groups  See Student Manual, Exercise 6 Tasks 1-4

Time: 15 min

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

130

Unit 3 – Core Data Services: SQL Features Lesson 3 – Joins and Unions

Access to multiple tables For read access to multiple database tables / views the following options are available:  Combination of several tables (JOIN) o INNER JOIN vs. OUTER JOIN  Combination of results from several sub-queries (UNION) o UNION ALL vs. UNION

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

134

INNER JOIN One row of the left table and one row of the right table are always joined to a common result row - provided that the JOIN condition is fulfilled. JOIN Condition: L.X



L

… … … … … …

X 1 2 3 4 5

… … … … … …

= R.Y

… … … … … …

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

R

… … … … … …

Y 3 4 5 6 7

… … … … … …

… … … … … …

Internal

135

OUTER JOIN The OUTER JOIN has three sub types:  LEFT OUTER JOIN  RIGHT OUTER JOIN  FULL OUTER JOIN

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

136

LEFT OUTER JOIN  One row of a table and one row of another table are always connected to a common result row - provided that the JOIN condition is fulfilled.  In addition, rows of the left table without matching row in the right table are copied to the query result. The missing values ​(from the right table) are filled with NULL values.

L

… … … … … …

X 1 2 3 4 5

… … … … … …

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

… … … … … …

R

NULL

NULL

NULL

NULL

… … … … … …

Y 3 4 5 6 7

… … … … … …

… … … … … …

Internal

137

RIGHT OUTER JOIN  One row of a table and one row of another table are always connected to a common result row - provided that the JOIN condition is fulfilled.  In addition, rows of the right table without matching row in the left table are copied to the query result. The missing values ​(from the left table) are filled with NULL values.

L

… … … … … …

X 1 2 3 4 5

… … … … … …

… … … … … …

NULL

NULL

NULL

NULL

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

R

… … … … … …

Y 3 4 5 6 7

… … … … … …

… … … … … …

Internal

138

FULL OUTER JOIN  One row of a table and one row of another table are always connected to a common result row - provided that the JOIN condition is fulfilled.  In addition, rows of both tables without matching records are copied to the query result. The missing values ​(from the other table) are filled with NULL values.

L

… … … … … …

X 1 2 3 4 5

… … … … … …

… … … … … …

NULL

NULL

NULL

NULL

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

R

NULL

NULL

NULL

NULL

… … … … … …

Y 3 4 5 6 7

… … … … … …

… … … … … …

Internal

139

Supported joins in CDS views Supported Join Types: 1. Inner Join 2. Left Outer Join 3. Right Outer Join • •

Complex Join operations using ( … ) are supported Arbitrary On-Conditions: >, >=, Generate Queries. Some features (adding display attributes, choosing key or text for display) are hidden in the extended menu. Use the right mouse-click at the name of the relevant field and choose "Extended Menu"

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

392

Lesson A4: VDM Analytical Perspective Summary You should now be able to: •

Explain the Analytical perspective of VDM • Explain the important annotations used in Analytical context in VDM

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

393

Appendix Appendix Lesson 5 – CDS Unit Testing

Why do we need Testing for “Code Pushdown”-Scenarios ? Complexity of S/4 CDS Model (1) Graph Representation of a Data Model using the Association as Edges

S/4Hana Development System[1] Number of CDS Views: 6.590 Number of Associations 9.328 Lines of Code in CDS Views: 355.905

[1]

on 2015-09-18 © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

397

Why do we need Testing for “Code Pushdown”-Scenarios ? Complexity of S/4 CDS Model (2) TOP Views (with most “basis objects”) Entity

# Basis Objects

TOP Views (with most tables) Entity

#Tables

VFCLM_BAM_DDL_BSM_MD5

5.114

VFCLM_BAM_DDL_BSM_MD5

4.598

C_PURORDREFPURCONITM

3.055

VFCLM_BAM_DDL_BSM_MD4

2.298

P_ASSOCPURORDITMPURCONITM

3.054

VFCLM_BAM_DDL_BSM_MD3

2.298

C_PURGINFORECORDFS

3.008

C_PURORDREFPURCONITM

1.619

VFCLM_BAM_DDL_BSM_MD4

2.555

P_ASSOCPURORDITMPURCONITM

1.619

VFCLM_BAM_DDL_BSM_MD3

2.553

C_PURGINFORECORDFS

1.600

C_PURCHASINGCATEGORYFS

1.603

C_PURCHASINGCATEGORYFS

838

C_PURORDBYSUPPLIERINVOICE

1.569

C_PURORDBYSUPPLIERINVOICE

827

C_CONTRACTITEMFS

1.534

C_CONTRACTITEMFS

813

C_PURREQUISITIONITEMFS

1.527

C_PURREQUISITIONITEMFS

811

C_PURREQUISITIONFS

1.519

I_SUPPLIERCONTACTCARD

807

 55 Views exceed “ANYDB limit” of 248 tables

Complete List: © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Complete List: Internal

398

Why do we need Testing for “Code Pushdown”-Scenarios ? Complexity of S/4 CDS Model (3)

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

399

Why do we need Testing for “Code Pushdown”-Scenarios ? Here is the Answer… Resulting Questions (based such complex CDS Models)  How to ensure consistency across the different layers of the View stack ?  How to avoid regressions ?  How to provide supportability ?

Potential Answers  Use Debugging  SQL doesn’t offer debugging “by definition”  Use (Unit) Testing  the only “technically feasible” option to ensure the above qualities!

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

400

Unit Testing Unit testing is a software methodology to test portions of code, to ensure they are fit for the intended purpose. These portions of code can be described as smallest testable element of an application. In Object Oriented programming a method or a class can be considered as unit. With code pushdown a CDS view or a database procedure can be considered as unit. 

Test a single CDS view



Test a single ABAP managed database procedure

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

401

Dependencies The portion of code that shall be tested is also called Code Under Test (CUT). Typically the CUT invokes other code or relies on data sources like a database table. Such dependencies are also called Depended-on Component (DOC). Unit test

Code Under Test

Depended On Component

The dependency to database table content can prevent a successful unit test execution in case the

assumed content is not available however. 

In order to achieve stable unit tests it is required to isolate the CUT from any test hindering DOC.

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

402

Test Doubles A common practice is to replace a DOC with test unfriendly behavior by a substitute with test friendly behavior. Such a substitute is also called Test Double.

Unit test

Code Under Test

establishes Test Double

 

(Original) Depended On Component

no longer required

Unit testing requires to create test doubles Unit testing requires to manage dependencies in order to establish test doubles

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

403

Appendix Appendix Lesson 6 – Fiori Programming Model

Fiori Technology

Search Engine

Search & Analytics Engine Transactional Proc.

The Analytics Engine

challenge –

simplify and bring together what

belongs together

HANA

Data Replication © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Data Replication Internal

406

Fiori Programming Model – Open, flexible and standardized

SAPUI5

Common UI Technology for Enterprise Applications

FioriBuildingBlocks

UX Consistency and Development Efficiency Based on Metadata

UI Tier UI Integration Tier

S/4

Service/Application Tier

HANA

Database Tier © 2016 SAP SE or an SAP affiliate company. All rights reserved.

UI Integration Tier • Reuse of UI technologies (e.g. SAPUI5 and FioriBuildingBlocks) and design investments and innovations for all Application Tiers • Integration Services, like Cross-System-Navigation, Mobile Application Infrastructure • Service API Definition and Processing • Key enabler for Fiori Programming Model • Allows step-wise transition to S/4 HANA Core Data Services • Data models • Metadata describing Business Semantics Internal

407

Getting started – Get the Idea Simple Example of a Fiori Programming Model SAP WebIDE

UI5 Sources

Generate user interface UI developer

ABAP in Eclipse

Gateway Service

ABAP in Eclipse

CDS / DDL Source

Expose OData service

Define data model Data modeling

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Backend developer

Internal

408

Simple list reporting ALV-like applications Fiori User Interface

UI runtime

Find:

GET ../SalesOrder? $filter= $select= $orderby= search= $top= 50

R

HTTP / OData

OData Service

OData dispatcher SQL R

CDS (DB Views)

SalesOrder

select SalesOrder from where and contains( order by limit 50

,

)

HANA

Annotations © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

409

Fiori Building Blocks: Smart Controls and Smart Templates Annotation Driven Fiori UIs

?

What means Smart?

 Annotations describe semantics related to data (examples see next slide).  Smartness of Controls and Templates is based on the understanding of these semantics. Annotations are evaluated in the Client Controller logic.

Development steps

Choose Template

Select annotated OData Service.

Run fully functional standard Fiori Application

Templates incorporate latest Fiori design and UX.

Annotations are derived from CDS for reuse, productivity and consistency.

No front end coding required. Extension via additional Annotations or own Templates.

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

410

Demo Fiori & OData

© 2015 SAP SE or an SAP affiliate company. All rights reserved.

Fiori Programming Model Summary You should now be able to: •

Explain the Fiori Programming Model

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

412

Appendix Appendix Lesson 7 – Miscellaneous

Open SQL Vs ABAP CDS

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

414

Core Data Services: HANA & ABAP Two Ways of Database Integration

HANA CDS

?

Even so the Core Data Services Specification is language and platform agnostic, the CDS implementations are not.

HANA DB

ABAP • •

Same Semantic on all DBs



HANA only (HANA specific features available)

Initial Focus on View building •

Integration into ABAP Data Dictionary



CDS Associations:

ABAP CDS



Unmanaged Associations only

Initial Focus on Building Models from Scratch CDS Associations:



Managed and Unmanaged Associations

Due to the different requirements and platforms, the two CDS implementations have different feature sets and release cycles. A technical compatibility is not guaranteed. © 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

415

ABAP CDS vs HANA CDS

© 2016 SAP SE or an SAP affiliate company. All rights reserved.

Internal

416