You are on page 1of 48

DEV301 Building an End-to-End App from

SAP HANA to SAP Fiori via ABAP

Public
Speakers

Las Vegas, Oct 19 - 23 Barcelona, Nov 10 - 12

Jens Weiler Jens Weiler


Ingo Braeuninger Dr. Thomas Gauweiler

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


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.

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 3


Agenda

Welcome & Intro


ABAP for SAP HANA Overview
The Scenario
A. Overview
B. ABAP Development Tools for Eclipse aka ABAP in Eclipse
C. Core Data Services (CDS)
D. Open SQL
E. ABAP managed Database Procedures (AMDP)
F. SAP Gateway
G. SAP UI5 using the WebIDE
Summary & Outlook

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 4


Introduction

ABAP for SAP HANA at a glance

Public
ABAP Platform Today
Foundation for SAP Business Suite

Key Assets
Rock solid and scalable - Built for mission critical business SAP Business Suite
systems & Suite on HANA
Effective programming environment - Built for the SAP Suite AnyDB SAP Suite on Hana

complete life cycle of business apps


Continuously extended to serve new business scenarios

ABAP Platform in 2015 Some numbers


41.200 Productive ERP 6.0 systems (NW 7x) SAP NW AS ABAP 7.x SAP NW AS ABAP 7.4

8020 Productive ERP systems on new EhP 7 (NW 74x) AnyDB SAP HANA

4,5 million registered ABAP Developers

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 6


ABAP Platform Customers and main assets

Business Suite, BW, Partner,


Custom Code, 41.200 Productive ERP6.0 systems (NW 7x)
8.020 Productive ERP systems on new EhP 7 ( NW 74x)
16.400 Productive BW systems
370 Partner add-ons
10.000 Custom ABAP dev. objects per customer system
NW / ABAP Platform 5,1 million Registered modifications in SAP code
4,5 million Registered ABAP developer
DB

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

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 7


ABAP Platform
The transformation to SAP S/4HANA
SAP S/4HANA cloud
SAP S/4 HANA

Classic Suite & Suite on HANA


SAP Suite AnyDB SAP Suite on Hana

SAP HANA SAP NW AS ABAP

Real-time simplified SAP HANA

SAP Fiori
SAP NW AS ABAP SAP NW AS ABAP SAP S/4HANA on premise
Cloud SAP S/4HANA
AnyDB SAP HANA

SAP NW AS ABAP

SAP HANA

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 8


SAP NetWeaver Application Server for AS ABAP DEV201(L2)

Highlights at a glance
i Overview of Development with ABAP for
SAP HANA

ABAP application development further optimized for SAP HANA

New ABAP language features for more simple and concise code

Increased developer efficiency in Eclipse

Efficient programming model for SAP Fiori applications

Increased coverage of SQL standard

Industry 4.0 and big data scenarios support

Tool support for migration to SAP S/4HANA


and more

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


New scenarios: Exploit SAP HANA in productive applications

Performance relevant ABAP logic Open SQL, Core Data Services, Procedures

ABAP managed
Code Pushdown

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


DEV266(H2)
SAP HANA: ABAP managed code pushdown i Building Applications with ABAP Using
Code Pushdown to the Database

Mainstream for ABAP code pushdown Code-Breakouts


Exploit native SAP HANA features

Extended ABAP SQL Interface (DDIC) New ABAP native HANA Interface

OPEN SQL ABAP Managed DB Procedure (AMDP)


Core Data Services (CDS) Table functions (Call AMDPs from CDS)

ABAP like development, transport, correction and troubleshooting

Easy to learn for ABAP developers

Exploits all native capabilities of SAP HANA

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


The End-2-End Scenario

A. Overview

Public
An End-2-End Example
General App Architecture

Web IDE
Frontend

HCP
Fiori App

Development Tools
SAP AS ABAP 7.4

Gateway
ABAP

CDS Open SQL AMDP

SAP HANA
Views / Tables Procedures

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 13


The Data Model for todays exercise
Enterprise Procurement Model (EPM)

More information can be found on SCN:


http://scn.sap.com/docs/DOC-31458
2015 SAP SE or an SAP affiliate company. All rights reserved. Public 14
The End-2-End App
Overview

Customer Information
Detailed information on the
selected customer

Customer List
classified by the number Customer Invoices
of their open invoices to . the amount of open invoices
category C, D or S. of the selected customer
converted to US Dollar

Customer Product Info


Top products of the selected
customer seperated by each
month

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


The End-2-End App
Overview

Customer Information
Detailed information on the
selected customer

Customer List
classified by the number Customer Invoices
of their open invoices to . the amount of open invoices
category C, D or S. of the selected customer
converted to US Dollar

Customer Product Info


Top products of the selected
customer seperated by each
month

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


The End-2-End Scenario

B. ABAP Development Tools for Eclipse

Public
ABAP Development Tools DEV163(H2)

Overview
i Code Better with ABAP in Eclipse

Superior toolset for ABAP development with high


SAP HANA
developer productivity Central update site Cloud
Powerful source code editor, incl. refactoring support
ABAP for SAP HANA tools
Web Dynpro ABAP tools and FPM integration https://tools.hana.ondemand.com
New SQL development tools, incl. the new ABAP SQL console
Troubleshooting tools like debugger, tracing, dump analysis
SAPUI5
Quality tools for static code checks and unit testing
Add On

Open & Extensible ABAP


Gateway
SDK for partner and customer extensions
Eclipse Marketplace & Community Cloud
Java
Integration of various development aspects in one IDE
SAP HANA
Several SAP development tools available: UI5, BW, Gateway, Java...

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 18


Your Development Tools
SAP Development Tools for Eclipse

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


The End-2-End Scenario

C. Creating the view for the Customer List using


Core Data Services (CDS)

Public
Core Data Services (CDS)
Building block for timeless software

Next generation data definition and access


for database centric applications
Cross-platform unified abstraction layer similar to
OData for UI abstraction
HANA XS

Maximum transparency for different programing


ABAP

models
Integrates with platform lifecycle management
Fully transparent SQL extensions
Extends native SQL means for higher productivity

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


Core Data Services (CDS) DEV200(L2)

At a glance
i Core Data Services: Next-Generation Data
Definition and Access on SAP HANA

Semantically rich data models Domain-specific Annotations


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

Fully compatible with AnyDB Associations


Generated and managed SQL views Simplified definition of views on top of views
Native integration in SAP HANA Path expressions to navigate along relations

Several built-in functions like Extensible


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

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


Core Data Services (CDS)
What happened to Table access ?

Consumption Views C_SO_UI C_MY_UI I_


I_

CDS
Virtual Data Model I_BusinessPartner I_SalesDocument I_
I_

Tables
VBAK VEDA
Business Suite Tables BUT000
VBKD

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 23


Demo Customer List
CDS Views
2015 SAP SE or an SAP affiliate company. All rights reserved. 24
The End-2-End Scenario

D. Getting the data for the open invoice information of a customer using
Open SQL

Public
DEV266(H2)
Open SQL Enhancements i Building Applications with ABAP Using
Code Pushdown to the Database

Broader coverage of standard SQL features


SQL-92 Standard
Better code pushdown support thru new language features
and reduction of existing limitations Standardized Open SQL
JOINs, sub-queries, aggregate functions, SQL functions, expressions ( ABAP 7.5)
and literal values as column information after SELECT
Enhanced Open SQL
Increased number of sub-queries, ... and more
(ABAP 7.4)

New syntax introduced with ABAP 7.4


Comma separated SELECT list Open SQL
Escaping of host variables with @ (before ABAP 7.4)

Consumption of Associations

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 26


Demo
Open SQL
2015 SAP SE or an SAP affiliate company. All rights reserved. 27
The End-2-End Scenario

E. Retrieving the Customer Detail Information using


ABAP managed database procedures (AMDP)

Public
DEV266(H2)
ABAP Managed Database Procedures (AMDP) i Building Applications with ABAP Using
Code Pushdown to the Database

AMDP provided by means of methods of Lifecycle Mgmt


global classes marked with tag interfaces

AS ABAP
AMDP classes and AMDP methods
Called like any other regular ABAP methods AMDP Standard ABAP
Modification-free extension via AMDP BAdIs (class/method) Transport (CTS)

Integrated in and managed by the ABAP deploy


infrastructure
Procedure created at first AMDP call

HANA
SAP
Detailed analysis of runtime errors in ST22 SAP HANA
Transport analog to regular ABAP classes Procedure

SQLScript source code editing in ABAP editor


Static syntax check and syntax coloring for SQLScript code
Background coloring for embedded languages

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


ABAP Managed Database Procedures (AMDP)
AMDP class at a glance

Tag interface for CLASS CL_AMDP_SAMPLE DEFINITION. CLASS CL_AMDP_SAMPLE IMPLEMENTATION.


AMDP classes PUBLIC SECTION. METHODS method_1.
INTERFACES IF_AMDP_MARKER_HDB. * ABAP source code
... Additions for
ENDMETHOD. AMDP methods
Only ABAP METHODS method_1
implementation IMPORTING it_param TYPE type1 METHOD method_2 BY DATABASE PROCEDURE
possible EXPORTING et_param TYPE type2. FOR HDB
LANGUAGE SQLScript
METHODS method_2 [OPTIONS db_options]
ABAP or IMPORTING VALUE(it_param) TYPE type1 [USING name1 name2 etc..].
SQLScript EXPORTING VALUE(et_param) TYPE type2
implementation --write clever native SQLScript code here
CHANGING VALUE(ch_param) TYPE type3.
possible --
ENDCLASS.
...
ENDMETHOD.
ENDCLASS.

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 30


ABAP Managed Database Procedures
Exception Handling

Catchable Exceptions
Several AMDP runtime errors have a corresponding
(catchable) exception
Naming convention:
!
<ERROR_NAME> CX_<ERROR_NAME>

To-Dos for AMDP Developers/Consumers: "definition


METHODS <method_name>
Add RAISING clause to the AMDP method definition <method_interface>
RAISING cx_amdp_error.
Enclose the AMDP call in a ...
TRY CATCH block
"consumption
TRY.
<method_call>

CATCH cx_amdp_execution_failed INTO DATA(lx).


"do some meaningful error handling
ENDTRY.

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


Demo Customer Info
AMDP
2015 SAP SE or an SAP affiliate company. All rights reserved. 32
The End-2-End Scenario

F. Creating the OData services using


SAP Gateway

Public
SAP Gateway OData INT260(H4)

Consumption of ABAP Artifacts & Implementations


i Develop an E2E Integration Scenario with
SAP Gateway, SAP HANA, and SAPUI5

CDS View Consumption


Direct mapping of CDS views to an
entity set in an OData service
Completely modeled approach; no

HANA XS
coding needed for read operations

ABAP

Java
OData service can be easily bound to
an SAPUI5 control
Implementation using Open SQL and
AMDP in the generated Classes

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 34


The End-2-End Scenario
OData ER Model

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 35


Demo OData Services
SAP Gateway
2015 SAP SE or an SAP affiliate company. All rights reserved. 36
The End-2-End Scenario

G. Display the data in a browser using


SAP UI5 - Fiori

Public
The End-2-End Scenario
UI5 Development

HCP On Premise

Platform Cockpit

SAP Cloud Connector


Destinations (e.g. M36) SAP AS ABAP
Pointing to

SAP Gateway
Applications
Consuming OData Services
WebIDE
SAP UI5 ABAP Repository

Deploy

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 38


The End-2-End Scenario
Master Detail Application

Master / Detail View

Master Details
Controls: Controls:
master.view.xml detail.view.xml
Logic: Logic:
master.controller.js detail.controller.js

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 39


Demo UI 5 Development
SAP HCP Web IDE
2015 SAP SE or an SAP affiliate company. All rights reserved. 40
Summary & Outlook

Public
The End-2-End App
Done !

Customer Information
Detailed information on the
selected customer

Customer List
classified by the number Customer Invoices
of their open invoices to . the amount of open invoices
category C, D or S. of the selected customer
converted to US Dollar

Customer Product Info


Top products of the selected
customer seperated by each
month

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 42


Development Efficiency TEC101(L2)

Fiori / ABAP technology to speed up Development


i ABAP Roadmap

Application Development Effort Fiori Frontend development


for existing Applications Technology Investment: Fiori Building Blocks
(Smart Controls and Smart Templates)
+ Design Design efforts for Application Development reduced
UI development efforts reduced

Frontend Service/Backend Enablement


Fiori UI Technology Investment: Application Infrastructure
Development (CDS, SADL, BOPF, Draft, and Gateway)
Key enabler for Fiori Programming Model
Allows step-wise transition towards SAP S/4HANA
Service
Enablement Application Logic
Backend
Refactor application logic
Create Virtual Data Model
Application
Decouple application logic from UI and
Logic
simplify in a step-wise approach
(not required for new applications)
2015 SAP SE or an SAP affiliate company. All rights reserved. Public 43
Demo
Fiori App in 7.50
2015 SAP SE or an SAP affiliate company. All rights reserved. 44
SAP TechEd Online
Continue your SAP TechEd education after the event!

Access replays of keynotes, Demo Jam, SAP TechEd live interviews, select lecture sessions, and more!
Hands-on replays

http://sapteched.com/online

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 45


Further Information

Related SAP TechEd sessions:


DEV265, DEV200, DEV260, DEV262, DEV261, TEC106, DEV201, INT260

SAP Public Web


scn.sap.com/community/abap/hana
scn.sap.com
www.sap.com

SAP Education and Certification Opportunities


www.sap.com/education
ABAP 4 HANA openSAP course
HA400 - ABAP Programming for SAP HANA

Watch SAP TechEd Online


www.sapteched.com/online

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 46


Feedback
Please complete your session evaluation for
DEV301
Contact information:
Jens Weiler
ABAP for SAP HANA Evangelist
jens.weiler@sap.com
@ABAP4H

Thanks for attending this SAP TechEd session.


2015
2015
SAP
SAP
SESE
oror
anan
SAP
SAP
affiliate
affiliate
company.
company.
AllAll
rights
rights
reserved.
reserved. Public 4747
2015 SAP SE or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate
company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.

Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.

National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its
affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company products and
services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as
constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop
or release any functionality mentioned therein. This document, or any related presentation, and SAP SEs or its affiliated companies strategy and possible future
developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time
for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. 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.

2015 SAP SE or an SAP affiliate company. All rights reserved. Public 48