8 Easy Steps to Develop an XS Application

14
Getting Started Newsletters Store Log On Join Us Hi, Guest Activity Communications Actions Browse SAP HANA Cloud Platform Developer Center 13 Tweet 61 Disclaimer: This document relates to Beta functionality available on SAP HANA Cloud Platform trial landscape. SAP HANA Cloud Platform provides you with SAP HANA native development capabilities, allowing you to build and execute native SAP HANA XS applications that run in the cloud. Just imagine having and being able to do all this in one place: SAP HANA analytic power Develop straight into the Eclipse IDE, integrated with the SAP HANA database, and easily: - Manage SAP HANA artifacts, such as SAP HANA schemas and repository packages - Builde analytic models and XS applications Enjoy superior performance with the XS engine Build attractive application user interface with SAPUI5 that consumes and visualizes application data Everyone can access and try out the capabilities of the SAP HANA Cloud Platform by developing an application in the Eclipse IDE and deploying it in the SAP HANA Cloud Each cloud user and their data is secured and isolated from other users Grant rights to other users to use your application Scenario To develop your first XS application, you need to complete the following activities: Connect to SAP HANA Cloud Platform from your Eclipse IDE Create a XS Project and store it in SAP HANA Repository Use SAP HANA Modeler and create a calculation view that uses the predelivered data content for SAP HANA Cloud Platform trial accounts based on the Enterprise Procurement Model reference application Write an XSJS service, using server-side Javascript that consumes data from the calculation view and generates JSON output Write an SAPUI5 view that uses the JSON output from the XSJS service to display the output in a SAPUI5 barchart control. Import pre-build sample XS Applications on SAP HANA Cloud Platform by following Click and Try Sample XS Applications on the SAP HANA Cloud Platform Extent current scenario with PAL(Predictive Analytic Library) by following Using Predictive Analysis Library (PAL) in SAP HANA Cloud Platform Prerequisites You have an account on SAP HANA Cloud trial landscape 1. You have downloaded and installed Eclipse IDE in accordance with Setting up Development tools 2. Note: If you already have an SAP HANA Studio 1.00.70 or later, you can install only "SAP HANA Cloud Platform Tools": You have "Kepler" update site (http://download.eclipse.org/releases/kepler) added to the the list of update sites. 1. Install "SAP HANA Cloud Platform Tools" from the update site - https://tools.hana.ondemand.com /kepler.Note: Select check box "Contact all update sites during install to find required software". 2. 8 Easy Steps to Develop an XS application on the SAP HANA Cloud Platform Posted by Stoyan Manchev in SAP HANA Cloud Platform Developer Center on Oct 17, 2013 1:01:01 PM 8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013... 1 of 14 5/25/2014 7:02 PM

description

sap xs application

Transcript of 8 Easy Steps to Develop an XS Application

Page 1: 8 Easy Steps to Develop an XS Application

Getting Started Newsletters Store

Log On Join UsHi, Guest

Activity Communications Actions

Browse

SAP HANA Cloud Platform Developer Center

13 Tweet 61

Disclaimer: This document relates to Beta functionality available on SAP HANA Cloud Platform trial

landscape.

SAP HANA Cloud Platform provides you with SAP HANA native development capabilities, allowing you to build

and execute native SAP HANA XS applications that run in the cloud.

Just imagine having and being able to do all this in one place:

SAP HANA analytic power

Develop straight into the Eclipse IDE, integrated with the SAP HANA database, and easily:

- Manage SAP HANA artifacts, such as SAP HANA schemas and repository packages

- Builde analytic models and XS applications

Enjoy superior performance with the XS engine

Build attractive application user interface with SAPUI5 that consumes and visualizes application data

Everyone can access and try out the capabilities of the SAP HANA Cloud Platform by developing an

application in the Eclipse IDE and deploying it in the SAP HANA Cloud

Each cloud user and their data is secured and isolated from other users

Grant rights to other users to use your application

Scenario

To develop your first XS application, you need to complete the following activities:

Connect to SAP HANA Cloud Platform from your Eclipse IDE

Create a XS Project and store it in SAP HANA Repository

Use SAP HANA Modeler and create a calculation view that uses the predelivered data content for SAP

HANA Cloud Platform trial accounts based on the Enterprise Procurement Model reference application

Write an XSJS service, using server-side Javascript that consumes data from the calculation view and

generates JSON output

Write an SAPUI5 view that uses the JSON output from the XSJS service to display the output in a

SAPUI5 barchart control.

Import pre-build sample XS Applications on SAP HANA Cloud Platform by following Click and Try

Sample XS Applications on the SAP HANA Cloud Platform

Extent current scenario with PAL(Predictive Analytic Library) by following Using Predictive Analysis

Library (PAL) in SAP HANA Cloud Platform

Prerequisites

You have an account on SAP HANA Cloud trial landscape1.

You have downloaded and installed Eclipse IDE in accordance with Setting up Development tools2.

Note: If you already have an SAP HANA Studio 1.00.70 or later, you can install only "SAP HANA Cloud Platform Tools":

You have "Kepler" update site (http://download.eclipse.org/releases/kepler) added to the the list of

update sites.

1.

Install "SAP HANA Cloud Platform Tools" from the update site - https://tools.hana.ondemand.com

/kepler.Note: Select check box "Contact all update sites during install to find required software".

2.

8 Easy Steps to Develop an XS application on the SAPHANA Cloud Platform

Posted by Stoyan Manchev in SAP HANA Cloud Platform Developer Center on Oct 17, 2013 1:01:01 PM

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

1 of 14 5/25/2014 7:02 PM

Page 2: 8 Easy Steps to Develop an XS Application

Procedure

Step 1: Create SAP HANA Database Schema and SAP HANA Repository Package

To create an XS application running on SAP HANA Cloud Platform you need to create a dedicated SAP HANA

schema and an SAP HANA Repository package for your account.

You do this by creating a new Trial Instance with name hihanaxs in the SAP HANA Coud Cockpit:

Step 2: Connect the Eclipse IDE to the SAP HANA DB on the Cloud

To open a secured connection from your Eclipse IDE to SAP HANA database, open the SAP HANA

Development perspective and choose Add Cloud System:

In the dialog, enter your Trial account credentials.

Select hihanaxs Trial Instance that was created in Step 1.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

2 of 14 5/25/2014 7:02 PM

Page 3: 8 Easy Steps to Develop an XS Application

Now you can browse and manage the schema and repository package dedicated to your account and

application.

The database schema that is prefixed with NEO_ is the development schema. You should store all database

artifacts connected to application development like tables, stored procedures, and so on in this schema. The

database schema that is prefixed with DEV_ is the private schema of the developer user. You should not

create database artifacts that are to be used in your cloud applications in this private schema.

Step 3: Create an XS Project And Upload It On the SAP HANA Cloud Platform

Now it is time to create an XS Project (with name hihanaxs) that you will later use to store the XSJS

services, the SAPUI5 views, the user roles, and so forth.

Open the Project Explorer view and navigate to File -> New Project. Select XS Project.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

3 of 14 5/25/2014 7:02 PM

Page 4: 8 Easy Steps to Develop an XS Application

To enable your XS application to run on the XS engine, you need to add two additional files to your XS

project. To do so:

Create an empty file with the name .xsapp1.

Create a file with the name .xsaccess. Copy the following code in the new file:2.

{

"exposed" : true,

"default_file": "index.html"

}

This configuration determines that the application is exposed via HTTPS. Although no authentication is

specified, all SAP HANA XS applications in the SAP HANA Cloud Platform use SAML. To be able to access

your application, users need to be authenticated with their SAP HANA Cloud Platform credentials.

Activate your Project in SAP HANA Repository

Now you have an XS project that is stored only on your file system, you need to commit your project to the

SAP HANA Repository. You do this by using the team management functionality provided by SAP HANA

Repository:

Create a local repository workspace that is mapped to your SAP HANA System. Open the context menu

of your XS project and select Team -> Share.

1.

In the dialogue, choose SAP HANA Repository for Repository type. Choose Next.2.

The picture below illustrates the configuration of your Repository workspace:

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

4 of 14 5/25/2014 7:02 PM

Page 5: 8 Easy Steps to Develop an XS Application

To upload your XS project on the SAP HANA Cloud Platform and start your hihanaxs application on the the

XS Engine, open the context menu of the hihanaxs project and select Team -> Activate.

Now, in the SAP HANA Systems view, you can see that your project is stored in the SAP HANA repository:

If some objects in your repository package are hidden you should do the following:

In Eclipse IDE open Window -> Preferences -> SAP HANA -> Modeler -> Content Presentation.1.

Select Show all objects checkbox.2.

As a next step, you will create a calculation view, then activate it, and finally select data from the view.

Step 4: Calculation View Modeling

To create an SAP HANA calculation view that shows the gross and net amount of sales orders per company,

you use the SNWD_SO and SNWD_BPA tables in the EPMSAMPLEDATA schema.

Warning:

In the following procedure, the <username>trial account is just an example of a name of a trial account. You

need to replace it with your actual trial account name.

To create the calculation view, go to SAP HANA Systems view and follow the steps:

In your <username>trial.hihanaxs.hihanaxs repository package, create a new calculation view of type

Graphical with the name SO_CV.

1.

In the Scenario Editor, add a Join node.2.

In the Join node you just created, drag and drop the SNWD_SO and the SNWD_BPA tables from the

EPMSAMPLEDATA schema.

3.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

5 of 14 5/25/2014 7:02 PM

Page 6: 8 Easy Steps to Develop an XS Application

Join the two tables by the BUYER_GUID and the NODE_KEY columns.4.

Select the GROSS_AMOUNT, the NET_AMOUNT, and the COMPANY_NAME columns.5.

From the context menu, choose Add To Output.6.

Link Join node with the Aggregation node in Scenario Editor1.

Select the Aggregation node.2.

Select the GROSS_AMOUNT, the NET_AMOUNT, and the COMPANY_NAME columns.3.

From the context menu, choose Add To Output.4.

Select the Semantics node and in the Details pane1.

Deselect the Enable Analytic Privilege checkbox under Properties2.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

6 of 14 5/25/2014 7:02 PM

Page 7: 8 Easy Steps to Develop an XS Application

You disable analytic privileges checks for simplicity, so that you can execute this scenario easily. You can, of

course, extend this application by enabling the analytic privileges. You can read more about analytic privileges

in Chapter 11 of the SAP HANA Developer Guide.

Save and activate your SO_CV calculation view.

Due to user isolation requirements of SAP HANA Cloud Platform and security reasons, the default SAP HANA

database user has restricted privileges and cannot use the Open Data Preview context.

To be able to see and select data from the calculation view that you have just activated, the user needs to be

granted additional select privileges. You do this by executing the procedure

HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS (you can read more about Specific procedures for SAP

HANA Cloud Native Development) in the SQL Console:

CALL "HCP"."HCP_GRANT_SELECT_ON_ACTIVATED_OBJECTS"

After a successful execution, you need to refresh your Catalog folder to see and select content from the generated

column view in the _SYS_BIC schema:

Step 5: Develop an XSJS Service Running on the XS Engine

Now you can already read data from the the SO_CV calculation view, process it, and return the output in JSON format.

One way to do this is by implementing an XS Service (XSJS) using server-side Javascript. XSJS services can be called

using HTTP or HTTPS.

To do so, in the hihanaxs project create a new folder with the name services. In this folder, create a new file with the

name salesOrderService.xsjs. Copy the following code in the file:

var select_all_sales_orders_query = 01.

"SELECT TOP 10 COMPANY_NAME, NET_AMOUNT, GROSS_AMOUNT " + 02.

"FROM \"_SYS_BIC\".\"<username>trial.hihanaxs.hihanaxs/SO_CV\" " + 03.

"ORDER BY GROSS_AMOUNT DESC"; 04.

function close(closables) { 05.

var closable; 06.

var i; 07.

for (i = 0; i < closables.length; i++) { 08.

closable = closables[i]; 09.

if(closable) { 10.

closable.close(); 11.

} 12.

} 13.

} 14.

function getSalesOrders(){ 15.

var salesOrdersList = []; 16.

var connection = $.db.getConnection(); 17.

var statement = null; 18.

var resultSet = null; 19.

try{ 20.

statement = connection.prepareStatement(select_all_sales_orders_query); 21.

resultSet = statement.executeQuery(); 22.

while (resultSet.next()) { 23.

var salesOrder = {}; 24.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

7 of 14 5/25/2014 7:02 PM

Page 8: 8 Easy Steps to Develop an XS Application

Warning:

Do not forget to replace <username>trial.hihanaxs.hihanaxs with the path to the package in which you created the

SO_CV column view.

Activate the new files.

Step 6: Create an SAPUI5 View to Visualize Data

To visualize the output of salesOrderService.xsjs service that you just created, you can use SAPUI5.

In your hihanaxs application, you will create one view that will display a single bar chart component with the ten

companies that have accrued most of the sales orders.

For more information about SAPUI5, see SAPUI5 SDK - Demo Kit.

Create a new folder with the name views. In this folder, create a new file with the name Companies.view.js. Copy the

following code in the file:

salesOrder.company_name = resultSet.getString(1); 25.

salesOrder.net_amount = resultSet.getDouble(2); 26.

salesOrder.gross_amount = resultSet.getDouble(3); 27.

salesOrdersList.push(salesOrder); 28.

} 29.

} finally { 30.

close([resultSet, statement, connection]); 31.

} 32.

return salesOrdersList; 33.

} 34.

function doGet() { 35.

try{ 36.

$.response.contentType = "application/json"; 37.

$.response.setBody(JSON.stringify(getSalesOrders())); 38.

} 39.

catch(err){ 40.

$.response.contentType = "text/plain"; 41.

$.response.setBody("Error while executing query: [" + err.message + "]"); 42.

$.response.returnCode = 200; 43.

} 44.

} 45.

doGet(); 46.

sap.ui.jsview("views.Companies", { 01.

/** Specifies the Controller belonging to this View. 02.

* In the case that it is not implemented, or that "null" is returned, this View does not have a Controller. 03.

* @memberOf views.Companies 04.

*/ 05.

getControllerName : function() { 06.

return null; 07.

}, 08.

/** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.09.

* Since the Controller is given to this method, its event handlers can be attached right away. 10.

* @memberOf views.Companies 11.

*/ 12.

createContent : function(oController) { 13.

var topSalesCompanyBarChart = new sap.viz.ui5.Bar("topSalesCompanyBarChart", { 14.

width : "50%", 15.

height : "50%", 16.

xAxis: { 17.

title: { visible: true, text : "EUR" } 18.

}, 19.

title : { 20.

visible : true, 21.

text : 'Top Ten Companies by Sales Orders Volume' 22.

} 23.

, 24.

interaction: new sap.viz.ui5.types.controller.Interaction( 25.

{ 26.

selectability: new sap.viz.ui5.types.controller.Interaction_selectability( 27.

{ 28.

mode: sap.viz.ui5.types.controller.Interaction_selectability_mode.single 29.

}) 30.

}), 31.

dataset : topSalesDataset = new sap.viz.ui5.data.FlattenedDataset({ 32.

// a Bar Chart requires exactly one dimension (x-axis) 33.

dimensions : [ { 34.

axis : 1, // must be one for the x-axis, 2 for y-axis 35.

name : 'Company', 36.

value : "{company_name}" 37.

}], 38.

// it can show multiple measures, each results in a new set of bars 39.

// in a new color 40.

measures : [ 41.

{ 42.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

8 of 14 5/25/2014 7:02 PM

Page 9: 8 Easy Steps to Develop an XS Application

To visualize this view in a browser, you have to embed the view into an HTML page. To do so, in root folder of the

hihanaxs project, create a file index.html. Copy the following code in the file:

Activate the new files.

Step 7: Add Users for Your XS Application

As mentioned before, all SAP HANA XS applications in the SAP HANA Cloud Platform use SSO (Single Sign-On) with

SAML for user authentication. As an owner of the hihanaxs application, you can grant access to the application to other

users. The Companies view you created in the previous step uses data from the SO_CV calculation view. Therefore,

users that are accessing the Companies view need to have SELECT privileges for the SO_CV calculation view.

You grant users SELECT privileges to the SO_CV calculation view by defining a relevant SAP HANA DB role and

assigning it to the users of your application.

To do so, in the hihanaxs application, create a folder with the name roles. In this folder, create a new file with the name

model_access.hdbrole that has the following content (read more about role definition syntax in Chapter 11 of SAP

HANA Developer Guide):

role <username>trial.hihanaxs.hihanaxs.roles::model_access {

sql object <username>trial.hihanaxs.hihanaxs:SO_CV.calculationview : SELECT;

}

Warning:

The <username>trial account is just an example of a name of a trial account. You need to replace it with your actual

trial account name.

Activate the model_access role.

To check whether your role is activated, execute the following statement in the SQL console:

SELECT * FROM "HCP"."HCP_ACTIVATED_ROLES"

Your model_access role should be listed in the result.

As a last step, you need to assign this role to your SAP HANA Cloud Platform user (or any other SAP HANA Cloud

name : 'Gross Amount', // 'name' is used as label in the Legend 43.

value : '{gross_amount}' // 'value' defines the binding for the 44.

}, 45.

{ 46.

name : 'Net Amount', // 'name' is used as label in the Legend 47.

value : '{net_amount}' // 'value' defines the binding for the 48.

} 49.

], 50.

// 'data' is used to bind the whole data collection that is to be 51.

// displayed in the chart 52.

data : { 53.

path : "/" 54.

} 55.

}) 56.

}); 57.

var salesModel = new sap.ui.model.json.JSONModel(); 58.

salesModel.loadData("services/salesOrderService.xsjs"); 59.

topSalesCompanyBarChart.setModel(salesModel); 60.

return topSalesCompanyBarChart; 61.

} 62.

}); 63.

<html> 01.

<head> 02.

<meta http-equiv="X-UA-Compatible" content="IE=edge"> 03.

<script src="/sap/ui5/1/resources/sap-ui-core.js" 04.

id="sap-ui-bootstrap" 05.

data-sap-ui-libs="sap.ui.ux3,sap.ui.commons,sap.ui.table,sap.viz" 06.

data-sap-ui-theme="sap_goldreflection" > 07.

</script> 08.

<script> 09.

sap.ui.localResources("views"); 10.

var view = sap.ui.view({id:"companies", viewName:"views.Companies", type:sap.ui.core.mvc.ViewType.JS});11.

view.placeAt("content"); 12.

</script> 13.

</head> 14.

<body class="sapUiBody" role="application"> 15.

<div id="content"></div> 16.

</body> 17.

</html> 18.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

9 of 14 5/25/2014 7:02 PM

Page 10: 8 Easy Steps to Develop an XS Application

Platform user). As a result, your user will be able to open the application URL and see the Companies.view.js SAPUI5.

SAP HANA Cloud Platform provides specific procedures for SAP HANA native development that you can use.

In the SQL console, execute the statement "HCP"."HCP_GRANT_ROLE_TO_USER"(ROLE_NAME, USER_NAME);

with your user and account data:

call "HCP"."HCP_GRANT_ROLE_TO_USER"

('<username>trial.hihanaxs.hihanaxs.roles::model_access','<username>');

Warning:

The <username>trial account is just an example of a name of the trial account. You need to replace it with your actual

trial account name.

In addition, replace <username> with your actual SAP HANA Cloud Platform user.

For more information about the native development on SAP HANA Cloud Platform, see specific procedures for SAP

HANA native development.

Step 8. Running the Application

Open the SAP HANA Cloud Platform cockpit and open the HANA XS Applications menu. Open hihanaxs application

details by clicking on hihanaxs link.To see the actual application and the visualization of the application data open

Application URl in your browser.

When you open the URL in your browser, you should see something similar to the following:

Top Ten Companies by Sales Orders Volume

Summary

Congratulations! You have just developed your very first XS application on the SAP HANA Cloud Platform!

By understanding the basic concepts illustrated by this blog, you are now ready to dig deeper into native

development on SAP HANA Cloud Platform and create useful and attractive applications to share with other

users.

Make sure you check our future blogs that will give you insights into more SAP HANA Cloud Platform native

development scenarios and enhancements.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

10 of 14 5/25/2014 7:02 PM

Page 11: 8 Easy Steps to Develop an XS Application

Average User Rating

(31 ratings)

13 Tweet 61

Contributor:

Petra Lazarova

Reference

Enhance Your Cloud Application with SAP HANA Search

Click and Try Sample XS Applications on the SAP HANA Cloud Platform

Using Predictive Analysis Library (PAL) in SAP HANA Cloud Platform

Known Limitations

Data Preview menu is not working from the SAP HANA Modeler or the SAP HANA Development perspective.

29298 Views

Tags: cloud, hana, modeler, calculation_view, sapui5, cloud-based, xs, hcp, xsjs, xs_engine, saphanacloud, hana_modeling, saphcp,

saphanacloudplatform, xss_java

1 2 3 … 6

142 Comments

Like (0)

Matthias Steiner Oct 17, 2013 2:23 PM

Great blog! Really looking forward to the feedback from the community!

Like (1)

Robin van het Hof Oct 17, 2013 2:31 PM

Truly awesome!

This really is a top-notch, end-to-end example (and as such I would feel this would be much better off in

a well-formatted document as opposed to a blog) but many thanks for taking the time to write down this

step-by-step tutorial!

Can't wait for your future posts

R.

Like (0)

Raphael Vogel Oct 17, 2013 3:01 PM

What's the reason for having two schemas created ?

One "development user private schema" and another "Application/Development" schema?

Like (0)

Stoyan Manchev Oct 17, 2013 3:40 PM (in response to Raphael Vogel)

Hi Raphael

this is part of a broader user concept that we are working on and can't be tried on SAP HANA Cloud

Platform Trial landscape. But yes, you are right - in this context it doesn't make sense to have two

schemas created.

Like (0)

Emil Aleksandrov Oct 17, 2013 4:21 PM (in response to Raphael Vogel)

Development schema (NEO_GUID) could be used by many developers in one account. Currently this is

not possible on Trial. And private schema(DEV_GUID) is automatically created by HANA for your HANA

DB user. The private schema cannot be accessed by specific SAP HANA cloud procedures.

Harald Mueller Oct 18, 2013 9:09 PM

Very nice ... HANA is now available at zero €€ within minutes to any developer.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

11 of 14 5/25/2014 7:02 PM

Page 12: 8 Easy Steps to Develop an XS Application

Like (1)

Like (0)

Daniel Vladinov Oct 18, 2013 10:06 PM

Testing from my home (my own 'On-Premise') - no proxy, nothing else from SAP installed, but an older

SAP JVM version... that happen to be the problem!

If the open-db-tunnel command fails with all other parameters being just fine (likewise you're able to run

"neo list-applications" command) and you see in corresponding <SDK>/tools/log/console*.log file an

exception

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid

certification path to requested target

then just get a fresh version of SAP JVM from the https://tools.hana.ondemand.com/#cloud and enjoy

the rest of the nifty hands-on tutorial

Like (0)

rajesh bethamcharla Oct 22, 2013 10:25 AM

Hi Stoyan Manchev

Good one... Thanks for sharing....

Regards,

Rajesh

Like (0)

Vivek Singh Bhoj Oct 22, 2013 6:33 PM

Hi Stoyan,

Thanks for sharing such a detailed step by step procedure with codes

Regards,

Vivek

Like (0)

Niranjan Raju Oct 23, 2013 8:13 AM

Hi Stoyan,

Thanks. The article was helpful indeed and got me up and running with a sample XS app. To take

things a bit further , I tried to create some HDB artefacts like hdbschema and hdbtable. However,

activation of the same goes through fine (no errors) but the schema does not appear under the

CATALOG list. I suppose I still need to grant select to _SYS_REPO on the schema since the artefact

are owned by me? But this can only be done by a System user. How should we go about with Design

time artefacts on HCP/XS (hdbroles, hdbsequence, etc.)

Thanks,

Niranjan

Like (0)

Alexander Gehres Oct 23, 2013 9:54 AM

Just as a hint:

When I tried to open the db tunnel by using the neo cmd tool I got the error that the proxy is not properly

configured.

You have to add the following entries in your system environment variables:

HTTP_PROXY_HOST=proxy.wdf.sap.corp

HTTP_PROXY_PORT=8080

HTTPS_PROXY_HOST=roxy.wdf.sap.corp

HTTPS_PROXY_PORT=8080

Stoyan Manchev Oct 23, 2013 10:03 AM (in response to Niranjan Raju)

Hi Niranjan,

I am glad that you are exited to extend the hihanaxs XS application that is described in this blog.

Now about your questions:

1. Can I create additional schemas? - No, you are not allowed to create different schemas. You should

only use the schema prefixed with NEO_.Of course, you can create a schema in your repository

package, activate it, but you won't be able to use it

2. How to create tables and sequences? - You can create hdbtable, hdbsequence, etc in your

repository package. For schema that would be used as "output" you should set your application schema

(NEO_)

3. How to use hdbroles in my application? You should define a .hdbrole in your repository package

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

12 of 14 5/25/2014 7:02 PM

Page 13: 8 Easy Steps to Develop an XS Application

Like (0)

(read more about role definition syntax in Chapter 11 of SAP HANA Developer Guide). Then you

activate this role. To assign this role to some SAP HANA Platform Cloud user you should call:

call "HCP"."HCP_GRANT_ROLE_TO_USER"('<path_to_your_hdbrole>::

<hdbrole_name>','<cloud_username>');

If you want to assign it to your development user you should call:

call "HCP"."HCP_GRANT_ACTIVATED_ROLES"

Like (0)

Stoyan Manchev Oct 23, 2013 10:27 AM (in response to Alexander Gehres)

Hi Alexander,

thanks for noting this. I just added a link to the SAP HANA Console Client Setup page in the

documentation.

best regards

Stoyan

Like (0)

Ihar Partuhalau Oct 26, 2013 6:54 AM

Hi Stoyan,

For some reason my Catalog node doesn't have _SYS_BIC schema. Could you tell me what I'm doing

wrong?

Thank you,

Ihar

Like (0)

Ihar Partuhalau Oct 27, 2013 2:53 PM (in response to Ihar Partuhalau)

Figured out. Ran step 7 first (Add users to app) - then _SYS_BIC appeared on schema list

Like (0)

rahul kumar Oct 28, 2013 11:41 AM (in response to Stoyan Manchev)

Hi Stoyan,

Nice Blog it helped me to create my 1st application with SAP Hana cloud.

But I am facing some issue while trying to activate Analytical view/Attribute view.

It is giving Null pointer error.

I have tried your blog's STEP no -7 but no luck.

I would appreciate if you would give some suggestions.

Like (0)

rahul kumar Oct 28, 2013 12:55 PM (in response to rahul kumar)

Hi Stoyan,

I am getting the below exception:

An internal error occurred during: "Activation".

java.lang.NullPointerException

Like (0)

Stoyan Manchev Oct 28, 2013 2:49 PM (in response to rahul kumar)

Hi Rahul,

are you able to activate just a simple calculation view or you have problem activating

calculation view SO_CV that is used in the blog?

What is the message that you receive when you click "Save and Validate" button?

rahul kumar Oct 28, 2013 3:00 PM (in response to Stoyan Manchev)

Hi Stoyan,

Thanks for your reply !!!

I am getting this error.

An internal error occurred during: "Activation".

java.lang.NullPointerException

I think that is privileges issue because of that I am not able to activate my views.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

13 of 14 5/25/2014 7:02 PM

Page 14: 8 Easy Steps to Develop an XS Application

Follow SCNSite Index Contact Us SAP Help Portal

Privacy Terms of Use Legal Disclosure Copyright

1 2 3 … 6

Like (0)

Like (0)

rahul kumar Oct 28, 2013 3:02 PM (in response to rahul kumar)

I am not able to activate any type of views(Calculation,Analytic,Attribute).

Like (0)

Nadezhda Shtiplieva Oct 28, 2013 4:30 PM

Hi Stoyan,

I followed the steps but when I opened the URL in my browser, the following error appears : "Identity

Provider could not process the authentication request received... ". Do you have any idea why this

happens?

Thank you,

Nadezhda

Like (0)

Stoyan Manchev Oct 28, 2013 5:06 PM (in response to rahul kumar)

Have you installed SAP HANA Studio from the link in the prerequisites section?

Like (0)

rahul kumar Oct 28, 2013 9:01 PM (in response to Stoyan Manchev)

Yes.

On cloud share's SAP HANA System everything is working fine.I got same issue when I was working

with cloud share system But that issue resolved when I applied Analytical privileges. .

On SAP HANA cloud I don't have all that permissions to make some changes.

Like (0)

rahul kumar Oct 29, 2013 6:43 AM (in response to Stoyan Manchev)

Hi Stoyan,

Waiting for your response.

Like (0)

Stoyan Manchev Oct 29, 2013 9:14 AM (in response to Nadezhda Shtiplieva)

Hi Nadezhda,

It seems that IDP was down for a while. Not everything seems fine.

8 Easy Steps to Develop an XS application on th... | SCN http://scn.sap.com/community/developer-center/cloud-platform/blog/2013...

14 of 14 5/25/2014 7:02 PM