Skip to Content
Technical Articles

Connect HANA Cloud Service Instance with SAP Business Application Studio

SAP Business Application Studio is going to be the next version of SAP Web IDE, which is comparatively advanced in features and development efficiencies. It aims to significantly improve the development experience by providing us more control over the environment and code.

SAP Business Application Studio comes out of the box with predefined set of development environments – Dev-Spaces (virtual machine on the cloud where we can develop, build, test and run using run times and tools already installed) tailored for developing SAP business scenarios.

In order to connect SAP HANA Cloud with SAP Business Application Studio, it is assumed that you already have access to SAP Business Application Studio in DEV Space with a type of SAP Cloud Business Application, also you have been authorized with Business_Application_Studio_Developer role that you can find in Cloud Foundry Sub Account details and screenshot is attached for the same.

 

Once Role Collection is done, switch to Trust Configuration and SAP ID Service

Assign, Business_Application_Studio_Developer to the Developer Login ID

 

For additional details on Subscription and Assigning the roles, please refer link below:

https://blogs.sap.com/2020/03/06/sap-business-application-studio-trial-in-sap-cloud-platform-assigning-roles/

  • Once you login to SAP Business Application Studio, you see DEV space is currently stopped, please ignore if it’s already running.

  • Start the DEV space and wait until it’s up and running

  • So, DEV Space is up and running, we click on SAPCAPM and enter inside SAP Business Application Studio and we can move on to SQL Tools highlighted in the image to establish a connection with HANA Cloud Instance.

  • Before we move forward please open a new terminal as shown below

  • Pass the following commands in sequence in terminal:
    1.  mkdir -p ~/.ssl 
    2.  cd ~/.ssl
    3.  wget –no-check-certificate https://dl.cacerts.digicert.com/DigiCertGlobalRootCA.crt
    4.  openssl x509 -inform der -in DigiCertGlobalRootCA.crt -out ~/.ssl/DigiCertGlobalRootCA.pem
    5. cd ~
  • Why do we need these commands ? Answer is:

We need to have a trust-store with DigiCert, for connecting HANA as a Service (cloud service), the connection is required to be encrypted.This gets the proper certificate required for providing an encrypted connection, converts it to the proper format, and places it the the proper location so that the SQL connection configuration can find it.

Please refer link below for more information on this:

https://vscode-sqltools.mteixeira.dev/driver/saphana#Error

  • We need to choose appropriate Database Driver, in our case it is SAP HANA

  • Once chosen, following screen shows up

  • Pass all the required parameters, once passed SAVE CONNECTION and TEST CONNECTION buttons would be enabled.

  • In order to connect with HANA Cloud Service Instance, we need to make some changes in the settings, Open Preferences

SQLTools, Connections

  • Once clicked on connections, it asks us to ADD a value

  • Preference -> SQLTools->Connection->Add Value-> WorkSpace->SQL Connections

 

{
    "sqltools.connections": [
        {
            "dialect": "SAPHana",
            "port": -----,
            "server": "---------------------------------------",
            "name": "--------",
            "database": "DBADMIN",
            "username": "DBADMIN",
            "password": "-----------",
            "hanaOptions": {
                "encrypt": true,
                "sslValidateCertificate": true,
                "sslCryptoProvider": "openssl",
                "sslTrustStore": "/home/user/.ssl/DigiCertGlobalRootCA.pem"
            },
            "isActive": false,
            "isConnected": false
        }
    ]
  • As mentioned above, HANA Cloud Service Instance has to be Encrypted, along with Trust Store and DigiCert in it, same values have been passed to HANA Options with other required parameters.
  • Save and Click on Connect HANA Database Service Instance

  • Successfully, we are now connected with the HANA Cloud Service Instance.

  • Let’s check if it is really working, select HANA DB and click on SQL

  • Write SELECT Query on any exiting database table, in my case I am using DeviceMaster

Select the query and right click on it:

  • HANA Cloud Service Instance is connected and we are getting the result

 

I hope this blog would be useful for everyone looking forward to work on SAP Business Application Studio,please do share your views on this.

References:

Profile on SAP Community:

https://people.sap.com/shiromani.soni

 

Regards

Shiromani Soni

2 Comments
You must be Logged on to comment or reply to a post.