Skip to Content
0

UI5 App reading data from Cloud Database

Dec 13, 2017 at 10:33 PM

353

avatar image

Hello, to introduce my problem please consider the following scenarios:

1.- On premise:

1.1. RFCs are created to populate local DB tables, apply logic and return only the needed data already processed.

1.2. RFCs are exposed as ODATA services

1.3. UI5 Apps are created and data is obtained via ODATA services.

2.- On Cloud (Hana Cloud Database + UI5)

2.1 What is this step's equivalent on cloud? Where and how is data read from Cloud database, processed and exposed as a service for later use on UI5 Application via RFC destination like it's done on On Premise scenario? I'm assuming that "selects", "Inserts" and "Updates" are not performed directly on UI5 controller and data processed there too. I've read a lot and am still confused. Can anyone help me clear this out? I know I can expose hana tables as web services, but what if I need to read data from multiple tables, process data and join them to produce output, should I read each single table on UI5 controller and implement procesing logic there too?

Regards.

10 |10000 characters needed characters left characters exceeded
Former Member

If i'm understand you rite, you want to create ODATA at HCP level?

0

I'm trying to understand what's the right approach when both ui5 app and database are on scp. On premise scenario is clear: ui5 app lives on scp, RFCs (on premise function modules) exposed as ODATA provide data retrieval and logic processing, however, don't know who is responsible for data retrieval and processing when ECC is out of the way.

0

Hi,

Do you want to call odata service on SAP Cloud Platform from your On-Premise system?

0

Summarized: What's the right approach for creating UI5 app on web ide and read/write cloud database? On premise rfc exposed as ODATA contains the logic and returns only the data to be displayed by web app, on cloud, who is responsible for reading/writing database and data processing?

0
Former Member

If you can summrarize your question its will great help for us to understand it.

0

Summarized: What's the right approach for creating UI5 app on web ide and read/write cloud database? On premise rfc exposed as ODATA contains the logic and returns only the data to be displayed by web app, on cloud, who is responsible for reading/writing database and data processing?

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Daniel Degraf
Dec 18, 2017 at 07:48 PM
0

Hi Edgar,

You can have your very own database (ASE or HANA) in the SAP Cloud Platform. Even in trial you can create your own HANA database with a few clicks (SAP HANA/SAP ASE > Databases & Schemas > New (select HANA MDC as Database System)). Make sure to enable Web Access, switch the toggle button to "on" if you want to go through SHINE (a tutorial called SAP HANA INteractive Education, where you can learn how to develop on HANA). You can go through SHINE here: https://github.com/SAP/hana-shine

First option to expose data from HANA: XS Engine

I would recommend that you take a look at XSJS Services and XSOData Services in SHINE. Both are ways to expose data from your HANA system using the built-in application server. Once you've created your system, you can access the HANA web-based development workbench from the SAP Cloud Platform Cockpit (click the created database > Development Tools).

Second option to expose data from HANA: Java

You can use JPA and Apache Olingo to connect to your HANA database and expose an OData Service that can be used in UI5.

Both options can be used in UI5 applications running on SAP Cloud Platform. All you have to do is to create a Destination (Connectivity > Destinations) to your target system (HANA XS or Java).

These tutorials might help:

https://www.sap.com/developer/tutorials/hcpps-hana-create-mdc-instance.html
https://www.sap.com/developer/tutorials/hana-configure.html > here just follow all steps and the related tutorials. Once you got your html page running with an XSOData Service, just copy the URL from the OData Service and create a Destination with it. This destination can be used in the WebIDE Templates, to create e.g. a master detail app.

Best regards
Daniel

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hello Daniel, thanks a lot for your response, was very informative and led me in the right direction.

Just one more question, you say that after I create XSJS or XSODATA, I can set them as destinations for use on my UI5 App, right? so that means that the following is no longer an issue? https://blogs.sap.com/2015/01/12/accessing-hana-xs-odata-in-web-ide-and-beyond/

The people who tried to set their XSJS as destination failed to access the data from UI5 app because of some authentication issue, so they created all sorts of not very practical workarounds for real life scenarios. It was also reported that that problem only happened in trial version, but nobody confirmed if it was not a problem on paid systems.

Regards.

0

Hi Edgar,

on trial you'll have no issues with destinations and SAP HANA MDCs. I have a few UI5 apps in my account using AppToAppSSO as authentication type in destinations against my HANA trial system: UI5 App > Destination with AppToAppSSO > XS Service. You can also use Basic Auth - it's up to you.

Best regards
Daniel

0
Irfan Gokak Dec 14, 2017 at 12:24 PM
0

Hi,

Check this Document (Link SCP to On-premise) and before that expose your on-premise system using Cloud Connector. Click for Cloud Connectors Configuration.

For more info about SAP WebIde click this link and go through the complete course.

This is complete procedure to achieve and solution to your question.

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Thanks for your reply Irfan, however I don't want to connect scp to my on-premise system. What I want is connect ui5 app to cloud database and I also want to know where the logic and data retrieval is implemented?

0

Which cloud database you want to connect?

0

I want to connect UI5 app to an scp hanna database. I've read that one option is to create an XSJS to expose table data, but I've also read that it's not possible to set XSJS service as a destination on web ide at least for trial version (I still don't have confirmation wether it's possible on productive system). What other options are there?

0