Now that we know how to create SAP HANA XS project in the Eclipse, it is time to link your project with the Repository Workspace. You can do that as follows:
- Right click on the newly created SAP HANA XS project select TEAM * SHARE PROJECT… menu option.
- The SHARE PROJECT dialog box will open. And choose SAP HANA REPOSITORY type and click on Next.
- If your project is set up correctly, you will see a confirmation screen to confirm that the contents of project are stored in the selected repository workspace.
Defining Persistence Model using Core Data Services (CDS)
Nowadays, a growing standard for defining tables or views in SAP HANA is Core Data Services (CDS). Core Data Service is an SAP HANA specific metalanguage that allows the user to define reusable types, entities and views. To create data model using CDS, you must create a new DDL source file within your project.
Keep your devices safe, secure & protected against virus attacks with Quick Heal Total Security
Exposing Data Model as OData Service
SAP HANA makes it easy to expose the data model created by the user as a OData service. In such cases, you should use XS OData object type, which defines an abstracted syntax for mapping views or tables from SAP HANA database to entities within an OData service definition.
There might be bit of curve with SAP HANA XS OData file syntax, but you can develop a read only OData service on top of SAP HANA based persistence model with few code lines. You can also expand the scope of the service to perform operations like create, update, delete, via custom exits written in SAP HANA’s SQL Script or server-side JavaScript.