Skip to Content
Technical Articles
Author's profile photo SaiNithesh Gajula

Access SAP HANA records from VS (Visual Studio) Code

Hi Everyone. Hope everyone doing well. This Blogs will helps you to view and access SAP HANA records from VS (Visual Studio) Code using in Visual Studio Code Extensions.

If you are new to Visual Studio (VS) Code. You can follow my below my blogs and set up and configuration.

Installing Visual Studio Code and Configuring SAP Extensions in Visual Studio Code

Developing SAP Fiori App using SAP Fiori Tools in Visual Studio Code

Develop SAP UI5 Apps using Visual Studio Code

 

So let us begin……

Step 1: Install VS Code extension SAP HANA Driver for SQLTools by navigating to the extensions window and search for publisher:”SAP”. We can see our required extension. Click on the install. Internally it has a dependency extension (SQLTools) which will be installed automatically.

Can also install directly from Market place

Step 2:  Once extension has installed successfully, click on the SQL Tools on the left side.

Step 3 : Now new window will be prompt on the right side where you can see available database drivers. Click on SAPHANA.

Step 4: Here we need to provide the SAP HANA system details like

  1. Connection name – local name to identify
  2. Connection Group – can be blank
  3. HANA Server – host (Refer below screenshot)
  4. Server Port – port (Refer below screenshot)
  5. Schema – schema (Refer below screenshot)
  6. User name – user (Refer below screenshot)
  7. Password – password (Refer below screenshot)
  8. Encrypted Connection – Let it default. No changes required
  9. SSL Crypto Provider – Let it default. No changes required
  10. SSL Trust Store – Let it default. No changes required
  11. Validate Server Certificate – Let it default. No changes required
  12. Connection Timeout – Let it default. No changes required
  13. Show records default limit – Let it default. No changes required

Step 5 : Once you enter required SAP HANA System Details click on the SAVE Connection.

Step 6 : Click on the connect then it automatically asks to install the SAP HANA driver (@sap/sap-client). Choose to install.

Step 7: Once SAP HANA driver (@sap/sap-client) installed successfully then it will be connected to the SAP HANA system and Tables and Views will be loaded.

Step 8 : Click on the Magnifier icon to view table data and + icon to insert a query.

Step 9: Now we can perform CRUD operation from the console.

 

 

In the same procedure, we can also perform other operations as well.

Yeahhhh!!! Now you have successfully connected to SAP HANA system and can able to the data 🙂

 

Hope you guys like this blog post.

Feel free to comment 🙂

 

Thanks

Sainithesh Gajula

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Cedric Heisel
      Cedric Heisel

      Hey SaiNithesh Gajula ,

      thank you for this great post. It helped me last year connecting to databases hosted on the shared clusters behind zeus.hana.ondemand.com.

      As you maybe know, this HANA service is deprecated and was 'moved' to the Cloud-Foundry-Space area, let's say ... 'as default'.

      However, since this transformation, the database is not running at these kind of clusters... it's now structured a little bit else. The host is now unique, like:

      abcdefg-123456-yxz-987.hana.prod-euXX.hanacloud.ondemand.com

      Since that, the way you described isn't working anymore ... Do you have any idea how to proceed? VS is telling me, that this is the wrong provider for this platform. I know sap is now using 'jdbc drivers'. In my projects, the module '@sap/hana-client' is still working with the 'new' databases .. so this couldn't be the reason ... any ideas 🙂 ?

       

      Thank you and regards,

      Cedric