Вы находитесь на странице: 1из 27

ABAP for SAP HANA with Fiori

2017 SAP SE or an SAP affiliate company. All rights reserved.


April, 25th 2017 1
Disclaimer

This presentation outlines our general product direction and should not be relied on in making a
purchase decision. This presentation is not subject to your license agreement or any other agreement
with SAP. SAP has no obligation to pursue any course of business outlined in this presentation or to
develop or release any functionality mentioned in this presentation. This presentation and SAP's
strategy and possible future developments are subject to change and may be changed by SAP at any
time for any reason without notice. This document 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. SAP assumes no responsibility for errors or omissions in this
document, except if such damages were caused by SAP intentionally or grossly negligent.

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 2


Todays Agenda
Welcome
Introduction to SAP
CodeJam and to SAP
Developer Center
Topic Overview
Getting Started:
Explore, Engage and
Network
SAP CodeJam is a 5 to 6 hours
hands-on coding and networking event
where attendees share their knowledge
and collaboratively develop with SAP
technologies, platforms and tools in a
fun and casual environment. The
events are developer community
focused and supported by SAP,
exploring technologies available
through the SAP Developer Center.
The SAP Developer Center is all a developer
needs to get started with SAP. Explore and
learn about the products and how they help
solve your problems. Get started with free
developer editions, tutorials, documentation and
more. Find more information at
developers.sap.com
Want your own event?
You can request your own event by simply sending
us an email. Select a topic of your choice, choose
three possible dates, tell us the maximum number of
people you can support (we prefer at least 25 to 40)
and send it to sapcodejam@sap.com. We will get
back to you as soon as we have an expert available.

For more details on the CodeJam program or the multiple topics we offer, check
out our page here: http://scn.sap.com/docs/DOC-37775
Questions?
Thomas Gauweiler Jens Weiler
Product Expert Product Expert
PI Tech Core ABAP Server PI Tech Core ABAP Server
Products & Innovation Products & Innovation

SAP SE | Germany SAP SE | Germany


thomas.gauweiler@sap.com jens.weiler@sap.com

If you have any questions or need more information on the SAP CodeJam program, please contact us at sapcodejam@sap.com

2017 SAP SE or an SAP affiliate company. All rights reserved.


Lets Get Started
ABAP for SAP HANA Fundamentals
ABAP Platform
Customers and main assets

Business Suite, 41,200 Productive ERP 6.0 systems (NW 7.x)


Business Warehouse, 8,020 Productive ERP systems on EhP 7 ( NW 7.4)
Partner,
Custom Code, 16,400 Productive BW systems
370 Partner add-ons
SAP NW / ABAP Platform 10,000 Custom ABAP dev. objects per customer system
5.1 million Registered modifications in SAP code
Database
4.5 million Registered ABAP developer

Rock solid and scalable server - Built for mission critical business systems
Effective programming environment - Built for the complete life cycle of business apps
Continuously extended - To serve new business scenarios

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 9


SAP NetWeaver Application Server ABAP 7.40 / 7.50
The go-to release for all SAP HANA-based ABAP applications

Some facts about the ABAP 7.40 / 7.50 Custom Applications

Enhancement package compatible with ABAP 7.x Process


SAP Business Business
Portal Orchestra-
Underlying application server for SAP BW 7.40 / Suite Warehouse
tion
7.50 and SAP Business Suite powered by SAP
HANA and S/4 HANA ABAP Development Tools for SAP NetWeaver

Supports SAP HANA and other databases


SAP NetWeaver AS ABAP 7.40/7.50
Includes optimizations for SAP HANA and
innovations independent of SAP HANA

Contains SAP NetWeaver Gateway and SAPUI5 SAP HANA Database Any DB
out-of-the-box

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 10


ABAP 7.4 for HANA The essential ingredients

SAP HANA as a platform


More than just a database

Code-to-Data as new paradigm


Push data-intensive calculations to the database

Eclipse as an integrated development environment


ABAP Development Tools for SAP NetWeaver (ADT)

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 11


Code-to-Data The new paradigm powered by SAP HANA

Code to Data (aka Code Pushdown): Delegation of data-intensive processing to the database layer

Calculation
AS ABAP

code
data
Data-to-Code Code-to-Data

SAP HANA Database


Calculation

Classic Approach New Approach


2017 SAP SE or an SAP affiliate company. All rights reserved. Public 12
Code-to-Data paradigm in ABAP powered by SAP HANA
Top-down approach ( AS ABAP 7.4 SP05)

Lifecycle Management
AS ABAP

Core Data Services ABAP Managed Standard ABAP


View Database Procedure Transport (CTS)

deploy deploy
SAP HANA

SAP HANA View Database Procedure

The recommended approach for ABAP development for SAP HANA

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 14


Open SQL Code Pushdown starts Here

Broader coverage of SQL standard starting with ABAP 7.4


SQL-92 Standard
Code pushdown support thru rich set of new language
features and reduction of existing limitations Enhanced Open SQL+
( ABAP 7.5)
Like SQL functions, expressions, aggregate functions
Enhanced Open SQL
New modern Open SQL syntax ( ABAP 7.4)

Comma separated list elements


Escaped host variables (with @) Open SQL
Classic syntax still supported (before ABAP 7.4)

Consumptions of associations

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 15


Open SQL More Expressiveness and Freedom

Open SQL expressions are evaluated by the database


Can be used at following positions
As element of the SELECT list or the GROUP BY list
As argument of a SQL (aggregate) function

Various types of expressions supported


Elementary expressions
String and arithmetic expressions
CASE, CAST and COALESCE expressions

Less restrictions
Enhanced JOIN support, Increased number of sub-queries,

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 16


Today
SAP NetWeaver Application Server for ABAP
Core Data Services: Common basis for domain-specific frameworks

Reusable and unified view model Search


for all use cases
Access
Annotations enabling flexible Analytics
Control
usage in different contexts

Integration of SAP HANA native Core


features through seamless Data
interaction with AMDP Services Compatibility
OData view

Efficient development in Eclipse

Business
Extensibility
Logic

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 17


Example of ABAP Core Data Services Usage at SAP

Graph Representation of a Data Model using the Association as Edges

S/4Hana Development System[1]


Number of CDS Views: 6.359
Number of Associations 8.005
Lines of Code in CDS Views: 316.603

[1] on July 2015


2017 SAP SE or an SAP affiliate company. All rights reserved. Public 18
ABAP CDS Advanced View Building at a Glance

Semantically rich data models Domain-specific annotations


Domain specific languages (DDL, QL, DCL) e.g. for UI, Analytics, OData, BW, SADL
@AnalyticsDetails.aggregationBehaviour: SUM
Declarative, close to conceptual thinking @ObjectModel.modelCategory: #BUSINESS_OBJECT

Fully compatible with Any DB Associations


Generated and managed SQL views Simplified definition of views on top of views
Integrated in standard Lifecycle Mgmt Path expressions to navigate along relations

Built-in functions and expressions Extensible


e.g. sum( salesorder.gross_ammount ) On model level thru extensions
substring(bp.company_name,0,10) as name On meta-model level thru annotations

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 19


ABAP CDS Built-in Functions and Expressions

Generic SQL Conversion Arithmetic Date and Time


String Functions
Expressions Functions Functions Functions

Simple- / Searched- Unit Conversion Concat Abs Days between


Case Currency Concat with Space Ceil Add Days
Coalesce Conversion Instr Div (Integer) Add Month
Cast Left / Right Division (Dec) Current Tmstp
Hex2Bin Length Floor Date is Valid
Bin2Hex Lpad / Rpad Mod Tmstp is Valid
Decimal Shift Ltrim / Rtrim Round Seconds btw.
Replace Tmstps
Add seconds

Aggregations (Count, Sum, Max, Min) not listed above

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 20


TM
ABAP CDS Development Environment in Eclipse

Integrated in the eclipse-based


ABAP Development Tools

Textual and graphical editors

Rich feature set for fast


development
Code completion
Enhanced data preview
Quick-Fix function
Syntax highlighting

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 21


Code Breakouts for SAP HANA

Some scenarios require selective measures; aka Breakout


Scenarios
Highest performance requirements e.g. with complex calculations
Use of specialized engines and function libraries required
Open SQL and CDS views are not sufficient to solve problem

But!
Database-specific
Currently SAP HANA DB only
No automatic fallback for Any DB

Solution provided thru the ABAP Managed Database


Procedures (AMDP) framework

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 22


AMDP Development & Lifecycle Management

ABAP classes as container for SQLScript source code

SQLScript source code editing in ABAP tools in eclipse


Static syntax check
Syntax and background highlighting

Fully integrated in the ABAP infrastructure Update


Exception handling via catchable and handleable exceptions screenshot
Support for runtime analysis in ST22 and debugging tools
Lifecycle management analog to regular ABAP classes
HANA artifacts solely managed by the ABAP server

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 24


How can my custom ABAP code benefit from SAP HANA?
Recommended approach

1. How to detect adjustable ABAP code?


Functional and performance considerations
Detect
2. How to optimize ABAP code?
How to apply the code-to-data paradigm to ABAP code

3. Explore new opportunities


Optimize
How to integrate the powerful SAP HANA features in ABAP
Rethink & innovate
Explore

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 29


The Data Model
Enterprise Procurement Model (EPM)

Business
Invoice Header Sales Order Header
Partner

Invoice Item
Sales Order Item

Product

More information can be found on SCN:


http://scn.sap.com/docs/DOC-31458
2017 SAP SE or an SAP affiliate company. All rights reserved. Public 30
Steps of todays CodeJam

1. ABAP Development Tools in Eclipse (ADT)


2. ABAP Test Cockpit & SQL Monitor (ATC & SQLM)
3. Core Data Services (CDS)
4. Open SQL (OSQL)
5. ABAP managed Database Procedures (AMDP)

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 31


Last not least

Dwell on the things which are of interest for


Move at your own speed! It is not important
you. Try out things on your own and feel free
to complete all exercises.
to ask your questions.

2017 SAP SE or an SAP affiliate company. All rights reserved. Public 32


Lets Get Started
ABAP for SAP HANA