You are on page 1of 12

PUBLIC

SAP HANA Platform SPS 06 Document Version: 1.1 - 17-07-2013

SAP HANA Interactive Education (SHINE)

Table of Contents
1 1.1 1.2 2 3 3.1 SAP HANA Interactive Education. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Importing the Demo Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Assigning Roles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Generating Demo Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Viewing the Demo Application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 Exploring the Demo Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

PUBLIC 2013 SAP AG or an SAP affiliate company. All rights reserved.

SAP HANA Interactive Education (SHINE) Table of Contents

SAP HANA Interactive Education

SAP HANA Interactive Education, or SHINE, is a demo application that makes it easy to learn how to build native SAP HANA applications. The demo application, delivered with SAP HANA in a special delivery unit (DU), comes complete with sample data and design-time developer objects for the application's database tables, data views, stored procedures, OData, and user interface. The delivery unit defines the following applications: Enterprise Procurement Model Admin Console: This application lets you generate large quantities of data for testing, as well as create synonyms for use in currency conversions. Enterprise Procurement Model Sample Application: This is a sample purchase order worklist of an Enterprise Procurement Model application to show how you could construct similar native SAP HANA applications.

The delivery unit creates the schema SAP_HANA_EPM_DEMO and includes definitions for the following database objects: Schema (.hdbschema) Tables (.hdbtable) Attribute, analytical, and calculation views (attributeview, analyticview, and calculationview) SQL views (.hdbview) Sequences (.hdbsequence)

Most of the database objects, including the tables, are created in the SAP_HANA_EPM_DEMO schema. The views and procedures are created in the _SYS_BIC schema. The delivery unit also comes with design-time objects for building the applications based on those database objects, and are located in the sap.hana.democontent.epm package. These objects include: OData definitions (.xsodata) Server-side JavaScript code (.xsjs) SAPUI5 code (various file types in the ui packages) Security definitions, including: Role definitions (.hdbrole) Application privileges (.xsprivileges) Access rights and HTTP endpoint settings for the SAP HANA XS objects (.xsaccess)

Exploring the Demo Application


To work with the demo application, a system administrator should do the following: Import the demo application DU. Assign roles to developers who want to work with the demo application.

Afterwards, a developer with the proper role can do the following: Generate additional demo data, if necessary. The demo application comes with an initial set of data. View the demo application, and then explore the design-time objects for the demo applications to see how the applications were created.

SAP HANA Interactive Education (SHINE) SAP HANA Interactive Education

PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.

Support
If you need support with SAP HANA Interactive Education, you can open a CSN ticket using component BC-DBHDB-XS.

1.1

Importing the Demo Application

The demo application comes as a delivery unit with the SAP HANA server, and must be imported so you can use it.

Procedure
1. 2. 3. 4. Choose Select File Import . Delivery Unit , and then choose Next.

SAP HANA Content

Select the system on which you want to install the demo application, and then choose Next. In the Select File window, do the following: a) Select Server. b) For File, select usr/sap/<SID> /SYS/global/hdb/content/HCO_DEMOCONTENT.tgz where <SID> is the system ID for your SAP HANA server. c) Under Actions, choose Activate objects. d) Choose Finish.

Results
After importing the demo application, you should see the following in the SAP HANA Systems view for your system: Under Catalog, the SAP_HANA_EPM_DEMO schema Under Content, the sap.hana.democontent.epm package.

In addition, an initial set of data is loaded into the demo application tables.

1.2

Assigning Roles

The demo application includes definitions for two new roles that are required to generate or reload demo data or to view the demo application.

PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.

SAP HANA Interactive Education (SHINE) SAP HANA Interactive Education

Context

Note
To assign a role to another user, you must have the GRANT_ACTIVATED_ROLE execute privilege. The following roles are defined under the sap.hana.democontent.epm.data package: model_access: This role enables a user to run the demo application, and to access the design-time objects that make up the application. The role grants the following privileges: Object Privilege: Permission to select and update most of the tables in the schema containing the demo application tables (SAP_HANA_EPM_DEMO). Package Privilege: Permission to work with the design-time objects located in the demo application package (sap.hana.democontent.epm). Application Privilege: Permission to the Basic application privilege, which grants permission to all runtime objects except those located in the sap.hana.democontent.epm.admin package. If you look in the sap.hana.democontent.epm package, the .xsprivilege file defines the Basic application privilege, and the .xsaccess file specifies that anyone with this privilege can run the application in this package. model_admin: This role enables a user to run the demo application, to run the application to generate additional demo data, and to access the design-time objects that make up these applications. The role grants the following privileges: Granted Roles: All the privileges granted by the model_access role. Object Privilege: Permission to select and update all of the tables in the schema containing the demo application tables (SAP_HANA_EPM_DEMO). Package Privilege: Additional permissions to work with imported design-time objects in the data and models subpackages of the demo application package (sap.hana.democontent.epm). Application Privilege: Permission to the Admin application privilege, which grants permission to all runtime objects in the sap.hana.democontent.epm.admin package. If you look in the sap.hana.democontent.epm package, the .xsprivilege file defines the Admin application privilege. If you look in the sap.hana.democontent.epm.admin package, the .xsaccess file specifies that anyone with this privilege can run the application in this package.

Procedure
1. 2. 3. In the SAP HANA Systems view, expand the node for your system. Under Security Users , open the user to which you want to grant a demo application role.

Under Granted Roles, add one of the demo application roles.

Note
You need to grant only one of the roles. The model_admin role includes all the privileges of the model_access role.

SAP HANA Interactive Education (SHINE) SAP HANA Interactive Education

PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.

4. 5.

In Session Client, enter 001. This is required to enable currency conversions when executing analytic views. Save your changes.

Results
After importing the demo database and assigning a role, anyone with that role can see the following in the SAP HANA Systems view for your system: Under Catalog, the SAP_HANA_EPM_DEMO schema. Under Content, the sap.hana.democontent.epm package.

In addition, an initial set of data is loaded into the demo application tables.

PUBLIC 2013 SAP AG or an SAP affiliate company. All rights reserved.

SAP HANA Interactive Education (SHINE) SAP HANA Interactive Education

Generating Demo Data

The demo application defines a set of tables, along with a basic set of initial data that comes in a set of CSV files. For example, the purchase orders table begins with 1,000 records.

Context
The demo application comes with a tool for generating additional sales and purchase order records, as well as reloading the master data tables. You can use the initial data, but you must run the data generation tool at least to create synonyms. You must have the sap.hana.democontent.epm.data::model_admin role.

Procedure
1. Open the Data Generator by navigating to: http://<myServer>:<XS Port>/sap/hana/democontent/epm/admin/ui/WebContent/ admin.html Make sure to replace <myServer> and <XS Port> with the host name and port for your SAP HANA XS installation. Generally, the port is 80 plus the 2-digit instance number; if the instance is 00, then the port is 8000. 2. Under Settings, select what you want to generate: Reload Master Data: Deletes all data and reloads the initial records that came with the demo data for the following tables: addresses businessPartner constants employees messages products texts

Reload Transaction Data: Deletes all data and reloads the initial records that came with the demo data for the following tables: purchaseOrder purchaseOrderItem salesOrder salesOrderItem

Create Synonyms: Re-creates synonyms for the following tables, to enable currency conversions:

SAP HANA Interactive Education (SHINE) Generating Demo Data

PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.

T006 T006A TCURC TCURF TCURN TCURR TCURT TCURV TCURW TCURX

Reset Sequences: Resets the sequences for the following types of records: addresses businessPartner employees purchaseOrder salesOrder texts

Generate Data: Generates a specified number of purchase order and sales order records.

You can see the code that reloads and generates the data. The UI is defined in file admin.html in package sap.hana.democontent.epm.admin.ui.WebContent, with client JavaScript files located in the sap.hana.democontent.epm.admin.ui.WebContent.xse_sp6_epm_admin_ui package. 3. Select Execute.

PUBLIC 2013 SAP AG or an SAP affiliate company. All rights reserved.

SAP HANA Interactive Education (SHINE) Generating Demo Data

Viewing the Demo Application

You can work with and explore the demo EPM application and then view the code behind it to see how it works. The application makes use of the purchase order data, but not the sales order data.

Context
You must have the sap.hana.democontent.epm.data::model_access role.

Procedure
Open the application by navigating to: http://<myServer>:<XS Port>/sap/hana/democontent/epm/ui/poworklist/WebContent/ poWorklist.html Make sure to replace <myServer> and <XS Port> with the host name and port for your SAP HANA XS installation. Generally, the port is 80 plus the 2-digit instance number; if the instance is 00, then the port is 8000.

3.1

Exploring the Demo Code

To better understand how the demo application is put together, you can import the application project and view the design-time files.

Context
You must have the sap.hana.democontent.epm.data::model_access role.

Procedure
1. 2. 3. In the SAP HANA Systems view, add a system for your SAP HANA system. In the SAP HANA Repositories view, create a repository workspace for the new system. In the new workspace, right-click sap hana democontent and select Checkout and Import Projects.

SAP HANA Interactive Education (SHINE) Viewing the Demo Application

PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.

This adds the project XSE_SP5_EPM_MAIN project to the Project Explorer view, where you can explore the files that make up the application.

Results
The following describes some of the key parts of the design-time objects that make up the application, which can be seen in the Project Explorer view of the SAP HANA studio. Each UI view has a corresponding controller file that contains logic for interactions with that view.

When the application's development unit is deployed, initial data is created. The data is specified by the following design-time object types in the data folder for each table: .hdbtable: Table definition .csv: Data file .hdbsequence: Definition for the ID sequence number for this table

There is also an .hdbti file that maps each .csv file to the correct table. For example, the following shows the files for setting up the addresses table:

Finally, the following shows the PO worklist application, along with the design-time object that enables each part of the UI:

10

PUBLIC 2013 SAP AG or an SAP affiliate company. All rights reserved.

SAP HANA Interactive Education (SHINE) Viewing the Demo Application

SAP HANA Interactive Education (SHINE) Viewing the Demo Application

PUBLIC
2013 SAP AG or an SAP affiliate company. All rights reserved.

11

www.sap.com/contactsap

2013 SAP AG 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 AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group 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 AG in Germany and other countries. Please see http://www.sap.com/corporate-en/legal/copyright/ index.epx for additional trademark information and notices.

You might also like