Vous êtes sur la page 1sur 39

SAP CLOUD PLATFORM

ABAP ENVIRONMENT

ABAP

SAP HANA

CNA319 – Optimize Your Custom ABAP Code


for SAP HANA

PUBLIC
Speakers 2018

SAP TechEd Las Vegas Carine Tchoutouo Djomo


October 2–5, 2018

SAP TechEd Barcelona Karl Kessler


October 23–25, 2018

SAP TechEd Bangalore Sachin B


November 28–30, 2018

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Take the session survey.
We want to hear from you!

Be sure to complete the session evaluation


for this session CNA319 on the SAP TechEd
mobile app.

Download the app from


iPhone App Store or Google Play.

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Disclaimer

The information in this presentation is confidential and proprietary to SAP and may not be disclosed without the permission of SAP.
Except for your obligation to protect confidential information, this presentation is not subject to your license agreement or any other service
or subscription agreement with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or any related
document, or to develop or release any functionality mentioned therein.
This presentation, or any related document and SAP's strategy and possible future developments, products and or platforms directions and
functionality are all subject to change and may be changed by SAP at any time for any reason without notice. The information in this
presentation is not a commitment, promise or legal obligation to deliver any material, code or functionality. This presentation is provided
without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. This presentation is for informational purposes and may not be incorporated into a contract. SAP
assumes no responsibility for errors or omissions in this presentation, except if such damages were caused by SAP’s intentional or gross
negligence.
All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from
expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates,
and they should not be relied upon in making purchasing decisions.

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4


ABAP Strategy

CNA120
CNA319

Optimize Your Custom ABAP Code


for SAP HANA

CNA319
See the Big Picture of the ABAP
RESTful
Programming Model
CNA215

A Technical Deep Dive into the


ABAP RESTful
Programming Model
CNA216

1 hour lecture
Automated Testing with the ABAP
RESTful Programming Model
CNA317

Custom Code Adaptation for


SAP S/4HANA
CNA302

2 hours hands-on workshop

Build a List Report App with SAP


Fiori and ABAP Programming Model
CNA381

Build a Transactional SAP Fiori App


with the ABAP Programming Model
CNA379
Optimize Your Custom ABAP Code for SAP HANA

1 hour codejam

Custom Code Adaptation for SAP


S/4HANA
CNA364
HOW TO MOVE YOUR ABAP SKILLS TO THE CLOUD AND SAP HANA

Build an SAP Fiori App with the


ABAP Programming Model
CNA654

Troubleshoot Your SAP Fiori App


with ABAP Development Tools for
Eclipse
CNA653
Agenda

Introduction

Enhanced Open SQL

ABAP Core Data Services (CDS)

ABAP Managed Database Procedures (AMDP)

What’s new?

Summary

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


INTRODUCTION
ABAP Platform – The evolution
Innovations driven by SAP HANA and SAP S/4HANA

SAP NW AS for ABAP 7.5 / SAP NW AS for ABAP 7.51 SAP NW AS for ABAP 7.52
SAP NW AS for ABAP 7.x SAP NW AS for ABAP 7.4
7.6x packages for cloud / 7.6x packages for cloud / 7.7x packages for cloud

SAP Business Suite EHP x SAP Business Suite EHP 7 SAP Business Suite EHP 8 innovation package for Innovation package for
SAP NW AS for ABAP 7.51 SAP NW AS for ABAP 7.52
SAP NetWeaver 7.x SAP NetWeaver 7.4 SAP NetWeaver 7.5
SAP S/4HANA 1610 SAP S/4HANA 1709
SAP BW 7.4 SAP BW 7.5
SAP S/4HANA Cloud SAP S/4HANA Cloud
SAP S/4HANA Finance
SAP S/4HANA 1511
SAP S/4HANA Cloud

< 2013 2013 / 2014 2015 2016 2017

SAP S/4HANA
SAP HANA SAP Fiori UX
ABAP platform 1809 generally available as
Cloud
component of SAP S/4HANA 1809 as of
September 21th, 2018
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8
ABAP development for SAP HANA
The essentials

SAP HANA Programming Paradigm Shift ABAP Development Tools


as primary database (Code Pushdown) in Eclipse

High pace From data-2-code High developer productivity


in-memory processing to code-2-data

Columnar store; OLAP & OLTP Delegation of data-intensive Advanced source code editing,
computations to the database search & navigation
Multicore and parallelization
Adjusted SQL programming Full support for ABAP
Advanced compression
Guidelines: “5 Golden Rules” development for SAP HANA
Specialized engines,
Advanced database-centric Test, troubleshooting and
libraries and functions
programming techniques quality assurance

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


ABAP optimizations for SAP HANA
At a glance

MORE Exploit
SAP HANA native
capabilities
ABAP managed
database procedures
Advanced SQL and functions (AMDP)
programming CDS table functions
Effort for Quick wins with
reuse components Open SQL
code enhancements
pushdown ALV with integrated
Out-of-the-box data access Advanced view
transparent building with Core
Enhanced search help Data Services (CDS)
optimizations
Fast Data Access
For all entries
LESS

LOW Utilization of SAP HANA capabilities HIGH

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Custom ABAP code optimizations for SAP HANA
Detection of best performance tuning candidates

SQL Monitor for runtime SQL performance


analysis in productive ABAP-based systems

Classic performance monitoring


and trace tools (SQL Trace, ABAP runtime
analysis/Profiler…)

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


ABAP
CORE DATA SERVICES
Next generation data modelling and access with CDS
Combine the best of two worlds

VIEW BUILDING
SQL views with restricted feature
set for SAP HANA capabilities
VIEW BUILDING
ABAP AS Advanced SQL view building
LIFECYCLE MANAGEMENT leveraging DDIC semantics
ABAP lifecycle management e.g. Code pushdown with various built-in
transports SQL functions and expressions
ABAP type system Code breakouts to utilize native
SAP HANA features and capabilities
(CDS Table Functions)
VIEW BUILDING
+
Specialized views (analytical
views, attribute views, calculated LIFECYCLE MANAGEMENT
views, …)
ABAP CDS
Proven and consistent ABAP lifecycle
management e.g. transports
LIFECYCLE MANAGEMENT SAP HANA ABAP type system
Non ABAP lifecycle Consumption in Open SQL and ABAP
management e.g. transports frameworks
Non ABAP type system

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


Hierarchy of views and extensibility with CDS

Consumer Consumer Consumer Extensions


C1 C2 C3
Hierarchical view-on-view concept

Optimized result sets with minimum data


transfer
View on View View on View &
V1 V2
Append additional columns, arithmetic
expressions or literals to result set

Basic View

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


Semantically rich data models with CDS

CDS ASSOCIATIONS
CDS ANNOTATIONS

Meta model enrichment with domain-specific semantics Capturing relationships between data model entities

Reusable and unified view model for different use cases Used (!) associations implicitly translated into SQL joins

Separation of concerns with CDS Metadata Extensions Reuse of generated joins when semantically identical

Vital part of SAP S/4HANA and SAP CP ABAP Environment Queryable in CDS views and Open SQL

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


Declarative access control with CDS roles

PFCG PFCG Declarative approach instead of coded


<Code> data data
approach
<Code>
Thru CDS Data Control Language
CDS role PFCG data supported
Open SQL
Conditional, full and inherited access
rules supported
Authorization
Open SQL & Authorizations pushed down to the
check
database

<Code>
Defined once and automatically used
<Code>
CDS view everywhere

Classical approach Declarative approach

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16


CDS in the SAP Fiori programming model in SAP S/4HANA
Status Quo
UI rendering

APP
Default sorting, filtering, search
and paging

OData CDS VIEWS


GET BO (Actions, validations,
PUT / POST determinations, locks and draft)

UI ANNOTATIONS (CDS MDE)

ABAP COMMON
APPLICATION CDS BASED
SERVER DATA MODELL
CDS-BASED BUSINESS OBJECT (BOPF BO)

SQL

CDS ROLES
Database artefacts

Grouping and aggregation for free


CDS EXTENSION
SAP HANA VIEWS
Access authorizations

Field extensibility
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 17
ABAP CDS development environment

01 02 03
Development support Supportability
Syntax check Enhanced data preview
Code completion Dependency analyser
Eclipse-based Syntax highlighting, pretty printing Activation graph
Source-based editor Element info and navigation Active annotations view
Part of ABAP Development tools Quick fixes Unit testing

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 18


ENHANCED OPEN SQL
Open SQL enhancement starting with release 7.4
Broader SQL standard coverage

SQL-92 Standard

Higher expressiveness in Open SQL statements

Code pushdown support thru new language features

Reduction of existing limitations

Flexible consumption of CDS modelling entities and


roles

Open SQL Open SQL Enhancement


(< AS ABAP 7.4) (≥ AS ABAP 7.4)

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 20


Advanced Open SQL capabilities
Code pushdown support

Extended JOIN support & UNION (ALL)

Various SQL functions & expressions

Flexible CDS consumption

Increased number of allowed sub-queries

Common Table Expressions (CTE)

Access to Global Temporary Tables (GTT)

Access to cached views in SAP HANA

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 21


A B A P MA N A GE D
D A T A B A S E P R OC E D U R E S
Why code breakouts make sense …

Unleash the full power of your Restrictions


underlying SAP HANA database

Some scenarios require Database-specific


selective measures
SAP HANA only
Highest performance requirements
No automatic fallback for anyDB (!)
e.g. with complex calculations
Use of database / analytical engine,
specialized functions required
Open SQL and CDS views are not
sufficient to solve problem efficiently

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 23


ABAP managed database procedures (AMDP) for SAP HANA

Utilize Easy access to


Fully integrated
native SAP HANA advanced
in the ABAP
SAP HANA engines / libraries
infrastructure
entities

Stored procedures and Development, runtime error Like predictive analysis, financials,
database functions supported analysis, enhancement, transport text mining, calculation engine
Complex logic with if / else… SQLScript coding embedded
Parameterized requests and in ABAP classes
multiple result sets Seamless integration with CDS

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 24


Seamless AMDP integration into CDS using CDS Table Functions

CDS table function definition Runtime for table function


Parameter list Runs stored SQLScript procedure
Return Parameter generated from AMDP on database
tables
Reference to implementing method

AMDP
Class
SAP HANA
CDS Data Database
Definition

AMDP function
Implementation
Includes SQLScript based
database function body
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 25
AMDP development environment

DEVELOPMENT

Eclipse-based source code editor


SQLScript syntax highlighting
Static syntax check
Error handling via class-based exceptions
Modification-free extension via AMDP BAdIs

SUPPORTABILITY

Autonomous AMDP debugger in ADT


Detailed runtime errors integrated in ST22 dumps

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 26


Demo

ABAP Managed Code Pushdown

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 27


WHAT’S NEW?
What’s new with SAP S/4HANA 1809?
ABAP SQL highlights

Open SQL renamed to ABAP SQL


Reflecting the stronger focus on leveraging native SAP HANA features

Support of hierarchy functions as data source in queries


Table functions with a tabular results set

Support for various date/time functions


Time, time stamp, date/time conversion, time zone functions supported

Consumption of CDS associations within Common Table Expressions

Various enhancements
New relational expression IS INITIAL, client handling in subquery of SELECT
statement, Null values in table buffer, aggregate function GROUPING, GROUP BY clause
addition GROUPING SETS for grouping multiple aggregations under one SELECT
statement, enhanced CAST matrix, …
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 29
What’s new with SAP S/4HANA 1809?
ABAP CDS highlights

CDS Hierarchy support


For providing a high-level overview with option to drill into lower hierarchy
branches and nodes, ABAP Unit integration via CDS Test Double framework

Definition of Abstract CDS entity


For defining the type properties of a CDS entities

Definition of Metadata Extensions for any CDS entities


Except for CDS table functions

Enhanced Access Control


New inheritance conditions and enhanced PFCG conditions

Various Enhancements
Like new condition IS INITIAL, Literals now handled as INT8

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 30


What’s new with SAP S/4HANA 1809?
AMDP highlights

AMDP Scalar Functions now Supported


Option to buffer the result of the function for the duration of a query provided

Improved Client Handling


New mandatory option CDS SESSION CLIENT required when accessing CDS database
views of CDS view in AMDP method

Enhancement to Logical Database Schemas


Current ABAP database schema can now be mapped in the transaction DB_SCHEMA_MAP
when flagged appropriately

Various Restrictions Removed


Tabular input parameters now allowed in AMDP implementations of CDS table functions
Tabular input parameters of AMDP implementations can now be set optional
Similar behavior as in regular methods when declaring a replacement parameter with
addition DEFAULT for AMDP implementations
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 31
HTA for HDI for the Bottom-Up approach on SAP HANA 2.0
SAP HANA Transport for ABAP (HTA) for SAP HANA Deployment Infrastructure (HDI)

About HTA for HDI


Successor of HTA, available as of AS ABAP 7.52 SPS 02
Available for objects created with SAP HANA XS Advanced Model
Support provided for Zero Downtime Maintenance events

HTA still available for objects created with SAP HANA XS Classic Model (XSC)
Used within the Bottom-up approach where external views and database procedure
proxies are used to expose SAP HANA artefacts in ABAP
But SAP HANA XSC and SAP HANA Repository are deprecated
No support provided for Zero Downtime Maintenance events

Switch to HTA for HDI required for SAP HANA artefacts created with SAP HANA XSC
Needed for Bottom-up approach
CNA306

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 32


SUMMARY
Key Takeaways (1)
Custom ABAP code optimizations for SAP HANA – Recap

MAINSTREAM
ABAP-managed code pushdown

ABAP Core Data Services (CDS)


Open SQL

ABAP Managed Database


Procedures and Functions (AMDP)
CDS Table Functions
CODE BREAKOUTS FOR SAP HANA

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 34


Key Takeaweays (2)
Custom ABAP code optimizations for SAP HANA – What you can do

Tune the performance of existing programs


SQL Monitor & Classic monitoring tools
Open SQL, CDS and AMDP

Simplify your data models


CDS views, table functions, …

Build new apps optimized for SAP HANA from scratch


ABAP RESTful Programming Model for SAP Fiori CNA215

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 35


ABAP Platform Strategy – Further leveraging SAP HANA’s power

on premise on premise cloud

SAP Business Suite 1 SAP S/4HANA On Premise SAP S/4HANA Cloud SAP Cloud Platform ABAP
SAP NetWeaver hubs ABAP add-ons for SAP S/4HANA SAP Integrated Business Planning Environment
SAP NetWeaver add-ons Custom applications Extensions for SAP S/4HANA
Custom applications

SAP NETWEAVER AS FOR ABAP PLATFORM


SAP S/4HANA ABAP PLATFORM CLOUD
ABAP 7.5x 2 AS A SERVICE

NO STANDALONE ABAP PLATFORM


3
INSTALLATION WHITELISTED APIs
CLASSIC ABA LAYER
NEW ABA LAYER NEW ABA LAYER NEW ABA LAYER
ANY DB & SAP HANA
SAP HANA ONLY SAP HANA ONLY SAP HANA ONLY

MAINTENANCE
ONE COMMON ABAP PLATFORM INNOVATION CODELINE
CODELINE
1 2 3
ABAP 7.50 7.50, 7.51 and 7.52 starting with 1809 delivery
This is the current state of planning and may be changed by SAP at any time.
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 36
SAP TechEd online / SAP Community

Access replays of:


 Keynotes
 SAP TechEd live interviews
 Selected lecture sessions

http://sapteched.com/online

Continue your SAP TechEd discussion after


the event within SAP Community:
 Read and reply to blog posts
 Ask your questions
 Join conversations

sap.com/community
See all SAP TechEd blog posts

© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 37


Further information

Related SAP TechEd learning journeys


CNA6 – How to Move Your ABAP Skills to the Cloud and SAP HANA
CNA4 – How to get to SAP S/4HANA

Related SAP TechEd sessions


CNA120 – ABAP Strategy
CNA215 – Set the Big Picture of the ABAP RESTful Programming Model
CNA216 – A Technical deep dive into the ABAP RESTful Programming Model
CNA317 – Automated Testing with the ABAP RESTful Programming Model
CNA379 – Build a transactional SAP Fiori App with the ABAP Programming Model
CNA381 – Build a List Report App with SAP Fiori and the ABAP Programming Model
CNA654 – Build a SAP Fiori App with the ABAP Programming Model
CNA653 – Troubleshoot Your SAP Fiori App with ABAP Development Tools for Eclipse

Public SAP Web sites


ABAP Development Community: https://www.sap.com/community/topic/abap.html
SAP products: www.sap.com/products

SAP training and certification opportunities


www.sap.com/education
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 38
Thanks for attending this session.

Feedback Contact for further topic inquiries

Please complete your session Carine Tchoutouo Djomo


Product Management of Technology Platform
evaluation for CNA319. carine.tchoutouo.djomo@sap.com

Karl Kessler
Product Management of Technology Platform
karl.kessler@sap.com
© 2018 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 39

Vous aimerez peut-être aussi