{"id":25455330,"url":"https://github.com/nickchecan/hana-service","last_synced_at":"2025-07-27T10:34:42.063Z","repository":{"id":106062601,"uuid":"124832174","full_name":"NickChecan/hana-service","owner":"NickChecan","description":"A simple package with tables, views and an oData service to be consumed on SAP products or third party applications","archived":false,"fork":false,"pushed_at":"2020-04-23T02:57:42.000Z","size":21,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-18T00:57:12.785Z","etag":null,"topics":["cloud","cloud-platform-cockpit","database-tunnel","hana","hana-database","hana-mdc","hana-service","hana-trial-instance","hana-xs","neo-environment","odata","sap","sap-cloud-platform","sap-hana","sap-hana-database","xsodata"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NickChecan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-12T04:05:59.000Z","updated_at":"2025-01-14T03:54:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"75de74f4-c262-4229-9e2e-ed65cb8577de","html_url":"https://github.com/NickChecan/hana-service","commit_stats":null,"previous_names":["nickchecan/hana-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickChecan%2Fhana-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickChecan%2Fhana-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickChecan%2Fhana-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NickChecan%2Fhana-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NickChecan","download_url":"https://codeload.github.com/NickChecan/hana-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239389511,"owners_count":19630310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","cloud-platform-cockpit","database-tunnel","hana","hana-database","hana-mdc","hana-service","hana-trial-instance","hana-xs","neo-environment","odata","sap","sap-cloud-platform","sap-hana","sap-hana-database","xsodata"],"created_at":"2025-02-18T00:57:14.982Z","updated_at":"2025-02-18T00:57:16.020Z","avatar_url":"https://github.com/NickChecan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nHana Service\n===================\n\nThe purpose of this project is to implement a simple SAP Hana solution with some basic components to serve and demonstrate the integration between a common third party application to a SAP Hana database.\n\n\u003e **Note:**\n\u003e \n\u003e - A SAP Cloud Platform account will be required in order to maintain a Hana Trial instance for your project.\n\u003e - This project was meant to run on a HANA MDC instance from the Neo environment of the SAP Cloud Platform trial.\n\u003e - The implementation of this application was made to be the first step for the [HanaToPython](https://github.com/NickChecan/HanaToPython-Application) and/or [HanaToJava](https://github.com/NickChecan/HanaToJava-Application) project deployment.\n\n----------\n\nProject Components\n-------------\n\nThis project consist in the creation of three tables, three common views, one database schema and a calculation view.\n\n```\nHanaService\n\t├── Analytics\n\t│    └── CV_SALES_SUMMARY.calculationview\n\t├── CDSScripts\n\t│    ├── SALES_TUTORIAL.hdbschema\n\t│    ├── SalesDDL.hdbdd\n\t│    └── SalesDML.sql\n\t├── SQLScripts\n\t│    ├── SalesDDL.sql\n\t│    └── SalesDML.sql\n\t├── Services\n\t│    └── api.xsodata\n\t├── xsjs\n\t│    ├── delete.xsjs\n\t│    ├── example.xsjs\n\t│    ├── insert.xsjs\n\t│    ├── read.xsjs\n\t│    └── update.xsjs\n\t├── SalesData.calculationview\n\t└── README.md\n```\n\nAll the tables creation and data preparation will be performed within the scripts at the **CDSScripts** folder.\n\nIt is important to notice that the files available at the **SQLScripts** folder is for merely demonstration. Although, you can use these scripts to prepare and study the development environment behavior or other implementation scenarios. \n\n----------\n\nGetting Started\n-------------\n\nBefore importing this project to your Hana workspace, it is necessary to make sure the prerequisites steps are properly done in your development environment.\nThe installation procedure described in this documentation will assume you've already properly connected your eclipse IDE to your Hana Trial instance.\n\n#### \u003ci class=\"icon-layers\"\u003e\u003c/i\u003e Prerequisites\n\n - Hana Trial Instance \u003c/br\u003e\nThe Hana trial instance should be created through the [SAP Cloud Platform cockpit](https://account.hanatrial.ondemand.com/) using the **HANA MDC**\u003csup id=\"a1\"\u003e[1](#f1)\u003c/sup\u003e database system in the *Database \u0026 Schemas* area.\n\n - SAP Cloud SDK \u003c/br\u003e\nThe SAP Cloud Platform **Neo Environment SDK**\u003csup id=\"a2\"\u003e[2](#f2)\u003c/sup\u003e will also be necessary to open a **database tunnel**\u003csup id=\"a3\"\u003e[3](#f3)\u003c/sup\u003e. \nThis tool can be downloaded from the [SAP Development tools](https://tools.hana.ondemand.com/) at the *Cloud* tab.\n\n - Eclipse plugins \u003c/br\u003e\nTo install the Hana Eclipse tools, you can follow the simple procedure described [here](https://tools.hana.ondemand.com/#hanatools) for your current eclipse installation.\n\n\n\u003e **Note:**\n\u003e \n\u003e - This project uses the *Java Web Tomcat 8 3.48.12* SDK.\n\u003e - Remember to make sure the *tools* folder of the downloaded content is properly registered in the *path* of the system environment variables.\n\n\n#### \u003ci class=\"icon-download\"\u003e\u003c/i\u003e Installing\n\nThe steps bellow will guide you through the project installation. The same will automatically create the database schema, his tables and views through the **CDS**\u003csup id=\"a4\"\u003e[4](#f4)\u003c/sup\u003e script activation.\n\n 1. Clone the project to your local repository workspace;\n 2. Refresh your *Repositories* tree and make sure the cloned project is available in the selected workspace;\n 3. Right click in the project package and select the *\"Check Out and Import Project\"* from the context menu. This step will make the same available at the *Project Explorer* for further enhancements;\n 4. Active the imported project;\n\nAfter the activation process, the schema objects will only be visible in the catalog to the \\_SYS\\_REPO user. To enable other users, for example the schema owner, to view the newly created schema and the objects it contains, you must grant the user the required SELECT and INSERT privilege for the appropriate schema object through the following command:\n```\nCALL _SYS_REPO.GRANT_SCHEMA_PRIVILEGE_ON_ACTIVATED_CONTENT('SELECT, INSERT','SALES_TUTORIAL','\u003cUser\u003e');\n```\nAlthough these steps will create and prepare the test environment, the scripts activation mentioned above will not automatically load content in the created tables.\nTo properly insert data in these tables, you can execute the code available at the *CDSScripts/SalesDML.sql* script or prepare your own data for test purpose.\n\n\n----------\n\nDeployment\n-------------\n\nWith all the database components properly created and prepared, the database tunnel can be set to enable other SAP or third party applications to access these information's.\nTo make this possible you will have to use the following command at your terminal:\n\n```\nneo open-db-tunnel -i \u003cDatabase/Schema ID\u003e -a \u003cSubaccount Name\u003e -h hanatrial.ondemand.com -u \u003cSAP User\u003e\n```\n\nAs soon as the command is processed, the user password will be requested.\nIf the tunnel is opened successfully, the terminal will display the Host name, Database type, JDBC Url and the instance number.\nThese information's will be useful to properly connect the mentioned applications to this Hana Service.\n\n\u003e **Tips:**\n\u003e \n\u003e - Always remember to make sure the created instance is up and running through the Cloud Platform Cockpit before execute commands or test any application directly linked to this Hana Service.\n\u003e - You can find more information about the *neo open-db-tunnel* command [here](https://help.sap.com/doc/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/9e3f90f2ead74229ac5c8848ed5bf292.html).\n\n\nAcknowledgments\n-------------\nThe database diagram used in this service was provided by the [SAP Hana tutorial](http://saphanatutorial.com/) web site. The learning materials there are simply AWESOME and totally worth attention.\n\nThe [SAP blogs](https://blogs.sap.com/) has proven to be a great reliable source of information for developers to study and be up to date with new SAP technologies and products, and also helped me a lot with the purpose of this project.\n\nYou can find more information about CDS entities and their management [here](https://help.sap.com/viewer/52715f71adba4aaeb480d946c742d1f6/2.0.02/en-US/e8c150fde4614804831c63a67224ffa8.html).\n\n\u003cb id=\"f1\"\u003e1\u003c/b\u003e: SAP HANA supports multiple isolated databases in a single SAP HANA system. These are referred to as multitenant database containers. More information [here](https://help.sap.com/viewer/6b94445c94ae495c83a19646e7c3fd56/2.0.00/en-US/623afd167e6b48bf956ebb7f2142f058.html). [↩](#a1)\n\n\u003cb id=\"f2\"\u003e2\u003c/b\u003e: The Neo environment is an SAP Cloud Platform proven development environment that lets you develop HTML5-based, SAP HANA XS, and complex Java applications. More information [here](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/1a8ee4e7b27d4293af175f021db8ad9c.html). [↩](#a2)\n\n\u003cb id=\"f3\"\u003e3\u003c/b\u003e: A database tunnel allows you to connect to a remote database instance through a secure connection. More information [here](https://help.hana.ondemand.com/help/6930850a8f9a40489c01ed1aa381946d.html). [↩](#a3)\n\n\u003cb id=\"f4\"\u003e4\u003c/b\u003e: Core Data Services are scripts to build design-time data-persistence models in SAP HANA Extended Application Services. More information [here](https://help.sap.com/viewer/09b6623836854766b682356393c6c416/2.0.01/en-US). [↩](#a4)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickchecan%2Fhana-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickchecan%2Fhana-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickchecan%2Fhana-service/lists"}