Skip to Content

SAP HANA XS Classic, Enable XSODATA in your SAP HANA XSC Application

test
0 %
SAP HANA XS Classic, Enable XSODATA in your SAP HANA XSC Application
Details
// Explore More Tutorials

SAP HANA XS Classic, Enable XSODATA in your SAP HANA XSC Application

12/02/2018

In this tutorial you willenable XSODATA in the SAP HANA XSC application you just created.

You will learn

  • How to create a simple xsodata service

 

DEPRECATED: SAP HANA XS Classic is deprecated as of SPS02. Please use XS Advanced, and learn about how to get started with the new mission Get Started with XS Advanced Development.

 


Step 1: Create a sub package for your services

Now that you have a table with data in it, you need to be able to access the data and for that you will need to create and .xsodata file which defines an OData service. To start create a new sub package for your services.

Service sub package
Step 2: Create your service definition

Next create a new file library.xsodata and add the following code to it, the file name itself is only important in the sense that it is part of the URL when it is called most important though is that the ending of the file is .xsodata

service namespace "codejam.services" {
	"codejam.data::mydata.Book" as "library";
}
Step 3: Access your service

At this point you should be able to launch your XSODATA file in your browser or right click and choose the OData Explorer to view and see the data from your table.

OData ExplorerRaw broswer output

Congratulations: You have just enabled a simple REST interface for your application.

Optional: Related Information

SAP HANA Development Information - Official Documentation

Next Steps

Back to top