For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Application Development for SAP HANA
. .
PARTICIPANT HANDBOOK INSTRUCTOR-LED TRAINING . Course Version: 13 Course Duration: Minutes Material Number: 50136317
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
SAP Copyrights and Trademarks
© 2016 SAP SE or an SAP affiliate c ompany. ompany. All rights reserved.
No part of this publication publication may be be reproduced or transmitted transmitted in any form or for any purpose 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 product specifications may may vary. vary. These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, only, without without representation or warranty of any kind, kind, and SAP SE or its 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 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 outlined in this document document or any related related presentation, or to to develop or release any any functionality mentione mentioned d therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, developments, products, and/or platform directions directions and functionality functionality are all subject to change change and may be be changed by SAP SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, commitment, promise, or l egal obligation to deliver any material, code, or functionality. All forward-looking statements 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.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Typographic Conventions
American English is the standard used in this handbook. The following typographic conventions are also used.
This information is displayed in the instructor ’s presentation
Demonstration
Procedure
Warning or Caution
Hint
Related or Additional Information
Facilitated Discussion
User interface control
Example text
Window title
Example text
© Copyright. All rights reserved.
iii
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
iv
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Contents
vii
Course Overview
1
Unit 1:
Introduction
2
Lesson: Introducing SAP HANA
4
Lesson: Describing SAP HANA architecture
10
Lesson: Comparing XS Classic and XS Advanced
14
Lesson: Introducing SAP HANA Express Edition
21
Unit 2:
Development Tools
22
Lesson: Introducing XS Advanced Application Development Tools
30
Lesson: Introducing SAP HANA Studio
38
Lesson: Developing for SAP HANA XS Classic
49
Unit 3:
Building UIs with SAPUI5
50
Lesson: Introducing JavaScript
57
Lesson: Introducing SAPUI5
58
Lesson: Creating a SAPUI5 Project
61
Lesson: Structuring SAPUI5 application project
64
Lesson: Applying Model View Controller paradigm
70
Lesson: Describing common UI controls
78
Lesson: Binding UI to data
91
Unit 4:
92
The Project in SAP HANA XS Classic and Advanced Lesson: Comparing the XS Classic and XS Advanced development process
96
Lesson: XS Advanced Multi Target Application
105
Lesson: Creating a XS Advanced Project
107
Lesson: Using the SHINE application
110
Lesson: Creating a XS Classic Project
121
Unit 5:
The Persistence Model
122
Lesson: Core Data Services in XS Advanced
129
Lesson: Core Data Services in XS Classic
139
Unit 6:
OData Services
140
Lesson: Using OData to connect the UI to the back end
148
Lesson: OData Services on XS Advanced
© Copyright. All rights reserved.
v
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
151
SQLScript
152
Lesson: Introducing SQLScript
156
Lesson: Developing in SQLScript
159
Lesson: Debugging SQLScript
164
Lesson: Using main SQLScript language features
169
Lesson: Using SQLScript functions
171
Lesson: Using SQLScript Triggers
173
Lesson: Introducing the R Language
179
vi
Unit 7:
Unit 8:
Server Side JavaScript
180
Lesson: Introduction to Server Side JavaScript
184
Lesson: Create a Node.js Module
190
Lesson: Executing a Node.js Module
194
Lesson: Accessing the Database
200
Lesson: Debugging a Node.js Module
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Course Overview
TARGET AUDIENCE This course is intended for the following audiences: ●
Developer
●
Development Consultant
© Copyright. All rights reserved.
vii
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
viii
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
UNIT 1 Introduction
Lesson 1 Introducing SAP HANA
2
Lesson 2 Describing SAP HANA architecture
4
Lesson 3 Comparing XS Classic and XS Advanced
10
Lesson 4 Introducing SAP HANA Express Edition
14
UNIT OBJECTIVES ●
Introduce SAP HANA
●
Explain the system architecture and the impacts o n development model
●
Compare the XS Classic and XS Advanced ecosystem
●
Introduce SAP HANA Express Edition
© Copyright. All rights reserved.
1
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Unit 1 Lesson 1 Introducing SAP HANA
LESSON OVERVIEW LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Introduce SAP HANA
SAP HANA Introduction Scenario Your company is growing rapidly. In order to accelerate the pace of innovation, and take leadership within the market, your company needs an in-memory platform that runs analytics applications and business processes faster, and runs data infrastructures in a simpler way.
Figure 1: One Platform — Any Application
2
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Lesson: Introducing SAP HANA
Figure 2: Cloud Offerings Overview
LESSON SUMMARY You should now be able to: ●
Introduce SAP HANA
© Copyright. All rights reserved.
3
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Unit 1 Lesson 2 Describing SAP HANA architecture
LESSON OVERVIEW LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Explain the system architecture and the impacts on development model
System Architecture and Development Models
Figure 3: SAP HANA Platform
4
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Lesson: Describing SAP HANA architecture
Figure 4: SAP Cloud Powered by SAP HANA: Product Portfolio
The SAP cloud portfolio is the most comprehensive portfolio on the market today. It is designed to unlock all of the new possibilities of cloud computing for our customers, as well as to help customers speed up their adoption of SAP HANA innovations. The above figure outlines the following SAP cloud portfolio offerings: On Premise
Within your own data center, you can apply cloud-like setups, by p rovisioning and using SAP systems in an agile manner (virtualized, elastic scaling through lif ecycle management tools, and so on). SAP HANA Enterprise Cloud:
Enterprise-class, SAP HANA managed, cloud offering infrastructure, and managed services, on a monthly subscription. The focus use cases are as follows: SAP Business Suite on HANA, SAP Business Warehouse on HANA, SAP HANA Data Marts. The main activities are as follows: End-to-end assessment, migration, application maintenance, and operation in a managed cloud environment. Individual projects focus on specific customer needs. SAP HANA Cloud Platform
Fully-featured SAP HANA and Platform-as-a-Service (PaaS) offering in a cloud environment, on a monthly subscription basis. Focus use cases are as follows: Quick provisioning of SAP HANA for trials, prototypes, dev/test and production, develop net new applications on top of HANA, and extensions to cloud and on-premise applications (for example, SAP SuccessFactors). Software-as-a-Service
SAP delivers the industry's broadest portfolio of cloud-based business solutions, giving customers the flexibility, choice, and control needed to drive innovation and agility into their businesses. Net new applications, in areas areas such as sports and health, business network applications applications for business-to-business collaboration (Ariba), and social applications for people to people collaboration (SAP Jam) are also also emerging. As a commerce commerce platform that will be more tightly integrated into the SAP HANA Cloud Platform portfolio, Hybris is the solution of choice.
© Copyright. All rights reserved.
5
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Unit 1: Introduction
Our portfolio is built on a common platform, SAP HANA. Through this approach, we make our entire portfolio available to the application, development, and integration services, along with the SAP HANA database, analytics, and the foundational capabilities of SAP HANA.
Figure 5: 3-Tier Applications (Java, ABAP) vs. Native SAP HANA Applications
In traditional, 3-tier applications, especially from S AP, AP, the database is largely used as a data store mechanism only. Massive queries bring large amounts of data back to the application server for processing. Lots of application execution time is spent in the application server, looping over records, performing exclusions and calculations, and so on. This requires database buffers at the application server level. It also means that most of the computing resources are allocated to several, large application servers, as the bulk of the logic is performed at this level. With SAP HANA, the key to the best application performance is to push as much of the logic execution into the database as possible. We now keep all data-intensive logic down in the database as SQL, SQLScript, and HANA views. Lightweight imperative logic, flow logic, and service enablement can be down at the Extended Application Services (XS) level. XS is not like a traditional application service - there is no database buffering and it is stateless only. XS hould be treated as a light, pass-through layer only. Finally, Finally, the complete UI r endering and processing should be done in the client device. Any client-side UI development model can be used, although, as we will see l ater, SAP provides SAPUI5 (HTML5 libraries and development tools), as well as UI integration services (open social based, lightweight portal). SAP HANA provides static HTML content and JavaScript libraries. It also exposes data and logic, via pure REST data services. The UI creation, presentation logic, and data injection injection should all happen on the client side.
6
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Lesson: Describing SAP HANA architecture
SAP HANA Platform: Advantages
Figure 6: SAP HANA Platform: Advantages 1/3
Figure 7: SAP HANA Platform: Advantages 2/3
Figure 8: SAP HANA Platform: Advantages 3/3
© Copyright. All rights reserved.
7
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Unit 1: Introduction
Figure 9: Development Model for SAP HANA Based Native Applications
Figure 10: SAP HANA Extended Application Application Services: Overview
Figure 11: A New Paradigm: Code to Data
8
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Lesson: Describing SAP HANA architecture
Figure 12: XS Architecture
XS Evolves Into XS Advanced Requirements change over time, and so too has XS within SAP HANA. SAP HANA extended application services advanced model, in SPS 11, represents an evolution of the application server architecture. It builds upon the previous strengths of XS, while expanding the technical scope. SAP HANA extended application services (XS) advanced model is a new run-time environment for application development. SAP recommends that customers and partners evaluate the new capabilities of SAP HANA XS advanced model with this release (SPS 11). LESSON SUMMARY You should now be able to: ●
Explain the system architecture and the impacts o n development model
© Copyright. All rights reserved.
9
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Unit 1 Lesson 3 Comparing XS Classic and XS Advanced
LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Compare the XS Classic and XS Advanced ecosystem
XS Classic and XS Advanced Ecosystems
Figure 13: XS Classic Ecosystem
In XS Classic, the following components are used to develop native HANA applications: ●
HANA Studio for administration and development.
●
HANA web-based workbench for development.
●
HANA cockpit for administration.
●
Design time repository (repo) in HANA.
●
Web server and XS Engine, supporting web content and JS execution.
●
●
10
Native development UI, UI, as well as business logic and data modeling modeling in HANA. Deploy delivery units.
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Lesson: Comparing XS Classic and XS Advanced
Figure 14: XS Advanced Ecosystem
With XS Advanced, new components are introduced to develop applications on HANA: ●
Web and cloud centric, scalable, PaaS-like architecture.
●
Cloud foundry-like application runtimes.
●
(Java, Node.JS, …) running in separate processes.
●
Web-based tools for developers and administrators. There is no Eclipse/ HANA Studio support.
●
SAP Web IDE and server-side development infrastructure ( DI).
●
HANA container isolation and activation (HDI).
●
Deploy MTA archives.
Note: The XSA stack runs side by side with the XSC stack, in SPS11
© Copyright. All rights reserved.
11
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Unit 1: Introduction
Figure 15: Ecosystems Comparison
The following list provides a high-level comparison of the XS Classic and the XS Advanced ecosystems: XS Classic
Advantages: ●
Familiar development environment (HANA Studio, Web IDE and the HANA repository).
●
It is a full system in one offering.
●
Supports JavaScript as application runtime.
●
Direct access to database objects.
●
Integrated transportation management.
Disadvantages: ●
Single source code repository per system.
●
Limited scalability due to tight coupling with the database.
●
Requires database authorization management.
●
Requires additional systems for production emergency fix delivery. delivery.
XS Advanced
Advantages: ●
Application layer can be separate from the database.
●
Supports different runtime containers. For example,. Node.js (JavaScript), Java, C++.
●
Highly scalable, due to container concept.
●
Advanced Git/ Gerrit source code management.
●
Advanced resource management per container. container.
Disadvantages:
12
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Lesson: Comparing XS Classic and XS Advanced
●
Additional HANA software components to be installed.
●
External source code repository to be set up.
●
Additional development knowledge necessary to create database objects.
LESSON SUMMARY You should now be able to: ●
Compare the XS Classic and XS Advanced ecosystem
© Copyright. All rights reserved.
13
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]
Unit 1 Lesson 4 Introducing SAP HANA Express Edition
LESSON OBJECTIVES After completing this lesson, you will be able to: ●
Introduce SAP HANA Express Edition
HANA Express Edition Introduction
Figure 16: SAP HANA Express Edition 2.0
SAP HANA express edition is a streamlined version of SAP HANA, optimized for fast and continuous application development. It can be used on a laptop, personal computer, server, or in the cloud, wi th flexible development and deployment options. SAP HANA express edition is based on SAP HANA SPS 2. It is free up to 32 GB of memory use, but this can be expanded to 128GB for a fee. SAP HANA express edition contains all of the essential HANA features, yet it utilizes a smaller footprint. There is no need for hardware certification — a minimum 16GB memory recommended. It also allows production use. Installation Options ●
14
Virtual Virtual machine packages for Windows, Mac OS X, or other virtual machine supported operating systems.
●
Binary package for Linux (SUSE and Red Hat).
●
Cloud appliance library (CAL), available through cal.sap.com.
© Copyright. Copyright. All rights reserved. reserved.
For Any SAP / IBM / Oracle - Materials Purchase Visit : www.erpexams.com OR Contact Via Email Directly At :
[email protected]