How to use SAP HANA database on SAP Business Technology Platform

Official Content
This documentation is valid for:

A way to build applications that use SAP HANA database is through the Cloud platform available from SAP, called SAP Business Technology Platform (from now on called SAP BTP).

For trial purposes, a free account may be created at hcp.sap.com. From there, it is possible to work within SAP HANA cloud and create a SAP Hana database.

1. Go to SAP BTP Cockpit and log in with your user credentials.

2. Once logged into the page, select Enter Your Trial Account.

image_2021329172441_1_png

3. Enter the trial Subaccount (if you don't have one, create a New Subaccount).

image_2021329173652_1_png

4. Once in the Subaccount, go to the Cloud Foundry Environment and select your Space ("dev", if you don't have one, enable/create it).

image_2021329173535_1_png

5. Inside the CF space, go to SAP Hana Cloud option.

image_2021329173832_1_png

6. Select Manage SAP HANA Cloud.

image_2021329174034_1_png

7. At this point, you can create a Database Instance.

image_2021329174323_1_png

8. Follow the steps shown in the popup window to configure the Database Instance.

   a. Step 1 is to configure the main information of the Database Instance:

        image_2021330164826_1_png

Here, you set up the Organization and the Space associated with the database, the database name (Instance Name), and the administrator user password.

   b. Step 2 is to configure the Instance Space, and it is not allowed in a Free Trial Plan.

        image_2021330162919_1_png

   c. Step 3 is to set up from where you can access the Database Instance. You can choose anything you want, but to avoid any problems, for this test situation we recommend selecting Allow all IP addresses.

        image_2021330163613_1_png

   d. You don't need to go to Step 4 for extra settings referred to the Data Lake. Then, go directly to the Create Instance button.

        image_2021330164258_1_png

9. Once the Instance has been created, go back to the Compact Framework and go to Services > Instances.

image_2021330164650_1_png

10. In the Database Instance created, select the 3 dots and Create Service Key.

image_202133016522_1_png

11. A popup window will be opened to set up the Service Key; you only have to select a name and click on Create.

image_2021330165450_1_png

12. Once the Service Key has been created, open it or download it to obtain the JSON containing the information needed for the connection from GeneXus. From the JSON, you will need the field Host and URL.

image_202133017049_1_png

13. After setting up everything with the necessary data, from GeneXus, in the Data Store properties corresponding to Hana DBMS, configure the following:

JDBC driver = Custom Driver
Custom JDBC Driver = com.sap.db.jdbc.Driver (Json driver field of the Service Key)
Custom JDBC URL = (Json url field of the Service Key)
Server Name = (Host field from the Json of the Service Key)
User ID = DBADMIN
User password = (Password associated with the DBADMIN user, Step 1 of database configuration)
Schema = (It can be any name; GeneXus creates the schema in the database)

14. Once this is configured, GeneXus can use the database created in SAP BTP.