PUBLIC
SAP HANA Appliance Software SPS 05
Document Version: 1.2 - 2013-06-19
Table of Contents
1 Document History . . . 9
2 Introduction to SAP HANA Development. . . 11
3 SAP HANA Architecture. . . .12
3.1 SAP HANA In-Memory Database. . . 12
3.1.1 Columnar Data Storage. . . 12
3.1.2 Parallel Processing. . . .13
3.1.3 Simplifying Applications. . . 14
3.2 SAP HANA Database Architecture. . . 14
3.3 SAP HANA Extended Application Services. . . 15
3.4 SAP HANA-Based Applications. . . 18
4 SAP HANA Development Platform. . . 19
4.1 Developer Scenarios. . . 19
4.1.1 Scenario: Developing Native SAP HANA Applications. . . 20
4.1.2 Scenario: Using Database Client Interfaces. . . 21
4.2 Development Objects. . . .22
4.3 Repository. . . 24
4.4 SAP HANA Studio. . . 26
4.4.1 Modeler Perspective. . . 26
4.4.2 SAP HANA Development Perspective. . . 28
4.4.3 Debug Perspective. . . 33
4.4.4 Administration Console Perspective. . . 34
4.5 Getting Started. . . 35
4.5.1 Adding a System. . . 36
5 Setting Up Your Application. . . 37
5.1 Before you Start. . . 37
5.2 Setting up Delivery Units. . . 39
5.2.1 Maintaining the Delivery-Unit Vendor ID. . . 39
5.2.2 SAP HANA Delivery Unit Naming Conventions. . . 40
5.2.3 Creating a Delivery Unit. . . 40
5.3 Using SAP HANA Projects. . . 42
5.3.1 SAP HANA Repository: Workspaces. . . 43
5.3.2 Creating a Repository Workspace. . . 43
5.3.3 SAP HANA Studio Projects. . . .44
5.3.4 Creating a Project for SAP HANA XS. . . 45
5.3.5 Sharing a Project for SAP HANA XS. . . .45
5.4 Maintaining Repository Packages. . . 47
5.4.1 SAP HANA Repository Packages and Namespaces. . . .48
5.4.2 Defining Repository Package Privileges. . . 51
5.4.3 Creating a Package. . . 51
5.4.4 Defining a Package Hierarchy. . . 52
5.5 Creating the Application Descriptors. . . 54
5.5.1 The SAP HANA XS Application Descriptor. . . 55
5.5.2 Create an Application Descriptor File. . . .55
5.5.3 The Application-Access File. . . 56
5.5.4 Application-Access File Keyword Options. . . 59
5.5.5 Application-Access URL Rewrite Rules. . . 64
5.5.6 Enabling Access to SAP HANA XS Application Packages. . . 66
5.5.7 The Application-Privileges File. . . 68
5.5.8 Create an SAP HANA XS Application Privileges File. . . 69
5.6 Tutorial: My First SAP HANA Application. . . 72
5.6.1 Open the Development Perspective. . . .72
5.6.2 Add a System. . . 73
5.6.3 Add a Workspace. . . .75
5.6.4 Add a Project. . . .77
5.6.5 Share Your Project. . . .78
5.6.6 Write Server-Side JavaScript. . . 79
5.6.7 Retrieve Data. . . .81
6 Setting Up the Persistence Model. . . 83
6.1 Schema. . . 84
6.2 Creating Schemas. . . 85
6.3 Tables. . . 86
6.4 Table Configuration Schema. . . .87
6.5 Creating Tables. . . 93
6.6 Sequences. . . 94
6.7 Creating Sequences. . . 96
6.8 SQL Views. . . 97
6.9 Creating SQL Views. . . 98
6.10 Data Provisioning Using Table Import. . . 99
6.10.1 Table-Import Model. . . 100
6.10.2 Table-Import Data. . . 100
6.10.3 Table-Import Extensions. . . 101
6.10.4 Table-Import Configuration-File Syntax. . . 102
6.11 Importing Data Using Table Import. . . 102
6.12 Using Imported Table Data in SAP HANA. . . 104
6.13 Using Imported Table Data in an SAP HANA XS Application. . . 105
7 Setting Up the Analytic Model. . . 109
7.1 Setting Up the Modeling Environment. . . 109
7.1.1 Setting Modeler Preferences. . . .109
7.1.2 Configuring the Import Server. . . 111
7.1.3 Importing Table Definitions. . . 111
7.1.4 Loading Data into Tables. . . 113
7.1.5 Copying Content Delivered by SAP. . . .115
7.1.6 Mapping the Authoring Schema to the Physical Schema. . . 116
7.1.7 Generating Time Data. . . 118
7.2 Creating Views. . . 119
7.2.1 Attributes and Measures. . . 119
7.2.2 Attribute Views. . . 120
7.2.3 Creating Attribute Views. . . 121
7.2.4 Analytic Views. . . 126
7.2.5 Creating Analytic Views. . . 127
7.2.6 Calculation Views. . . 135
7.2.7 Creating Calculation Views . . . 135
7.2.8 Assigning Variables. . . 143
7.2.9 Creating Input Parameters. . . 145
7.2.10 Creating Hierarchies. . . .148
7.2.11 Using Currency and Unit of Measure. . . 150
7.2.12 Activating Objects. . . 153
7.3 Creating Decision Tables. . . 154
7.3.1 Changing the Layout of a Decision Table. . . 160
7.3.2 Using Parameters in a Decision Table. . . 161
7.4 Managing Object Versions. . . 162
7.4.1 Switching Ownership of Inactive Objects. . . 162
7.4.2 Toggling Versions of Content Objects. . . 163
7.4.3 Viewing Version History of Content Objects. . . 164
7.5 Working with Objects. . . 164
7.5.1 Managing Layout. . . 164
7.5.2 Filtering Packages and Objects. . . 165
7.5.3 Refactoring Objects. . . 166
7.5.4 Validating Models . . . 167
7.5.5 Generating Object Documentation. . . .167
7.5.6 Enabling Multilanguage Support for Objects. . . 168
7.5.7 Checking Model References. . . 169
7.5.8 Viewing the Job Log. . . 169
7.5.9 Maintaining Search Attributes. . . 169
7.5.10 Previewing Data of Content Objects. . . 170
7.5.12 Searching Tables, Models and Column Views. . . 176
7.5.13 Setting Keyboard Shortcuts. . . 177
7.5.14 Copying an Object. . . 178
7.6 Importing BW Objects. . . .178
8 Developing Procedures. . . 183
8.1 Editing SQLScript. . . .184
8.1.1 Defining Local Table Types in Procedures. . . .186
8.2 Debugging SQLScript. . . 187
8.3 Developing Procedures in the Modeler Editor. . . 188
9 Defining Web-based Data Access. . . 191
9.1 Data Access with OData in SAP HANA XS. . . 191
9.1.1 OData in SAP HANA XS. . . 191
9.1.2 Defining the Data an OData Service Exposes. . . .192
9.1.3 OData Service Definitions. . . 193
9.1.4 Creating an OData Service Definition. . . 196
9.1.5 Tutorial: Using the SAP HANA OData Interface. . . 197
9.1.6 OData Service-Definition Examples. . . 199
9.1.7 OData Service Definition Language Syntax. . . 212
9.1.8 OData Service Definition: SQL-EDM Type Mapping. . . 214
9.1.9 OData URI Parameters, Query Options, and Features. . . 215
9.1.10 OData Security Considerations. . . 229
9.2 Data Access with XMLA in SAP HANA XS. . . .230
9.2.1 XML for Analysis (XMLA). . . 230
9.2.2 XMLA Service Definition. . . 231
9.2.3 XMLA Security Considerations. . . 232
9.2.4 Multidimensional Expressions (MDX). . . 232
9.2.5 MDX Functions. . . 233
9.2.6 MDX Extensions. . . 237
9.2.7 Defining the Data an XMLA Service Exposes. . . .239
9.2.8 Creating an XMLA Service Definition. . . 240
9.2.9 Tutorial: Using the SAP HANA XMLA Interface. . . 240
10 Writing Server-Side JavaScript Code. . . 243
10.1 Data Access with JavaScript in SAP HANA XS. . . 243
10.2 Server-Side JavaScript in SAP HANA XS. . . 243
10.2.1 JavaScript Editor. . . 244
10.2.2 Server-Side JavaScript Security Considerations. . . 245
10.2.3 Writing Server-Side JavaScript Application Code. . . 255
10.3 Server-Side JavaScript Libraries. . . 256
10.3.2 Importing Server-Side JavaScript Libraries. . . 257
10.4 Server-Side JavaScript APIs. . . 259
10.5 The SQL Connection Configuration File. . . 261
10.6 Connection-language Settings in SAP HANA XS. . . 263
10.7 Server-Side JavaScript Tracing. . . .265
10.7.1 Tracing Server-Side JavaScript Applications. . . 265
10.7.2 Viewing Server-Side JavaScript Application Trace Files. . . .266
10.8 Debugging Server-Side JavaScript. . . 266
10.8.1 Opening a Port for Server-Side JavaScript Debugging. . . .269
10.8.2 Troubleshooting Server-Side JavaScript Debugging. . . 269
11 Building UIs. . . 271
11.1 Building UIs with SAPUI5. . . .271
11.1.1 Installing SAPUI5 Application Development Tools. . . 272
11.1.2 Creating an SAPUI5 Application. . . 272
11.1.3 Supporting Translation. . . .276
11.2 Using UI Integration Services. . . 276
11.2.1 Creating an Application Site. . . 277
11.2.2 Designing an Application Site. . . 278
11.2.3 Creating a Widget . . . 280
11.2.4 Developing Widgets. . . 281
12 Enabling Search. . . .291
12.1 Creating Full Text Indexes. . . .291
12.1.1 Full Text Index Types. . . 293
12.1.2 Synchronization. . . 296
12.1.3 Text Analysis. . . .298
12.1.4 Dropping Full Text Indexes. . . 302
12.1.5 Altering Full Text Index Parameters. . . .303
12.1.6 Full Text Index Parameters. . . .304
12.2 Building SQL Search Queries. . . 308
12.2.1 Search Queries with CONTAINS. . . 309
12.2.2 EXACT Search. . . 312
12.2.3 LINGUISTIC Search. . . 313
12.2.4 FUZZY Search. . . 314
12.3 Building Search Apps. . . .396
12.3.1 Introduction to the UI Toolkit for Info Access. . . 396
12.3.2 Installing the Service and the Toolkit. . . 397
12.3.3 Getting to Know the Demo App. . . 399
12.3.4 Getting to Know the Demo HTML. . . 400
12.3.5 Preparing Your Source Data. . . 401
12.3.7 Defining the Page Layout. . . 403
12.3.8 Configuring the Widgets. . . .404
12.3.9 Defining the Layout of Result Lists and Details. . . 408
13 Setting Up Roles and Authorizations. . . 409
13.1 The Authorization Model. . . 409
13.2 Authentication Overview. . . .410
13.3 Roles. . . 410
13.3.1 Roles. . . 411
13.3.2 Roles as Repository Objects. . . 412
13.3.3 Creating Roles in the Repository. . . 414
13.4 Privileges. . . 418
13.4.1 System Privileges. . . .418
13.4.2 Object Privileges. . . 418
13.4.3 Package Privileges. . . 419
13.4.4 Analytic Privileges. . . 422
13.4.5 Creating Analytic Privileges. . . 433
13.4.6 Granting Privileges to Users. . . 437
13.5 Application Access. . . 438
14 Implementing Lifecycle Management . . . 440
14.1 SAP HANA Delivery Units. . . 440
14.2 The SAP HANA Delivery-Unit Lifecycle. . . 440
14.3 Exporting Delivery Units. . . 441
14.4 Importing Delivery Units. . . .443
14.5 Translating Delivery Units. . . .444
14.5.1 SAP HANA Delivery-Unit Translation Details. . . 445
14.5.2 Maintaining Translation Details. . . 445
15 Using Database Client Interfaces. . . 447
15.1 Connecting via ODBC. . . .447
15.1.1 Using the User Store. . . 448
15.1.2 Testing the ODBC Installation. . . 449
15.2 Connecting via JDBC. . . 450
15.2.1 Tracing JDBC Connections. . . 451
15.2.2 Valid Java-to-SQL Conversions. . . 453
15.3 Connecting via ODBO. . . .454
15.3.1 Connecting with Microsoft Excel. . . 454
15.3.2 Multidimensional Expressions (MDX). . . 457
15.3.3 MDX Functions. . . 458
1
Document History
The document history includes all versions of the document that have been published.
Version Date SAP HANA Revision Description
1.1 21 Dec 2012 47 References to the following have been added:
● Sections 7.2.3,
Creating Attribute Views and 7.2.5, Creating Analytic Views have been
updated for Label Mapping
functionality.
● Section 7.6, Importing
BW Objects has been
updated with the support to import role based authorizations into the Modeler as analytic privileges. ● Section 8.1.1, Defining
Local Table Types in Procedures.
● Section 11.2, Using UI
Integration Services.
1.2 08 Feb 2013 50 References to the following have been added:
● Section 7.1.1
Generating Time Data
has been revised. ● Section 7.2.5 Creating
Analytic Views has
been revised with the addition of documentation regarding Temporal Join. ● Section 7.5.13 Setting Keyboard Shortcuts
has been updated with the change in a
Version Date SAP HANA Revision Description
keyboard shortcut for Data Preview.
● Section 7.6 Importing
BW Objects has been
updated. ● Section 8.2
Debugging SQLScript
has been updated with a prerequisite describing how to grant debugger system privileges. ● Section 11. 2 Using UI Integration Services
has been revised and updated with the following changed features:
○ The design panel has a new look and feel, and additional capabilities, such as search for widgets, configuration of site layout, and improved edit mode. ○ The GadgetPrefs API enables personalization of widgets by storing widget preferences separately for each user. ● Section 13.4.4
Analytic Privileges has
2
Introduction to SAP HANA Development
This guide presents a developer’s view of SAP HANA®. It explains how to use the SAP HANA development tools to
create comprehensive analytical models and to build applications with SAP HANA's programmatic interfaces and integrated development environment, including to develop native code that runs inside SAP HANA.
The guide is organized as follows:
● SAP HANA Architecture [page 12] describes the basic capabilities and architecture of SAP HANA.
● Developer Scenarios [page 19] describes the main developer scenarios for which you can use SAP HANA to develop applications.
● #unique_5 shows you how to get started building a simple SAP HANA-based application, including how to use the SAP HANA studio tools and work with the SAP HANA repository.
Most of the remaining chapters explain how to develop various SAP HANA development objects that you can include in your SAP HANA application.
Note
For the latest information about the availability of features for SAP HANA Extended Application Services (SAP HANA XS) and related development tools, please see SAP Note 1779803.
Audience
This guide is aimed at two developer roles:
● Modeler: This person, often a business/data analyst or database expert, is concerned with the definition of the model and schemas that will be used in SAP HANA, the specification and definition of tables, views, primary keys, indexes, partitions and other aspects of the layout and inter-relationship of the data in SAP HANA.
The data modeler is also concerned with designing and defining authorization and access control, through the specification of privileges, roles and users.
The modeler generally uses the Administration Console and Modeler perspectives and tools of the SAP HANA studio.
● Application Programmer: The programmer is concerned with building SAP HANA applications, which could take many forms but are designed based on the model-view-controller architecture. Programmers develop the code for:
○ View, which could run inside a browser or on a mobile device
○ Controller, which typically runs in the context of an application server
○ Model, which interacts closely with the data model, performs efficient queries, and may be developed to run within the SAP HANA data engine, using embedded procedures or libraries
3
SAP HANA Architecture
SAP HANA is an in-memory data platform that is deployable on premise or on demand. At its core, it is an innovative in-memory relational database management system that makes full use of the capabilities of current hardware to increase application performance, reduce cost of ownership, and enable new scenarios and applications that were not possible before.
With SAP HANA, you can build applications that integrate the business control logic and the database layer with unprecedented performance. As a developer, one of the key questions is how you can minimize data movements. The more you can do directly on the data in memory next to the CPUs, the better the application will perform.
3.1
SAP HANA In-Memory Database
SAP HANA runs on multi-core CPUs with fast communication between processor cores, and containing terabytes of main memory. With SAP HANA, all data is available in main memory, which avoids the performance penalty of disk I/O. Either disk or solid-state drives are still required for permanent persistency in the event of a power failure or some other catastrophe. This does not slow down performance, however, because the required backup operations to disk can take place asynchronously as a background task.
3.1.1
Columnar Data Storage
A database table is conceptually a two-dimensional data structure organized in rows and columns. Computer memory, in contrast, is organized as a linear structure. A table can be represented in row-order or column-order. A row-oriented organization stores a table as a sequence of records. Conversely, in column storage the entries of a column are stored in contiguous memory locations. SAP HANA supports both, but is particularly optimized for column-order storage.
Columnar data storage allows highly efficient compression. If a column is sorted, often there are repeated adjacent values. SAP HANA employs highly efficient compression methods, such as run-length encoding, cluster coding and dictionary coding. With dictionary encoding, columns are stored as sequences of bit-coded integers. That means that a check for equality can be executed on the integers; for example, during scans or join
Columnar storage, in many cases, eliminates the need for additional index structures. Storing data in columns is functionally similar to having a built-in index for each column. The column scanning speed of the in-memory column store and the compression mechanisms – especially dictionary compression – allow read operations with very high performance. In many cases, it is not required to have additional indexes. Eliminating additional indexes reduces complexity and eliminates the effort of defining and maintaining metadata.
3.1.2
Parallel Processing
SAP HANA was designed to perform its basic calculations, such as analytic joins, scans and aggregations in parallel. Often it uses hundreds of cores at the same time, fully utilizing the available computing resources of distributed systems.
With columnar data, operations on single columns, such as searching or aggregations, can be implemented as loops over an array stored in contiguous memory locations. Such an operation has high spatial locality and can efficiently be executed in the CPU cache. With row-oriented storage, the same operation would be much slower because data of the same column is distributed across memory and the CPU is slowed down by cache misses. Compressed data can be loaded into the CPU cache faster. This is because the limiting factor is the data transport between memory and CPU cache, and so the performance gain exceeds the additional computing time needed for decompression.
Column-based storage also allows execution of operations in parallel using multiple processor cores. In a column store, data is already vertically partitioned. This means that operations on different columns can easily be processed in parallel. If multiple columns need to be searched or aggregated, each of these operations can be assigned to a different processor core. In addition, operations on one column can be parallelized by partitioning the column into multiple sections that can be processed by different processor cores.
3.1.3
Simplifying Applications
Traditional business applications often use materialized aggregates to increase performance. These aggregates are computed and stored either after each write operation on the aggregated data, or at scheduled times. Read operations read the materialized aggregates instead of computing them each time they are required.
With a scanning speed of several gigabytes per millisecond, SAP HANA makes it possible to calculate aggregates on large amounts of data on-the-fly with high performance. This eliminates the need for materialized aggregates in many cases, simplifying data models, and correspondingly the application logic. Furthermore, with on-the fly aggregation, the aggregate values are always up-to-date unlike materialized aggregates that may be updated only at scheduled times.
3.2 SAP HANA Database Architecture
A running SAP HANA system consists of multiple communicating processes (services). The following shows the main SAP HANA database services in a classical application context.
Such traditional database applications use well-defined interfaces (for example, ODBC and JDBC) to communicate with the database management system functioning as a data source, usually over a network
connection. Often running in the context of an application server, these traditional applications use Structured Query Language (SQL) to manage and query the data stored in the database.
The main SAP HANA database management component is known as the index server, which contains the actual data stores and the engines for processing the data. The index server processes incoming SQL or MDX
statements in the context of authenticated sessions and transactions.
The SAP HANA database has its own scripting language named SQLScript. SQLScript embeds data-intensive application logic into the database. Classical applications tend to offload only very limited functionality into the database using SQL. This results in extensive copying of data from and to the database, and in programs that slowly iterate over huge data loops and are hard to optimize and parallelize. SQLScript is based on side-effect free functions that operate on tables using SQL queries for set processing, and is therefore parallelizable over multiple processors.
In addition to SQLScript, SAP HANA supports a framework for the installation of specialized and optimized functional libraries, which are tightly integrated with different data engines of the index server. Two of these functional libraries are the SAP HANA Business Function Library (BFL) and the SAP HANA Predictive Analytics Library (PAL). BFL and PAL functions can be called directly from within SQLScript.
SAP HANA also supports the development of programs written in the R language.
SQL and SQLScript are implemented using a common infrastructure of built-in data engine functions that have access to various meta definitions, such as definitions of relational tables, columns, views, and indexes, and definitions of SQLScript procedures. This metadata is stored in one common catalog.
The database persistence layer is responsible for durability and atomicity of transactions. It ensures that the database can be restored to the most recent committed state after a restart and that transactions are either completely executed or completely undone.
The index server uses the preprocessor server for analyzing text data and extracting the information on which the text search capabilities are based. The name server owns the information about the topology of SAP HANA system. In a distributed system, the name server knows where the components are running and which data is located on which server. The statistics server collects information about status, performance and resource consumption from the other servers in the system. Monitoring clients, such as the SAP HANA studio, access the statistics server to get the status of various alert monitors. The statistics server also provides a history of measurement data for further analysis.
Related Links
SAP HANA SQLScript Reference
SAP HANA Business Function Library (BFL) Reference SAP HANA Predictive Analysis Library (PAL) Reference SAP HANA R Integration Guide
3.3 SAP HANA Extended Application Services
Traditional database applications use interfaces such as ODBC and JDBC with SQL to manage and query their data. The following illustrates such applications using the common Model-View-Controller (MVC) development architecture.
SAP HANA greatly extends the traditional database server role. SAP HANA functions as a comprehensive
platform for the development and execution of native data-intensive applications that run efficiently in SAP HANA, taking advantage of its in-memory architecture and parallel execution capabilities.
By restructuring your application in this way, not only do you gain from the increased performance due to the integration with the data source, you can effectively eliminate the overhead of the middle-tier between the user-interface (the view) and the data-intensive control logic, as shown in the following figure.
In support of this data-integrated application paradigm, SAP HANA Extended Application Services provides a comprehensive set of embedded services that provide end-to-end support for Web-based applications. This includes a lightweight web server, configurable OData support, server-side JS execution and, of course, full access to SQL and SQLScript.
These SAP HANA Extended Application Services are provided by the SAP HANA XS server, which provides lightweight application services that are fully integrated into SAP HANA. It allows clients to access the SAP HANA system via HTTP. Controller applications can run completely natively on SAP HANA, without the need for an additional external application server.The following shows the SAP HANA XS server as part of the SAP HANA system.
The application services can be used to expose the database data model, with its tables, views and database procedures, to clients. This can be done in a declarative way using OData services or by writing native application-specific code that runs in the SAP HANA context . Also, you can use SAP HANA XS to build dynamic HTML5 UI applications.
In addition to exposing the data model, SAP HANA XS also hosts system services that are part of the SAP HANA system. The search service is an example of such a system application. No data is stored in the SAP HANA XS server itself. To read tables or views, to modify data or to execute SQLScript database procedures and calculations, it connects to the index server (or servers, in case of a distributed system).
Note
For the latest information about the availability of features for SAP HANA Extended Application Services (SAP HANA XS) and related development tools, please see SAP Note 1779803.
Related Links
Building UIs with SAPUI5 [page 271]
This section provides introductory information about UI development toolkit for HTML5.
Enabling Search [page 291]
With a SAP HANA database, your users will want to search tables and views much like they would when searching for information on the Internet. In SAP HANA, you can either directly query data using SQL queries or you can build search apps using a UI toolkit.
3.4 SAP HANA-Based Applications
The possibility to run application-specific code in SAP HANA raises the question: What kind of logic should run where? Clearly, data-intensive and model-based calculations must be close to the data and, therefore, need to be executed in the index server, for instance, using SQLScript or the code of the specialized functional libraries. The presentation (view) logic runs on the client – for example, as an HTML5 application in a Web browser or on a mobile device.
Native application-specific code, supported by SAP HANA Extended Application Services, can be used to provide a thin layer between the clients on one side, and the views, tables and procedures in the index server on the other side. Typical applications contain, for example, control flow logic based on request parameters, invoke views and stored procedures in the index server, and transform the results to the response format expected by the client. The communication between the SAP HANA XS server and index server is optimized for high performance. However, performance is not the only reason why the SAP HANA XS server was integrated into SAP HANA. It also leads to simplified administration and a better development experience.
The SAP HANA XS server completes SAP HANA to make it a comprehensive development platform. With the SAP HANA XS server, developers can write SAP HANA-based applications that cover all server-side aspects, such as tables and database views, database procedures, server-side control logic, integration with external systems, and provisioning of HTTP-based services. The integration of the SAP HANA XS server into the SAP HANA system also helps to reduce cost of ownership, as all servers are installed, operated and updated as one system.
4 SAP HANA Development Platform
To simplify and support the development of SAP HANA-based applications, SAP HANA serves as the integrated development environment (IDE) for developing and delivering these SAP HANA applications.
Built around the Eclipse-based SAP HANA studio the SAP HANA IDE supports integrated and collaborative development, debugging and deployment of applications that use native database procedures for data processing, server-side JavaScript for control and an HTML5 SDK for the development of user interface representation.
The design-time environment's central component is the SAP HANA repository, which stores and manages all design-time objects. The following figure illustrates the principle of co-development with SAP HANA.
Using the SAP HANA studio on your workstation, you design and create development objects such as data models or server-side code files, and then store, manage and share them with other developers, by interacting with the SAP HANA repository. The repository enables teams to work together on a set of development objects, and ultimately turn them into runtime objects which can be used by clients or other applications. The repository provides the basis for concepts like namespaces (through packages), transport and delivery support.
4.1 Developer Scenarios
The possibility to run application specific code in SAP HANA creates several possibilities for developing SAP HANA based applications, representing various integration scenarios, and corresponding development processes.
Broadly, we distinguish SAP HANA based applications into two broad categories:
● Web-based scenarios that take full advantage of the SAP HANA Extended Application Services. In these scenarios, clients access SAP HANA data using standard OData or XMLA interfaces, or directly use a Web-based GUI that was developed using the SAPUI5 toolkit, and that uses custom-developed server-side JavaScript, as well as native SQLScript procedures.
● Traditional client-based scenarios, where an external application accesses the SAP HANA data model (tables, analytic views, etc.) via client interfaces such as ODBC, ODBO and JDBC, and only uses SQL and native SQLScript procedures.
In either case, as a developer you need to understand the SAP HANA development environment, which enables you to design and develop your data and analytical models, and your other HANA-based development objects in the form of portable and deployable delivery units.
Table 1: Common Activities
Activity More Information
Setting up your development environment. Setting Up Your Application [page 37] Setting up your schema and tables. Setting Up the Persistence Model [page 83] Setting up views of your data. Setting Up the Analytic Model [page 109] Developing procedures for data-intensive logic. Developing Procedures [page 183] Setting Up Roles and Authorizations. The Authorization Model [page 409] Managing the delivery of your application. SAP HANA Delivery Units [page 440] For these activites, you will want to keep handy the following references:
● SAP HANA SQL Reference, to help you writing SQL statements within procedures and from your server-side JavaScript.
● SAP HANA SQLScript Reference, to help you if you are writing procedures.
The next two sections describes the main scenarios and what activities you may need to perform for them.
4.1.1
Scenario: Developing Native SAP HANA Applications
Here, you want to create a Web-based scenario that takes full advantage of SAP HANA Extended Application Services. In this scenario, clients access SAP HANA data using standard OData or XMLA interfaces, or directly use a Web-based GUI that was developed using the SAPUI5 toolkit, and that uses custom-developed server-side JavaScript, as well as native SQLScript procedures.
Table 2: Developing Native SAP HANA Applications
Activity More Information
Develop server-side JavaScript for control logic. Writing Server-Side JavaScript Code [page 243] Define OData data interfaces. Data Access with OData in SAP HANA XS [page 191] Define XMLA data interfaces. Data Access with XMLA in SAP HANA XS [page 230] Build HTML pages with SAPUI5. Building UIs with SAPUI5 [page 271]
You will also want to keep handy the following references:
● SAP HANA SQL Reference, to help you write SQL statements within procedures and from your server-side JavaScript.
● SAP HANA XS JavaScript Reference, to help you use the SAP HANA XS JavaScript API.
4.1.2 Scenario: Using Database Client Interfaces
Here, you want to build an application outside of SAP HANA, for example, within SAP NetWeaver, that accesses the SAP HANA data model (for example, tables and analytic views) via client interfaces such as ODBC, ODBO and JDBC, and only uses SQL and native SQLScript procedures.
For this scenario, you may need to perform the following activities:
Table 3: Using Database Client Interfaces
Activity More Information
Activity More Information
Develop procedures for data-intensive logic. Developing Procedures [page 183] You will also want to keep handy several references:
● SAP HANA SQL Reference, to help you write SQL statements.
For information on MDX in SAP HANA, see MDX Functions [page 233]. ● SAP HANA SQLScript Reference, to help you if you are writing procedures.
4.2 Development Objects
The design-time building blocks of your SAP HANA applications are called development objects. Some of these development objects, such as projects and packages, are concepts that help you structure your application. Others, like schemas, table definitions, analytical and attribute views, help you organize the structure of your data. Procedures and server-side JavaScript code are the backbone of the SAP HANA application. Other types of development objects help you control the access to runtime objects.
Understanding the different development objects and their use is one of the main objectives of this guide. The following are the building blocks for an SAP HANA application, showing the file extension and where to get information for building it:
Table 4: Application Building Blocks
Object Description File Extension More Information
Structure
Project An Eclipse project for developing your application or part of an application. The .project file can be stored in the SAP HANA repository.
.project SAP HANA Studio Projects
[page 44] Package A container in the repository for
development objects. Packages are represented by folders. Maintaining Repository Packages [page 47] Modeling Data
Schema A database schema for organizing database objects.
.hdbschema Schema [page 84] Table A database table. .hdbtable Tables [page 86] SQL View A virtual table based on a SQL query. .hdbview SQL Views [page 97] Attribute,
Analytic and Calculation View
A view created with modeling tools and designed to model a business use case.
Created with the
Navigator view.
Setting Up the Analytic Model [page 109] Decision Table A database table used to define business
rules, for example, for validating data.
Creating Decision Tables
Object Description File Extension More Information
Analytic Privilege
A set of rules that allows users to seeing a subset of data in a table or view.
Creating Analytic Privileges
[page 433] Sequence A set of unique numbers, for example, for
use as primary keys for a specific table.
.hdbsequence Sequences [page 94] Procedure A database function for performing
complex and data-intensive business logic that cannot be performed with standard SQL.
.procedure Developing Procedures
[page 183] Web Access
Application Descriptor
A file in a repository package that defines a root folder of a native SAP HANA
application. All files in that package are available to be called via URL.
.xsapp Creating the Application Descriptors [page 54] Application
Access File
A file that defines permissions for a native SAP HANA application, that is, permissions for accessing and running objects in the package.
.xsaccess Enabling Access to SAP HANA XS Application Packages [page 66] Application
Privilege
A file that defines a privilege related to an SAP HANA Extended Application Services application, for example, the right to start or administer the application.
.xsprivileges The Application-Privileges File [page 68]
Server-Side JavaScript Code
JavaScript code that can run in SAP HANA Extended Application Services and that can be accessed via URL.
.xsjs Writing Server-Side JavaScript Application Code [page 255] Server-Side JavaScript Library
JavaScript code that can run in SAP HANA Extended Application Services but cannot be accessed via URL. The code can be imported into an .xsjs code file.
.xsjslib
OData Descriptor
A file that defines an OData service that exposes SAP HANA data.
.xsodata Data Access with OData in SAP HANA XS [page 191] XMLA
Descriptor
A file that defines an XMLA service that exposes SAP HANA data.
.xsxmla Data Access with XMLA in SAP HANA XS [page 230] SQL Connection
Configuration
A file that enables execution of SQL statements from inside server-side JavaScript code with credentials that are different than those of the requesting user.
.xssqlcc The SQL Connection Configuration File [page 261]
Other
Role A file that defines an SAP HANA role. .hdbrole Creating Roles in the Repository [page 414]
Object Description File Extension More Information
Search Rule Set A file that defines a set of rules for use with fuzzy searches. The rules help decide what is a valid match in a search.
.searchruleset Search Rules [page 368] Resource
Bundle
A file for defining translatable UI texts for an application.
.hdbtextbundle Creating an SAPUI5 Application [page 272] Application Site A file that defines an application site. .xsappsite Creating an Application Site
[page 277] Widget A file that defines a standalone SAP HANA
application for the purpose of integration into an application site. A file that defines a standalone SAP HANA application for the purpose of integration into an application site.
.xswidget Creating a Widget [page 280]
4.3 Repository
The SAP HANA repository is the design-time storage system for development objects and is built into SAP HANA. The repository is the source control for all your development work on SAP HANA. You can add objects to the repository, update the objects, publish the objects, and compile these design-time objects into runtime objects. The repository supports the following:
● Version Control
● Sharing of objects between multiple developers ● Transport
The repository manages all development objects. You can browse the repository for a specific system with the
SAP HANA Repositories view.
Packages
Within the repository, development objects are managed as files within packages. Packages enable you to: ● Create namespaces, so you can uniquely identify development objects.
● Group objects that logically belong together.
● Provide containers for your objects so you can easily insert relevant objects into delivery units and transport them.
● Assign permissions at the package level.
You might create a top-level package for your company, and then a subpackage for each project, and then subpackages for parts of your project, for example, a subpackage for your HTML files, another for server-side JavaScript files, and so forth.
Workspaces
When working with development objects, you need to retrieve them from the repository, work on them on your workstation, and then return them to the repository. To make this simpler, the SAP HANA studio enables you to create a repository workspace, which establishes a link between two locations:
● The repository of the SAP HANA system where you wish to maintain the development object files of your projects (in the form of a package hierarchy).
● A directory/folder on your workstation where you checkout these project files while you are working on them.
Working with Objects
When creating development objects, the following is the workflow:
1. Create a project.
2. Share the project to associate it with a workspace, and thus a specific SAP HANA system. Shared projects, once they are activated, are available for import by other members of the application-development team. 3. Create a new object file within the project, and save it to your workstation. Depending on the extension of the
file you create, you may use a dedicated editor for that type of object, for example, a JavaScript editor for .xsjs files.
4. Commit the file.
Committing the file saves it in the repository, but the object is inactive and cannot be run, and only you can see it.
5. Activate the file.
Activating a file does the following: ○ Publishes the file so others can see it.
○ Adds the previously active version of the file to the history. The repository maintains a history of changes to the file.
○ Validates the file and compiles it or exposes it as a runtime object. The design-time object is now active.
Related Links
Setting Up Your Application [page 37]
In SAP HANA Extended Application Services (SAP HANA XS), the design-time artifacts that make up your application are stored in the repository like files in a file system. You first choose a root folder for your application-development activities, and within this folder you create additional subfolders to organize the applications and the application content according to your own requirements.
4.4 SAP HANA Studio
The SAP HANA studio is an Eclipse-based development and administration tool for working with SAP HANA, including creating projects, creating development objects, and deploying them to SAP HANA. As a developer, you may want to also perform some administrative tasks, such as configuring and monitoring the system.
There are several key Eclipse perspectives that you will use while developing: ● Modeler: Used for creating various types of views and analytical privileges.
● SAP HANA Development: Used for programming applications, that is, creating development objects that access or update the data models, such as server-side JavaScript or HTML files.
● Debug: Used to debug code, such as server-side JavaScript or SQLScript. ● Administration: Used to monitor the system and change settings.
To open a perspective, go to Window Open Perspective , or select on the toolbar.
4.4.1 Modeler Perspective
The perspective contains the following main areas:
● Navigator view: A view of the database objects, that is, those objects you create from the Modeler perspective. ● Quick Launch Area: A collection of shortcuts for performing the most common modeling tasks. If you close
the Quick Launch tab, you can reopen it by selecting Help Quick Launch .
4.4.1.1
Navigator View
The Navigator view displays the database objects in SAP HANA. You can browse both the activated (runtime) objects and those objects you have created but not yet activated.
The Navigator view is divided into the following main sections: ● Security
Contains the objects you use to set up system authorizations and privileges, for example: roles and users defined for this system.
● Catalog
Contains the database objects that have been activated. The objects are grouped into schemas, which is the common way to organize activated database objects, for example: tables, views, column views, and
procedures. ● Content
Contains design-time database objects, both those that have been activated and those not activated. This includes all the artifacts collected in your application packages. If you want to see other development objects, use the SAP HANA Repositories view.
Related Links
SAP HANA Repositories View [page 29]
4.4.2 SAP HANA Development Perspective
The SAP HANA Development perspective is where you will do most of your programming work, creating projects, associating them to SAP HANA systems, creating development objects, and deploying them.
The perspective contains the following main areas:
● Development Objects: Several views for browsing your development objects: the objects on your workstation, and the objects in the repository of the SAP HANA system you are working with.
● Editors: Specialized editors for working with different types of development objects.
4.4.2.1 SAP HANA Repositories View
The SAP HANA Repositories view enables you to browse the repository of a specific SAP HANA system, viewing the package hierarchy and to download files to your workstation.
The view essentially is a list of repository workspaces that you have created for developing on various systems. Generally, you create a workspace, check out files from the repository, and then do most of your development work in the Project Explorer.
If you are creating a project from scratch, you do not need anything from this view, except to see the hierarchy of the repository. You create the project in the Project Explorer.
4.4.2.2 Project Explorer View
The Project Explorer is the standard Project Explorer view in Eclipse, which shows you the development files located on your workstation.
Here you can create files, edit files, and deploy them to the repository.
4.4.2.3 Working with the Repository
To work with the repository, you need to either:
● Share your project with the repository via a workspace. Sharing a project associates it with a SAP HANA system, so that files within the project can be added to the repository on that system.
● Check out an existing package in the repository from a workspace. This creates copies on your workstation of the package, its subpackages and their objects.
Team Menu
You can interact with the repository by right-clicking on a file or project (in the Project Explorer view) or package (in the SAP HANA Repositories view), and selecting an option from the Team menu.
You can perform the following on a file, folder or project in the Project Explorer view, that is, development objects that you are working on and located on your workstation:
Table 5: Repository Actions in Project Explorer (project, folder, or file) Action Description
Commit Saves the object to the repository.
The object (or changes to the object) are only visible to you. There is no versioning of committed objects; the repository stores only the latest committed changes.
Activate Makes the development object active, and does the following: ● Publishes the object so it is visible to others.
● Compiles the object into runtime objects. ● Deploys the runtime object.
Action Description
Check Simulates activation of the object in order to check if the object is valid and can be activated.
Checkout Retrieves the latest version of the object from the repository.
Revert Removes all your committed changes (inactive object) with the latest version of the object that was activated.
Share/Unshare
(project only)
Associates a project with a specific SAP HANA system, so that files within the project can be added and updated on the repository on that system. For more information, see Using SAP HANA Projects [page 42].
The following options are available for files only.
Show Local History Shows a history of all versions of your object saved on your workstation. This is the Eclipse local history feature.
Show History Shows a history of all the versions of the object that were activated in the repository.
Currently, you can only view a list of versions.
You can perform the following on a package and file in the SAP HANA Repositories view:
Table 6: Repository Actions in SAP HANA Repositories (package or file) Action Description
Checkout (package only)
Retrieves the latest version of the objects from the repository in this package and its subpackages.
Checkout and Import Projects
(package only)
Retrieves the latest version of the objects from the repository in this package, and imports a project into the SAP HANA studio. For more information, see Using SAP HANA Projects
[page 42].
Show History (file only)
Status of Development Objects
Each object displayed in your project within the Project Explorer view is shown with an icon that indicates its status.
Table 7: Status of Development Objects Icon Description
The file is not committed. You made a change to the file and saved it to your workstation, but have not yet committed the changes to the repository.
The file is committed. The file is activated.
4.4.3 Debug Perspective
The Debug perspective in the SAP HANA studio is the standard Eclipse Debug perspective, enabling you to start debug sessions, create breakpoints and watch variables.
In the SAP HANA studio, the debug tools have been enhanced to let you also debug SAP HANA code, both server-side JavaScript (.xsjs files) and SQLScript code (.procedure files). The following shows the tools available in the Debug perspective and how it is organized:
● Debug Session: The debug sessions that have been started ● Watch: Breakpoints and variables to watch
● Code: Code files that you have opened Related Links
Debugging Server-Side JavaScript [page 266]
SAP HANA studio enables you to debug XS JavaScript files, including setting breakpoints and inspecting variables.
Debugging SQLScript [page 187]
The SAP HANA SQLScript debugger allows you to debug and analyze procedures. In a debug session, your procedures will be executed in a serial mode, not in parallel (not-optimized). This allows you to test the correctness of the procedure logic and is not for evaluating the performance.
4.4.4 Administration Console Perspective
The Administration Console perspective enables you to configure the SAP HANA server so that you can do your development work. For example, when debugging, the debug port must be opened and debugging enabled, which is done by setting configuration parameters within the administration console.
The Administration Console perspective displays the Navigator view, for adding or selecting systems, and the administration console, where you can monitor and configure the system. Configuration parameters can viewed and changed from the Configuration tab.
Note
If the console is closed, you can open it by clicking the Administration icon in the Navigator view.
4.5 Getting Started
Before starting development work in the SAP HANA studio, make sure to have the following: ● An installation of the SAP HANA studio on your workstation.
● A live SAP HANA system to which to connect.
○ MODELING
○ CONTENT_ADMIN
4.5.1
Adding a System
To develop applications, you must first make a connection from your SAP HANA studio to an SAP HANA system. 1. In the Navigator view, right-click anywhere in the view and select Add System.
2. In the System window, enter the host name, instance number, and a description for the SAP HANA system you want to add.
3. Select Next.
4. Enter a user name and password, and select Finish.
The Navigator view includes a new top-level node for the system. You can now create a repository workspace for this system so you can start to develop objects to run in it.
Related Links
Setting Up Your Application [page 37]
In SAP HANA Extended Application Services (SAP HANA XS), the design-time artifacts that make up your application are stored in the repository like files in a file system. You first choose a root folder for your application-development activities, and within this folder you create additional subfolders to organize the applications and the application content according to your own requirements.
5
Setting Up Your Application
In SAP HANA Extended Application Services (SAP HANA XS), the design-time artifacts that make up your application are stored in the repository like files in a file system. You first choose a root folder for your application-development activities, and within this folder you create additional subfolders to organize the applications and the application content according to your own requirements.
Note
Application development with SAP HANA Extended Application Services (SAP HANA XS) is currently only available as an SAP-led project solution, for pre-approved customers and partners. This applies to server-side JavaScript programming, support for ODATA and XMLA, Web server features and the Web application development environment. For more information, seeSAP Note 1779803.
As part of the application-development process, you typically need to perform the tasks described in the following list. Each of the tasks in more detail is described in its own section:
1. Check application-development prerequisites
Before you start developing applications using the features and tools provided by the SAP HANA XS,
developers who want to build applications to run on SAP HANA XS need to be granted access to development tools, SAP HANA systems, database accounts, and so on.
2. Set up delivery units.
To create and manage delivery units, you must set the identity of the vendor with whom the delivery units are associated. To avoid conflicts with applications from SAP or other providers, we recommend that you name the root application-development folder for your company using the DNS name of your company. For example, you could use the name acme.com.hr.newHires for the root folder for a new application managing new hires in a company called acme.
3. Set up SAP HANA projects.
In SAP HANA, projects enable you to group together all the artifacts you need for a specific part of the application-development environment. To start the application-development work flow, you first create a repository workspace in the SAP HANA Development perspective, which creates a directory structure to store files on your PC; the workspace you create enables you to synchronize changes in local files with changes in the repository. Then you can use the SAP HANA studio to create a project to manage the development activities for the new application.
4. Maintain repository packages.
To perform the high-level tasks that typically occur during the process of maintaining repository packages, you need to be familiar with the concepts of packages and package hierarchies, which you use to manage the artifacts in your applications.
5. Maintain application descriptors.
The framework defined by the application descriptors includes the root point in the package hierarchy where content is to be served to client requests. The framework also defines if the application is permitted to expose data to client requests, what kind of access to the data is allowed, and what if any privileges are required to perform actions on packages and package content.
5.1
Before you Start
To enable application-developers to start building native applications that take advantage of the SAP HANA Extended Application Services (SAP HANA XS), the SAP HANA administrator must set up the
application-development environment in such a way that developers have access to the tools and objects that they need to perform the tasks required during the application-development process.
Before you start developing applications using the features and tools provided by the SAP HANA XS, bear in mind the following prerequisites. Developers who want to build applications to run on SAP HANA XS need the following tools, accounts, and privileges:
Note
The following tasks can only be performed by someone who has the required authorizations in SAP HANA, for example, a SAP HANA administrator.
● Access to a running SAP HANA development system (with SAP HANA XS) ● A valid user account in the SAP HANA database on that system
● Access to SAP HANA studio tools
● Access to the SAP HANA client (which SAP HANA studio uses to connect to the repository) ● Access to the SAP HANA repository
● Access to selected run-time catalog objects
Note
To provide access to the repository for application developers, you can use a predefined role or create your own custom role to which you assign the privileges that the application developers need to perform the everyday tasks associated with the application-development process.
To provide access to the repository from the SAP HANA studio, the EXECUTE privilege is required for
SYS.REPOSITORY_REST, the database procedure through with the REST API is tunneled. To enable the activation and data preview of information views, the technical user _SYS_REPO also requires SELECT privilege on all schemas where source tables reside.
In SAP HANA, you can use roles to assign one or more privileges to a user according to the area in which the user works; the role defines the privileges the user is granted. For example, a role enables you to assign SQL privileges, analytic privileges, system privileges, package privileges, and so on. To create and maintain artifacts in the SAP HANA repository, you can assign application-development users the following roles:
● One of the following: ○ MODELING
The predefined MODELING role assigns wide-ranging SQL privileges, for example, on _SYS_BI and _SYS_BIC. It also assigns the analytic privilege _SYS_BI_CP_ALL, and some system privileges. If these permissions are more than your development team requires, you can create your own role with a set of privileges designed to meet the needs of the application-development team.
○ Custom DEVELOPMENT role
A user with the appropriate authorization can create a custom DEVELOPMENT role specially for application developers. The new role would specify only those privileges an application-developer needs to perform the everyday tasks associated with application development, for example: maintaining packages in the repository, executing SQL statements, displaying data previews for views, and so on. ● PUBLIC
This is a role that is assigned to all users by default. Related Links
Creating Roles in the Repository [page 414]
Defining Repository Package Privileges [page 51]
In the SAP HANA repository, you can set package authorizations for a specific user or for a role. Authorizations that are assigned to a repository package are implicitly assigned to all sub-packages, too. You can also specify if the assigned user authorizations can be passed on to other users.
5.2 Setting up Delivery Units
A delivery unit is a collection of packages that are to be transported together. You assign all the packages belonging to your application to the same delivery unit to ensure that they are transported consistently together within your system landscape. Each delivery unit has a unique identity.
The identity of a delivery unit consists of two parts: a vendor name and a delivery-unit name. The combined ID ensures that delivery units from different vendors are easy to distinguish and follows a pattern that SAP uses for all kinds of software components.
To create and manage delivery units you first need to maintain the identity of the vendor, with whom the delivery units are associated, and in whose namespace the packages that make up the delivery unit are stored. As part of the vendor ID maintenance process, you must perform the following tasks:
1. Understand delivery units
You must be familiar with the conventions that exist for delivery-unit names and understand the phases of the delivery-unit lifecycle.
2. Maintain details of the vendor ID associated with a delivery unit.
Delivery units are located in the namespace associated with the vendor who creates them and who manages the delivery-unit's lifecycle.
3. Create a delivery unit. Related Links
Maintaining the Delivery-Unit Vendor ID [page 39]
In SAP HANA, the vendor ID is used primarily to define the identity of the company developing a software component that they plan to ship for use with SAP HANA. If you want to create a delivery unit, it is a prerequisite to maintain a vendor ID in your system.
Creating a Delivery Unit [page 40]
A delivery unit is a group of transportable objects used for content delivery. You can use a delivery unit to
transport the design-time objects that are stored in the SAP HANA repository between two systems, for example, from a development system to a consolidation system.
5.2.1
Maintaining the Delivery-Unit Vendor ID
In SAP HANA, the vendor ID is used primarily to define the identity of the company developing a software component that they plan to ship for use with SAP HANA. If you want to create a delivery unit, it is a prerequisite to maintain a vendor ID in your system.
Before creating your first own delivery unit you must set the identity of the vendor in the development system's configuration. To maintain details of the delivery-unit vendor ID, perform the following steps:
1. Start the SAP HANA studio.
2. Switch to the Administration Console perspective.
In the SAP HANA studio's Navigator view, select the desired system, and choose Administration from the context-sensitive menu. Alternatively, use the menu path: Window > Open Perspective > Administration Console .
3. Display configuration details for the SAP HANA instance; choose the Configuration tab page. 4. Maintain details of the vendor ID.
In the Configuration tab page, perform the following steps:
a) Locate indexserver.ini in the list of configuration files displayed in the Name column. b) Expand the indexserver.ini entry.
c) Expand the repository entry. d) Edit the content_vendor parameter.
e) Double-click content_vendor and enter the name of your vendor. Note that guidelines and conventions exist for vendor names.
Note
We recommend that you use your DNS name to set the vendor ID, for example, acme.com. f) Save your changes.
5.2.2 SAP HANA Delivery Unit Naming Conventions
In SAP HANA, conventions and guidelines exist for the naming of delivery units (DU). The delivery unit is the vehicle that lifecycle management (LCM) uses to ship one or more software components from SAP (or a partner) to a customer. The DU is also the container you use to transport application content in your system landscape. If you are creating a delivery unit, you must adhere to the following naming conventions
● The name of a delivery unit must contain only capital letters (A-Z), digits (0-9), and underscores (_) ● You cannot use an underscore (_) as the first character of a delivery-unit name.
Note
The naming conventions for packages in a delivery unit differ from the naming conventions that apply to the delivery unit itself. For example, the maximum length of a package name is not restricted to 30 characters; it must be less than 190 characters (including the namespace hierarchy).
5.2.3 Creating a Delivery Unit
A delivery unit is a group of transportable objects used for content delivery. You can use a delivery unit to
transport the design-time objects that are stored in the SAP HANA repository between two systems, for example, from a development system to a consolidation system.
Note
You cannot create a delivery unit unless you have already defined the delivery unit's vendor ID; the vendor ID defines the namespace in which the new delivery unit resides.
To create a new delivery unit, perform the following steps: 1. In the SAP HANA studio, start the Modeler perspective.
2. In the Setup screen area of the Quick Launch tab, choose Delivery Units.... 3. Create a new delivery unit.
In the Delivery Units dialog, choose Create...
4. Maintain delivery unit details.
a) Enter a name for the new delivery unit. The delivery unit Name is mandatory. b) Fill in the other information as required:
Note the following points when entering information:
○ The name of the Vendor is set to the vendor ID that is specified in the system configuration, for example, acme.com.
○ The Responsible text box enables you to specify the name of the person responsible for managing the delivery unit.
○ In the text boxes Version, Support Package Version, and Patch Version enter integer values only; the combined values define the version of the delivery unit that is currently being developed. For example, enter Version = 1, Support Package Version = 3, and Patch Version = 17 to specify that the current version of your delivery unit is 1.3.17. The version number is transported to other systems with every DU transport.
Note
The numbers you enter here refer to the application component that you are developing; the numbers do not refer to the patch or service-pack level deployed on the SAP HANA server. ○ The PPMS ID is the product ID used by the SAP Product and Production Management System
(PPMS).
Note
Customers and partners should leave the PPMS ID text box empty. Related Links
Maintaining the Delivery-Unit Vendor ID [page 39]
In SAP HANA, the vendor ID is used primarily to define the identity of the company developing a software component that they plan to ship for use with SAP HANA. If you want to create a delivery unit, it is a prerequisite to maintain a vendor ID in your system.
SAP HANA Delivery Unit Naming Conventions [page 40]
In SAP HANA, conventions and guidelines exist for the naming of delivery units (DU). The delivery unit is the vehicle that lifecycle management (LCM) uses to ship one or more software components from SAP (or a partner) to a customer. The DU is also the container you use to transport application content in your system landscape.
5.3 Using SAP HANA Projects
Projects group together all the artifacts you need for a specific part of the application-development environment. Before you can start the application-development workflow, you must create a project, which you use to group together all your application-related artifacts. However, a project requires a repository workspace, which enables you to synchronize changes in local files with changes in the repository. You can create the workspace before or during the project-creation step. As part of the project-creation process, you perform the following tasks: 1. Create a development workspace.
The workspace is the link between the SAP HANA repository and your local filesystem, where you work on project-related objects.
2. Create a project.
Create a new project for a particular application or package; you can use the project to collect in a convenient place all your application-related artifacts.
3. Share a project.
Sharing a project enables you to ensure that changes you make to project-related files are visible to other team members and applications. Shared projects are available for import by other members of the application-development team.
Note
Files checked out of the repository are not locked; conflicts resulting from concurrent changes to the same file must be resolved manually, using the Merge tools provided in the context-sensitive Team menu. 4. Import a project.
Import a project (and its associated artifacts) that has been shared by another member of the application-development team.
Related Links
Creating a Repository Workspace [page 43]
A workspace is a local directory that you map to all (or part) of a package hierarchy in the SAP HANA repository. When you check out a package from the repository, SAP HANA copies the contents of the package hierarchy to your workspace, where you can work on the files.
Creating a Project for SAP HANA XS [page 45]
Before you can start the application-development workflow, you must create a project, which you use to group all your application-related artifacts.
Sharing a Project for SAP HANA XS [page 45]
Before you can start working on files associated with a new project, you must share the project; sharing a project enables you to track and synchronize local changes with the repository.
Importing a Project in SAP HANA XS [page 47]
Before you can start the application-development workflow, you must either create a new project and share it (with the repository), or import a shared project from the repository into your workspace. Importing a project enables you to track and synchronize local changes with the colleagues working on the objects in the imported project.