Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
CarlosRoggan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Part 5 : OData provisioning



--

Advertisement:
--  -- No OData expertise required -- --
--





Over-View



Part 1: Preparation

    * 360°-View
    * Pre-View
    * Quick-View on Prerequisites
    * Service-Oriented View
Part 2: Create the Annotation Model
    * Background
    * Create Project
    * Reference the Gateway Service
    * Reference the vocabulary
    * Create the Annotation Model
    * Runtime Artifacts
Part 3: Explore the Annotation Model
    * ABAP-View
    * Model-View
    * XML-View
    * Post-View
Part 4: Connect the Cloud
    * Intro
    * Prerequisites
    * SAP HANA Cloud Connector
          ** Download
          ** Install
          ** Start
          ** Configure 1
          ** Configure 2
          ** Verify
    * Appendix
          ** Access HCP trial
          ** Tip: Avoid SSO

Part 5: OData provisioning (this blog)
    * Find it
    * Configure it
          ** Assign Roles
          ** Create Destination
    * Register Service
    * Summary

Part 6: The Fiori Application
    * Intro
    * Create destination pointing to OData provisioning in HCP
    * Generate application
    * Run the application
    * Summary
Part 7: Trouble-Tips


   

This is part 5 of the end-to-end tutorial which explains how to create a UI5 application based on Smart-Templates, running in the cloud on top of OData provisioning, which exposes an OData service and standalone annotations.
In the previous parts, we've chosen an OData service, created the annotation model in the backend and connected the cloud to the backend.

Now we can go ahead and expose the backend-OData-service and the backend-annotation-model in the cloud, which is done using SAP HANA Cloud Platform OData provisioning (HCP ODP).

Please check the Links section at the end of this tutorial for further readings on HCP ODP.

We are here:



Find OData provisioning



I’ll quickly describe how to access it:

Login to your HCP account (e.g. your trial account at https://account.hanatrial.ondemand.com )

In the navigation pane on the left side of the browser, click “Services”



In the right side, you see a list of all cloud-services.

You can search for “OData provisioning” or type “odata” in the “Search” field.



Click it.



If you’re accessing it for the very first time, it is probably not enabled.

In that case, just click “Enable”





Configure OData provisioning


Click on “Configure OData provisioning”

There are 2 configuration steps to be done:

1. Assign roles

2. Create destinations

The first step is only required if you’re using OData provisioning for the first time.

1. Assign roles

In the left pane, click on "Roles"

In the right pane the role maintenance screen is displayed and the 2 predefined roles for using OData provisioning can be seen in the table:

GW_Admin and GW_User

Your user must have both roles if you want to follow the tutorial.

Both roles are required if you want to use the Administration UIs and if you want to use the OData service.

Assign yourself to the required roles:

- Select (highlight) the first role in the upper table

in the lower left table, click “Assign”, enter your user in the popup and press “Assign”

- Repeat the steps for the second role



The corresponding documentation can be found here:

After assigning the roles, you should be able to access the OData Administration screen (see below).

Note that it might be required to restart the browser and/or clear the browsing history.

2. Create destination

We are here:



What we want to do is to create a destination that points to the SAP NetWeaver system which was used in the first part of our tutorial.

We need such destination, because we want to access the Gateway service and the annotation model in that backend system.

Log in to your HCP account (e.g. https://account.hanatrial.ondemand.com), go to "Services", click on the OData provisioning tile,

then click on "Configure OData provisioning"

In the left navigation pane, click on “Destinations”

In the right pane, the “Destinations” – table is displayed

Click “New Destination”

In the destination configuration section, enter the following info:







































Name A name of your choice
for example:
A_SAP_BACKEND
Type HTTP
Description A description of your choice
for example:
SAP backend system with OData services + Annotations
URL The URL of the host of your backend, with suffix /sap/iwbep
for example:
https://abc123.your.comp.any:44300/sap/iwbep
Proxy Type OnPremise
Authentication BasicAuthentication
This is ok for our tutorial, more advanced authentication types are possible, but require more configuration
User <your user in SAP backend>
Password <your SAP backend user pw>
Additional Properties not required




Press Save

After a short time, the “Check Connection” button appears. You can press it to see the success popup.



Note that this connection test doesn’t provide 100% reliable feedback. It checks the destination, which is a helpful feature, but it doesn’t provide a statement if the destination is usable for OData provisioning.

And here it is, the new destination:



Note:

It is possible to export the destination to your local file system, such that you can import it in a different account.

That’s it for the preparation of OData provisioning.

Finally we can open the tool.

Register OData Service


In order to leave the configuration screen, click on “OData provisioning” in the breadcrumb menu:



Then click on "Go To Service"



The “OData Provisioning Administration” screen is displayed, which is initially empty.



Now we can go ahead and register Gateway services. Only after registration, a service implementation can actually be invoked via a URL. In our case, the service implementation is realized in the SAP backend in ABAP language, and it is exposed on a server that is hosted in HCP.

What we want to achieve is to make the backend Gateway service available in the cloud. Therefore, we have to register it here in OData provisioning.

Click the “Register” button

In the popup, select the destination that you’ve created in the previous step.

Enter a filter string ("gwsample") in the “Search Services” field, then press enter or click the magnifier icon.

The desired service is displayed in the result table:



Now mark the entire row and confirm the popup with “Register”

Back in the Administration screen, we can see that the selected service is added to the list of “Registered Services”.

Finally, we can access the service by clicking the “Open Service Document” link for the registered service.



The URL of the service is as follows:
https://gwaas-<yourUser>trial.hanatrial.ondemand.com/odata/IWBEP/GWSAMPLE_BASIC

The content which is delivered by the service is exactly the same like it was in the first part of the tutorial, where we invoked the Gateway service in the SAP backend.

That's what we wanted to achieve: expose a Gateway service in the cloud.

The next thing that we want to achieve is to access the annotation model in the cloud.

The annotation model is not a service, it doesn't need to be registered.

Remember:

In the third part of our tutorial, we accessed the model via the CATALOGSERVICE which is available as per default in the SAP Gateway Hub.

In our scenario, the OData provisioning represents the Hub. To get detailed information about "Hub" and possible scenarios, you can read this blog

In HCP ODP, we have a CATALOGSERVICE as well, which we use to view our annotation model.

The URL is:
https://gwaas-<yourUser>trial.hanatrial.ondemand.com/CATALOGSERVICE;v=2

The annotation collection:
https://gwaas-<yourUser>trial.hanatrial.ondemand.com/CATALOGSERVICE;v=2/Annotations

There we can find our annotation model:




Summary


In this part of the tutorial, we’ve learned how to access and configure the HCP OData provisioning to make the SAP Gateway OData services visible and accessible in the cloud.

This means that from now on, we could use the SAP HANA Cloud Platform to build and deploy applications which use the OData services that we register in OData provisioning.

One possible way of building such an application is to use the WebIDE to generate a Fiori application based on Smart Templates.

We’ll check out how to do that in the next part of the tutorial.


--
Advertisement:
--  -- Stay tuned and you'll get an app -- --
--



2 Comments