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 systems Effective programming environment - Built for the complete life cycle of business apps Continuously extended to serve new business scenarios
SAP Business Suite & Suite on HANA SAP Suite AnyDB
SAP Suite on Hana
SAP NW AS ABAP 7.x
SAP NW AS ABAP 7.4
AnyDB
SAP HANA
ABAP Platform in 2015 – Some numbers 41.200 Productive ERP 6.0 systems (NW 7x) 8020 Productive ERP systems on new EhP 7 (NW 74x) 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,…
NW / ABAP Platform DB
41.200 8.020 16.400 370 10.000 5,1 million 4,5 million
Productive ERP6.0 systems (NW 7x) Productive ERP systems on new EhP 7 ( NW 74x) Productive BW systems Partner add-ons Custom ABAP dev. objects per customer system Registered modifications in SAP code 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
© 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 NW AS ABAP
SAP NW AS ABAP
AnyDB
SAP HANA
SAP HANA
SAP NW AS ABAP
Real-time simplified
SAP HANA
SAP Fiori Cloud
SAP S/4HANA on premise SAP S/4HANA
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 Highlights at a glance
i
DEV201(L2) 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
SAP HANA: ABAP managed code pushdown Mainstream for ABAP code pushdown
i
DEV266(H2) Building Applications with ABAP Using Code Pushdown to the Database
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 HCP Web IDE
Frontend
ABAP Development Tools
General App Architecture
SAP AS ABAP 7.4
Fiori App
Gateway
CDS
Open SQL
AMDP
SAP HANA Views / Tables
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Procedures
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 of their open invoices to category „C“, „D“ or „S“.
Customer Invoices . the amount of open invoices 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 of their open invoices to category „C“, „D“ or „S“.
Customer Invoices . the amount of open invoices 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
i
Overview Superior toolset for ABAP development with high developer productivity
DEV163(H2) Code Better with ABAP in Eclipse
SAP HANA Cloud
Central update site
Powerful source code editor, incl. refactoring support ABAP for SAP HANA tools Web Dynpro ABAP tools and FPM integration New SQL development tools, incl. the new ABAP SQL console Troubleshooting tools like debugger, tracing, dump analysis Quality tools for static code checks and unit testing
https://tools.hana.ondemand.com
SAPUI5 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 Several SAP development tools available: UI5, BW, Gateway, Java... © 2015 SAP SE or an SAP affiliate company. All rights reserved.
SAP HANA
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
…
HANA XS
ABAP
Next generation data definition and access for database centric applications
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
Cross-platform unified abstraction layer – similar to OData for UI abstraction Maximum transparency for different programing models Integrates with platform lifecycle management Fully transparent SQL extensions Extends native SQL means for higher productivity
Public
21
Core Data Services (CDS)
i
At a glance
DEV200(L2) 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) Declarative, close to conceptual thinking
e.g. for UI, Analytics, OData, BW,…
Fully compatible with AnyDB
Associations
Generated and managed SQL views Native integration in SAP HANA
Simplified definition of views on top of views Path expressions to navigate along relations
Several built-in functions like
Extensible
sum (salesorder.gross_ammount) substring (bp.company_name, 0, 10) as name
On model level thru extensions On meta-model level thru annotations
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
@AnalyticsDetails.aggregationBehaviour: SUM
Public
22
Core Data Services (CDS) What happened to Table access ?
I_… I_…
C_SO_UI
C_MY_UI
I_BusinessPartner
I_SalesDocument
CDS
Consumption Views
Business Suite Tables
VBAK
I_… I_…
Tables
Virtual Data Model
VEDA
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
Open SQL Enhancements
i
DEV266(H2) 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 JOINs, sub-queries, aggregate functions, SQL functions, expressions and literal values as column information after SELECT Increased number of sub-queries, ... and more
Standardized Open SQL (≥ ABAP 7.5) Enhanced Open SQL (ABAP 7.4)
New syntax introduced with ABAP 7.4 Comma separated SELECT list Escaping of host variables with “@”
Open SQL (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
i
ABAP Managed Database Procedures (AMDP) AMDP provided by means of methods of global classes marked with tag interfaces
Lifecycle Mgmt AS ABAP
AMDP classes and AMDP methods Called like any other regular ABAP methods Modification-free extension via AMDP BAdIs
Integrated in and managed by the ABAP infrastructure
AMDP (class/method)
Standard ABAP Transport (CTS)
deploy
SAP HANA
Procedure created at first AMDP call Detailed analysis of runtime errors in ST22 Transport analog to regular ABAP classes
DEV266(H2) Building Applications with ABAP Using Code Pushdown to the Database
SAP HANA 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 AMDP classes
Only ABAP implementation possible ABAP or SQLScript implementation possible
CLASS CL_AMDP_SAMPLE DEFINITION. PUBLIC SECTION. INTERFACES IF_AMDP_MARKER_HDB. METHODS method_1 IMPORTING it_param EXPORTING et_param
TYPE type1 TYPE type2.
METHODS method_2 IMPORTING VALUE(it_param) TYPE type1 EXPORTING VALUE(et_param) TYPE type2 CHANGING VALUE(ch_param) TYPE type3. ENDCLASS.
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
CLASS CL_AMDP_SAMPLE IMPLEMENTATION. *
METHODS method_1. ABAP source code ... ENDMETHOD.
Additions for AMDP methods
METHOD method_2 BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLScript [OPTIONS db_options] [USING name1 name2 etc..]. --write clever native SQLScript code here -- ... ENDMETHOD. ENDCLASS.
Public
30
ABAP Managed Database Procedures Exception Handling Catchable Exceptions Several AMDP runtime errors have a corresponding (catchable) exception Naming convention:
!
CX_
To-Dos for AMDP Developers/Consumers: – Add RAISING clause to the AMDP method definition – Enclose the AMDP call in a TRY… CATCH block
"definition METHODS RAISING cx_amdp_error. ... "consumption TRY. 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
i
Consumption of ABAP Artifacts & Implementations
INT260(H4) Develop an E2E Integration Scenario with SAP Gateway, SAP HANA, and SAPUI5
CDS View Consumption
Java
OData service can be easily bound to an SAPUI5 control
HANA XS
Completely modeled approach; no coding needed for read operations
ABAP
Direct mapping of CDS views to an entity set in an OData service
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
On Premise
HCP
Destinations (e.g. M36)
Pointing to
Applications Consuming OData Services WebIDE Deploy
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
SAP Cloud Connector
Platform Cockpit SAP AS ABAP SAP Gateway
SAP UI5 ABAP Repository
Public
38
The End-2-End Scenario Master Detail Application Master / Detail View Master
Details
Controls: master.view.xml
Controls: detail.view.xml
Logic: master.controller.js
Logic: 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 of their open invoices to category „C“, „D“ or „S“.
Customer Invoices . the amount of open invoices 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 Fiori / ABAP technology to speed up Development Application Development Effort for existing Applications
i
TEC101(L2) ABAP Roadmap
Fiori Frontend development Technology Investment: Fiori Building Blocks (Smart Controls and Smart Templates)
• Design efforts for Application Development reduced • UI development efforts reduced
+ Design
Service/Backend Enablement
Frontend Fiori UI Development
Technology Investment: Application Infrastructure (CDS, SADL, BOPF, Draft, and Gateway)
• Key enabler for Fiori Programming Model • Allows step-wise transition towards SAP S/4HANA Backend
Service Enablement
Application Logic Refactor application logic • Create Virtual Data Model
Application Logic
© 2015 SAP SE or an SAP affiliate company. All rights reserved.
• Decouple application logic from UI and simplify in a step-wise approach (not required for new applications) 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 [email protected] @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 SE’s 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 forwardlooking 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