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.
Showing results for 
Search instead for 
Did you mean: 
Product and Topic Expert
Product and Topic Expert

With this blog post series we provide an update with the latest information on getting started with SAP HANA Cloud on the SAP Cloud Platform.

  1. About SAP HANA Cloud

  2. SAP HANA Cloud Getting Started

  3. SAP HANA Cloud and SAP Business Application Studio

  4. HDI with SAP HANA Cloud

  5. SAP Analysis for Microsoft Office and SAP HANA Cloud

  6. Cloud Foundry Advanced

  7. SAP HANA Cloud and SAP BTP Trust

  8. Data masking and data anonymization

  9. Predictive Analysis Library (PAL) and Automated Predictive Library (APL)

  10. Remote data sources and virtual tables

  11. OData with SAP HANA Cloud <=

  12. SAP HANA Cloud Graph

  13. Role Attributes

  14. SAP HANA Cloud and Smart Data Integration

For more information about the free trial, see

For the new features overview posts, see

Questions? Post as comment.

Useful? Give us a like and share on social media.


Hands-On Video Tutorials

philip.mugglestone just added another video tutorial to the SAP HANA Cloud series. In this blog, you will find the video embedded with some additional information and resources. Following along in the patented zero-to-hero format, you will be ready to start working with OData with minimal effort and no time wasted.

You can watch the video tutorial in a little under 10 minutes. What you learn is

  • How to use a Yeoman app generator to create a sample multi-target app (MTA) which automatically creates the OData services for a chosen schema in SAP HANA Cloud

  • How the code works and what apps, services, and database catalog objects get created

  • How to use Postman to GET, POST, and DELETE data using the OData Services

As development environment we use the SAP Business Application Studio and the free 90-day SAP Cloud Platform trial environment for which you can sign up here:

To follow along you will need some basic understanding of the SAP Cloud Platform concepts and be familiar with global and subaccounts, Cloud Foundry, destinations, subscriptions, identity provider, SAP HANA Cloud, and HDI. In case you are new to the SAP Cloud Platform or could use an update, please first join our onboarding program:

As we know your time is precious, this will be a low-code affair as we will be using Yeoman to provide the scaffolding for our app supplemented with sample code from SAP HANA Academy GitHub repository:

Ready? Let's make some REST calls!

What Exactly is OData (again)? 

According to Microsoft (where the technology is coming from), as documented in Welcome to OData

OData (Open Data Protocol) is an ISO/IEC approved, OASIS standard that defines a set of best practices for building and consuming REST APIs. It enables creation of REST-based services which allow resources identified using Uniform Resource Locators (URLs) and defined in a data model, to be published and edited by Web clients using simple HTTP messages.

In more digestible terms, it is a way to interact with data sources over the web.

See Understanding OData in 6 steps for a bit more background from or (when you have bit more time), see blog series


How Hard Can It Be? 

Working with OData using the SAP HANA XS classic model is not that difficult.

Create a file with the .xsodata file extension in your favourite IDE, say SAP HANA Web-based Development Workbench, and enter the service definition.

As documented,

However, this technology is deprecated and no longer available for SAP HANA Cloud.
service namespace "my.namespace" {
"sample.odata::table" as "MyTable";


Working with OData using SAP HANA XS Advanced model and the SAP Cloud Platform Cloud Foundry environment for SAP HANA Cloud is a bit more challenging in particular when you need the current OData v4 version or have a larger selection of tables and views to configure. Let's say this approach has some limitations.

An alternative and more recent approach involves the Cloud Application Programming (CAP) model but this provides a bit of a learning curve as it assumes a certain familiarity with CAP, Core Data and Services (CDS), Cloud Foundry, SAP HANA HDI, and OData.

In Comes Yeoman

What if we would have a generator that writes the entire project including the CAP CDS modeling and also performs the SAP HANA configuration - so you can have OData up and running on all the tables and views of a given classical SAP HANA schema in about 5 minutes?

For free?
yo Saphanaacademy Odata

OData on a Classical Schema

In this video tutorial, we install the yeoman OData generator and run it to scaffold the project. We can choose to include support for OData v2 (in addition to v4), add authentication and authorization, and directly build and deploy the app. After adding a role collection and inspecting the apps and services in SAP Cloud Platform cockpit, we interact with some of the OData services using Postman. The tutorial ends with a code walkthrough.

0:00 - Introduction

0:30 - SAP HANA Cloud > Advanced Settings: Allowed connections: Allow all IP addresses

0:45 - SAP HANA database explorer and execute sample schema, table, and view (source: travel_OData.sql)

1:30 - SAP Business Application Studio, create SAP Cloud Business Application dev space, and connect to the Cloud Foundry environment (trial org and space)

2:00 - open Terminal and install a Yeoman generator
npm i -g generator-saphanaacademy-odata

2:30 - Run the yo command and select Saphanaacademy Odata template: enter the app name, SAP HANA Cloud endpoint, database user, password, schema, OData v2 support, authentication and authorization, build and deploy.

3:45 Go to SAP Cloud Platform cockpit > subaccount Security > Trust Configuration: <e-mail> and assign the desired role collection

  • myappodata_read

  • myappodata_write

4:00 Run the application (app router) and the OData service is displayed with all tables and views.

4:45 - for OData v2 append /v2 to the URL, e.g. /v2/srv/Customers

5:00 - Open Postman

5:30 - Authorization: OAuth 2.0 > Get New Access Token:

grant type = password credentials

username = <e-mail trial account)

clientid, clientsecret, and url are defined as environment variables for the app router.
cf env myappodata-app

6:50 - Change URL to srv (instead of app)

7:00 - Use HTTP POST to insert data using JSON format specifying in the header

Content-Type = application/json/IEEE754Compatible=true

7:55 - Code walkthrough

Running travel_OData.sql script in SAP HANA database explorer

Running Yeoman generator in SAP Business Application Studio

Assigning role collection using SAP Cloud Platform cockpit.


Postman access token configuration

Share and Connect

Questions? Please post as comment.

Useful? Give us a like and share on social media.


If you would like to receive updates, connect with me on

For the author page of SAP PRESS, visit

Over the years, for the SAP HANA Academy, SAP’s Partner Innovation Lab, and à titre personnel, I have written a little over 300 posts here for the SAP Community. Some articles only reached a few readers. Others attracted quite a few more.

For your reading pleasure and convenience, here is a curated list of posts which somehow managed to pass the 10k-view mile stone and, as sign of current interest, still tickle the counters each month.

For the SAP HANA Cloud e-bite, see