Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
Article
Document Version: 1.0 – 2014-12-22
PUBLIC
How to Model, Build, and Deploy Native SAP HANA Applications
2
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved.
How to Model, Build, and Deploy Native SAP HANA Applications
Typographic Conventions
Typographic Conventions
Type Style Description
Example Words or characters quoted from the screen. These include field names, screen titles,
pushbuttons labels, menu names, menu paths, and menu options.
Textual cross-references to other documents.
Example Emphasized words or expressions.
EXAMPLE Technical names of system objects. These include report names, program names,
transaction codes, table names, and key concepts of a programming language when they
are surrounded by body text, for example, SELECT and INCLUDE.
Example Output on the screen. This includes file and directory names and their paths, messages,
names of variables and parameters, source text, and names of installation, upgrade and
database tools.
Example Exact user entry. These are words or characters that you enter in the system exactly as they
appear in the documentation.
Variable user entry. Angle brackets indicate that you replace these words and characters
with appropriate entries to make entries in the system.
EXAMPLE Keys on the keyboard, for example, F2 or ENTER .
How to Model, Build, and Deploy Native SAP HANA Applications
Document History
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved. 3
Document History
Version Date Change
1.0 2014-12-22 Initial revision
4
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved.
How to Model, Build, and Deploy Native SAP HANA Applications
Table of Contents
Table of Contents
1 Introduction .................................................................................................................................................... 5
2 Structure of a SAP HANA Application ......................................................................................................... 6
3 Building SAP HANA Applications ............................................................................................................... 10
4 Assembling SAP HANA Applications ......................................................................................................... 15
5 Installing SAP HANA Applications ............................................................................................................. 16
6 Conclusion ..................................................................................................................................................... 17
7 Further Reading ............................................................................................................................................ 18
How to Model, Build, and Deploy Native SAP HANA Applications
Introduction
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved. 5
1 Introduction
This article describes the building blocks and the structure of native SAP HANA applications and the tools and
procedures in order to model, build, and deploy them. Native SAP HANA Applications are applications written in a
native SAP HANA programming language such as SQL Script or JavaScript and may contain database artifacts
such as tables or views (analytic, attribute, calculation) and are developed in the SAP HANA repository. The tools
and procedures introduced in this article are valid for all productive deployment scenarios of SAP HANA
applications as well as for testing and validation purposes. Productive deployment scenarios include shipment of
applications to external customers, deployment of applications in an on premise landscape as well as
deployments into the cloud.
6
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved.
How to Model, Build, and Deploy Native SAP HANA Applications
Structure of a SAP HANA Application
2 Structure of a SAP HANA Application
An SAP HANA application consists of source files which are stored in a hierarchical package structure in the SAP
HANA repository. This is a view on the demo application SHINE which is described in the SAP HANA Developer
Guide and stored in sub-packages of package sap.hana.democontent.epm:
In the context of SAP HANA this is all that is needed to execute the application. The following is shown when
opening the application URL /sap/hana/democontent/epm:
How to Model, Build, and Deploy Native SAP HANA Applications
Structure of a SAP HANA Application
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved. 7
Delivery units were introduced in order to combine packages and in order to be able to export and import them
from one system to another. This is a glance at the delivery unit named SHINE for the SHINE application using the
SAP HANA application lifecycle management tool:
8
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved.
How to Model, Build, and Deploy Native SAP HANA Applications
Structure of a SAP HANA Application
Besides the “Assigned Packages” section which lists the packages that are part of the delivery unit and that make
up the application there are some meta-information such as name, version, and description. The dependencies
section shows dependencies to other delivery units. A delivery unit can be exported from a system and imported
into a system. The exported delivery unit is a .tgz file (a gzip compressed tar file).
In theory this format would be sufficient to ship an application however the delivery unit format does not support
the following use cases:
An application might consist of multiple delivery units
An application may require a particular version of the database software or other applications to be present
prior to being able to install this application
Depending on the customer environment it is only required to install part of the application
Bundle translation delivery units together with the application delivery unit
For supporting these use cases SAP HANA products have been introduced. SAP HANA products consist of
product instances that have delivery units assigned to them. If a product has multiple instances an administrator
can decide to install only a subset of the available instances. The SHINE application is relatively small as it only
consists of a single delivery unit. Therefore the product structure is relatively simple: the product consists of one
product instance with ID 1 which has one single delivery unit named SHINE assigned.
How to Model, Build, and Deploy Native SAP HANA Applications
Structure of a SAP HANA Application
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved. 9
More complex products can consist of several instances, each having several delivery units assigned.
10
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved.
How to Model, Build, and Deploy Native SAP HANA Applications
Building SAP HANA Applications
3 Building SAP HANA Applications
The key activity for building an SAP HANA application is to write the application code, define tables, views,
calculation views, etc. These artifacts are stored in SAP HANA repository packages as shown above for the SHINE
application. There are two major development environments available for building SAP HANA applications: the
SAP HANA studio and the Web IDE. Describing these development environments and technologies is out of scope
for this article; they are covered in details in the SAP HANA Developer Guide.
SAP HANA application lifecycle management (HALM) can be used to complete the additional tasks to model an
application for shipment, to build it, and to install it on the target systems. The screenshots of the package
structure, delivery unit- and product details were taken from the HALM UI.
SAP HANA application lifecycle management is a web application which is shipped with each SAP HANA system
and a command line client which is shipped as part of the SAP HANA client package. The web application is an XS
application which is located at /sap/hana/xs/lm and the command line client is named hdbalm and located in
the installation directory of the SAP HANA client package. The HALM web application can be used to model the
product and delivery units for the application and the command line client to build and deploy it. The screenshot
below shows the home screen of HALM. The circled tiles “Products” and “Delivery Units” refer to the product and
delivery unit views which can be used to model the application.
A new delivery unit can be created using the "New Delivery Unit" dialog which can be opened by clicking “create”
on the Delivery Units view. Enter the delivery unit name and optionally a version, a description, a responsible, and
confirm the dialog by clicking the "create" button. This screenshot shows he "New Delivery Unit" dialog for
creating the "SHINE" delivery unit:
How to Model, Build, and Deploy Native SAP HANA Applications
Building SAP HANA Applications
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved. 11
The next step is to assign the packages to the delivery unit. Select the SHINE delivery unit created in the previous
step and click on the “Assign” button. Select the sap.hana.democontent.epm package, make sure the “Select
Sub packages” check box is selected and finish the dialog by clicking the “Assign” button.
12
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved.
How to Model, Build, and Deploy Native SAP HANA Applications
Building SAP HANA Applications
As a result the delivery unit has been created and packages have been assigned to it as shown in the first section
of this document.
Having created the delivery unit is it time to create the product in the “Products” view of HALM. Click on “Create”,
enter the product name and optionally a version and description field and select the checkbox to create the
default instance (you will be able to create additional instances later on) and finish the dialog by pressing
“Create”.
How to Model, Build, and Deploy Native SAP HANA Applications
Building SAP HANA Applications
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved. 13
The next step is to assign the delivery unit which has been created above to a product instance. Make sure
“Instance 1” is selected and click the “Assign Delivery Unit” button. Scroll down the list or enter “SHINE” in the
search field in order to locate the SHINE delivery unit and press the Assign button in order to assign the delivery
unit to the product instance.
14
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved.
How to Model, Build, and Deploy Native SAP HANA Applications
Building SAP HANA Applications
The product now has been modeled in the system.
How to Model, Build, and Deploy Native SAP HANA Applications
Assembling SAP HANA Applications
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved. 15
4 Assembling SAP HANA Applications
In this section we describe how to build an application archive for the application that we have modeled above.
This application archive is a container which can be used to ship your application to your internal IT department,
to an external customer, or to the cloud. The application archive contains the delivery units and product meta-
data that have been created as shown above.
The hdbalm command line application which is part of the SAP HANA client package can be used to assemble the
application. The following command builds the application archive (user name, host, and port can also set in the
environment):
hdbalm -u -h -p assemble SHINE_APPLICATION
As a result a ZIP archive named SHINE_APPLICATION_10.ZIP is created which contains the SHINE delivery unit
as well as the product metadata which we have modeled above.
The generated ZIP archive is shown below. It contains two descriptors (STACK.XML, PD.XML) which describe the
product metadata and a ZIP file (SHINE.ZIP) which contains the SHINE delivery unit and optionally the
translation file.
There are a number of additional options which are described in the SAP HANA Developer Guide as well as in the
help text for the command which can be shown by running the following command:
hdbalm help assemble
Using a command line tool may need some time to get used to but there is also a great advantage: it is possible to
automate delivery processes ensuring that delivery procedures are identical for each release. It can also be used
to run extensive tests which consist of an assembly procedure, installation procedure and automated unit- and
integration tests.
16
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved.
How to Model, Build, and Deploy Native SAP HANA Applications
Installing SAP HANA Applications
5 Installing SAP HANA Applications
Once an application archive has been built it can be installed on a different system by you, your IT department, or
your customer. Application installation is also supported by the hdbalm command line client as shown by this
command:
hdbalm -u -h -p install SHINE_APPLICATION_10.ZIP
As a result the SHINE application will be installed on your HANA system just like you modeled it in your original
system. A command line tool supports repetitive procedures as well as automated integration tests mentioned
above.
How to Model, Build, and Deploy Native SAP HANA Applications
Conclusion
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved. 17
6 Conclusion
In this article we have shown the simple steps necessary to model, build, and install a native SAP HANA
application. The tools and procedures are just the same as they are used by our organizations to ship native SAP
HANA applications. Product archives are a consistent container for all artifacts that belong to an application
including one or multiple delivery units as well as their translation files and product metadata.
18
PUBLIC
© 2014 SAP SE or an SAP affiliate company. All rights reserved.
How to Model, Build, and Deploy Native SAP HANA Applications
Further Reading
7 Further Reading
Documentation for the hdbalm tool is provided in the SAP HANA Developer Guide:
http://help.sap.com/saphelp_hanaplatform/helpdata/en/70/17483ff82c497dbb112ec105920640/content.htm
?frameset=/en/3e/bd49dfe54045529a82773e3505e31a/frameset.htm¤t_toc=/en/34/29fc63a1de4cd6
876ea211dc86ee54/plain.htm&node_id=475&show_children=false
http://help.sap.com/saphelp_hanaplatform/helpdata/en/70/17483ff82c497dbb112ec105920640/content.htm?frameset=/en/3e/bd49dfe54045529a82773e3505e31a/frameset.htm¤t_toc=/en/34/29fc63a1de4cd6876ea211dc86ee54/plain.htm&node_id=475&show_children=falsehttp://help.sap.com/saphelp_hanaplatform/helpdata/en/70/17483ff82c497dbb112ec105920640/content.htm?frameset=/en/3e/bd49dfe54045529a82773e3505e31a/frameset.htm¤t_toc=/en/34/29fc63a1de4cd6876ea211dc86ee54/plain.htm&node_id=475&show_children=falsehttp://help.sap.com/saphelp_hanaplatform/helpdata/en/70/17483ff82c497dbb112ec105920640/content.htm?frameset=/en/3e/bd49dfe54045529a82773e3505e31a/frameset.htm¤t_toc=/en/34/29fc63a1de4cd6876ea211dc86ee54/plain.htm&node_id=475&show_children=false
www.sap.com/contactsap
© 2014 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.
The information contained herein may be changed without prior
notice. 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 or its affiliated companies shall not be liable for
errors or omissions with respect to the materials. The only
warranties for SAP 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.
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. All other product and service names mentioned are the
trademarks of their respective companies. Please see
www.sap.com/corporate-en/legal/copyright/index.epx for
additional trademark information and notices.
Material Number:
http://www.sap.com/corporate-en/legal/copyright/index.epx