Skip to Content
Technical Articles

Modeling in Business Application Studio compared to SAP Web IDE

This document provides a starting point for experienced HANA modelers switching from modeling Calculation Views with Web IDE to modeling in Business Application Studio. Both modeling environments follow the same development concepts. See e.g., this blog for some frequently asked questions around these concepts. If you are interested in how Calculation View modeling in Web IDE differs from working in SAP HANA Studio, have a look at e.g., this blog.

In December 2020 SAP has launched a significantly renewed SAP HANA development tooling environment in Business Application Studio (see e.g., for background about Business Application Studio, see e.g. blog). This is the recommended development tooling for SAP HANA when working in a SAP HANA Cloud or SAP HANA as a service environment. On premise SAP Web IDE for SAP HANA will remain the tool of choice for on premise development.

The difference between Business Application Studio and Web IDE is mainly with respect to setting up the project context, like for example, handling services. In contrast to these changes the development concepts stay the same. In particular projects developed in Web IDE can be used in Business Application Studio and vice versa.

In the following we will highlight how certain tasks can be achieved in Business Application Studio if there is a larger difference to how you would accomplish the task in Web IDE, or if these options did not exist in Web IDE at all.

 

Create a Dev Space:

When starting Business Application Studio you are asked to create a Dev Space or to launch an existing one.

To create a new Dev Space click on the button “Create Dev Space”.

A Dev Space is the environment in which you will develop. You have the option to select which development options you want to make available in your Dev Space environment. Broad categories help you to select the corresponding options. For example, for HANA developments you can select “SAP HANA” which combines several sub-options that typically make sense in this scenario.

For more background information about development spaces, have a look at e.g., this blog.

If you are interested in additional options you can select them as well in this screen.

To start an existing Dev Space click on the play button highlighted by the red rectangle below. If you have not used your Dev Space for a while it will be automatically stopped to save resources.

After the Dev Space is running you can launch it by clicking on its name which is visualized by the arrow below.

 

If you’ve started a new Dev Space which contains no projects, you can for example clone a project using Git or create a new project using a template. These options are also available in the Welcome screen (see below).

Afterwards you will have the option to open the project in a workspace to work on the project. In an open workspace you can also import a project from the local filesystem (see “Import a project” below).

 

Use Workspaces:

A workspace in Business Application Studio is similar to a workspace in Web IDE. A project can be added to a workspace and is shown in the Project Explorer afterwards. We recommend to use one project as the root of the workspace, i.e. not to use the folder “projects” itself as the root:

 

Additional projects can be added to the open workspace by using the “Add Folder to Workspace” option under “More Actions”

 

A workspace is tied to a path on the file system on which you can also navigate in the terminal. You can open Workspaces via the File menu:

 

Screen layout

On the left you see your workspace which in the upper part contains the file perspective of the File Explorer. Here you see the files that make up your project. You start your work on your artifacts in the File Explorer using graphical and non-graphical editors. This is also where you move, copy, and delete your artifacts. You can see this as analogous to a file system tree.

In the HANA Project Explorer in the lower left part below you see the subset of files from the File Explorer that represent design time artifacts which can be deployed to HANA. Here HANA specific actions are available, like deploying to HANA, or binding services.

In the HANA Project Explorer, you can also easily see which design time files differ from the deployed version. This difference is indicated by the text “pending deployment” in the Tree View perspective and is propagated upwards to including folders.

By switching to the Pending Deployment perspective, only changed design time files are shown

 

The positions of the HANA Project and File Explorer can be re-arranged via drag&drop with the mouse.

In the lower right you find the terminal that can be used to work on your project files using linux-like commands and you also find deployment messages there.

The working area for graphical and non-graphical editors can be found on the upper right part.

Create a project based on a template:

In the Welcome screen (you can find the Welcome screen in menu “Help”) select “Create project from template”

Or select the option from the file menu:

During the template wizard of the template “SAP HANA Database Project”

you have the option to connect your project to a Cloud foundry (HDI) service.

If you choose to bind to a Cloud Foundry service instance you will have the option to bind

  • to an existing service. This means that your project will be deployed into the already existing container later
  • to a new service. In this case the behavior will be similar to the behavior in Web IDE but you have in addition the option to define the name of the to-be-created service.

If you choose not to bind a service you can bind a service to your project manually later

 

Import a project:

If you want to import a project e.g., from Web IDE without using Git, you can use the Import option of the Welcome screen:

 

Alternatively you can upload your file manually and unzip it using the terminal:

 

Project folder location:

Per default your project will be created in folder /home/user/projects

In Business Application Studio you will have also access to your project files via the terminal

This gives you the flexibility to manage your artifacts using linux-like commands.

Git:

For version control of your artifacts you can use the integrated Git tooling:

Alternatively, you can use the terminal. To configure your git-configuration in the terminal run e.g.,

git config –global user.email <yourEmail>

git config –global user.name <Account Name>

 

You can clone the repository into your current path if the git-project already exists:

e.g., git clone https://github.com/username/repo.git

If no project exists yet in Business Application Studio you can initialize your git repository in the respective path with:

git init

afterwards select the remote repository:

git remote add origin <git repository>

For more details see, e.g., here.

 

Select an action:

Developing in Business Application Studio makes less use of context menus. Instead actions are selected via the menu

If you have selected an object in Business Application Studio you can also

  • use the short-cut CTRL+SHIFT+P
  • press F1 to open the command dialog

For example, to create a Calculation View you would press F1 and then type “hana” to filter for “SAP HANA: Create HANA Database Artifact”. Also the option to open the Database Explorer would become available by this.

Define your own shortcuts:

You can define your own keyboard shortcuts:

Here is an example if you want to create a HANA Database Artifact by pressing CTRL+SHIFT+a

 

Manage services:

Services that are defined in your mta.yaml file of your project appear under “Database Connections” in the HANA Project Explorer. Their order is determined by the sequence in which their descriptions are listed in the mta.yaml file.

To bind an existing service or to create and bind a service to your project a similar dialog like in Web IDE is available. You can start the dialog with the the button “add database connection” in the HANA Project Explorer:

This dialog will add a service description to your mta.yaml file. Depending on the option that is selected in the dialog, the service will be created first. In addition the selected service will also be bound to the service reference in the mta.yaml file. In the next section it will be shown how you can also perform these steps of service creation, service referencing, and service binding individually.

 

Service creation

To create a user provided service, use F1 and type “service” to select the creation of a user provided service instance: “Create a user provided service instance”

To create an HDI service select “Create a new service instance” instead and select type “hana” and “hdi-shared”

 

You can also create a new service while binding a service to your project (see “Bind a service to your project”)

 

For a user provided service something similar to the following would be required in the definition:

{

"host": "<end point>",

"port": "443",

"user": "<user>",

"password": "<password>",

"driver": "com.sap.db.jdbc.Driver",

"tags": [

"hana"

],

"endpoint": "https://api.cf.sap.hana.ondemand.com",

"encrypt": true,

"validate_certificate": false

}

Refer to a service in your project

To make use of the newly created service or an already existing service edit the mta.yaml file and add e.g., the sections below:

requires:

[…]

- name: service1

  group: SERVICE_REPLACEMENTS

  properties:

    key: ServiceName_1

    service: ~{the-service-name}




resources:

[…]

- name: service1

  type: org.cloudfoundry.existing-service

  properties:

    the-service-name: ${service-name}

These sections in the mta.yaml file indicate that the project expects a service “service1”. It does not bind a service to your project. However, after the changes to the mta.yaml file, “service1” should appear in your HANA Project Explorer. In the HANA Project Explorer you can bind (see next section) a service from your development SPACE to the service “service1” that is listed in the mta.yaml file. Afterwards this service can be used in your project in e.g., .hdbgrants files. For information how to change the SPACE of your project see section “Change the SPACE that is used to search for services”.

 

Bind a service to your project

You can bind/unbind a service to your project with the button to the right of the respective service in the HANA Project Explorer:

 

During the bind dialog you can also create a new service that you want to bind to your project.

The binding information will not modify the mta.yaml file but will be tracked in the .env file instead. Bound services can be used in your project when developing in Business Application Studio. Binding of services has no meaning when deploying the mtar. For this use the service-name approach which is discussed in the next section.

 

Use stable service references

By defining a key for a service in a mta.yaml file, e.g.,:

properties:

  key: ServiceName_1

a stable reference is defined that can be used in e.g., .hdbgrants files even though the service name itself changes (e.g., by binding to another service in Business Application Studio or by deploying a project to a different SPACE).

When deploying to the target SPACE the target service can be defined via a mtaext file (see e.g., documentation deployment extension descriptor):

- name: hdi_db_cross

  type: org.cloudfoundry.existing-service

  properties:

    the-service-name: ${service-name}

  parameters: 

    service-name: service_name_in_target_landscape

 

Alternatively, you could already add the parameters section with the service name of the target system in your development system.

parameters:

   service-name: service_name_in_target_landscape

The parameters section will be ignored when developing in Business Application Studio but will become effective when deploying the mtar later.

This binding of individual services to your project in the HANA Project Explorer gives you the option to flexibly bind different services to your project without adjusting your mta.yaml file.

As the next section shows, you can also easily change the HDI service which determines into which container you deploy in Business Application Studio.

Select container for deployment

The HDI service that determines into which container you deploy is listed under “Database Connections” in the HANA Project Explorer and marked by the following icon:

By clicking on the bind icon of the respective entry you can bind an existing HDI service or create and bind a new HDI service.

The bound service will determine the target container for your project deployments.

This provides an easy means to share a deployment container with other developers. Sharing containers between several developers can also lead to surprising behaviors if the developers overwrite each other’s deployments. In addition, shared target containers might lead to waiting times when different developers try to activate objects at the same time. Therefore, a clear governance for deploying to shared containers should be in place if this approach is used.

 

Change the SPACE that is used to search for services

If you want to change the SPACE that is used when binding/creating services, click on “Targeting” information in the toolbar:

 

Copy / move artifacts

To copy artifacts you can either use commands like “cp” in the terminal or you use the option “Duplicate” from the context menu when selecting your artifact.

To move your artifact you can simply drag and drop the file with your mouse.

If you use the command line to copy Calculation Views you will need to change the id of the view in the XML code afterwards to reflect the new file name:

 

Create a Calculation View:

The dialog is pretty similar to what you know from Web IDE, however, you have to select in which folder you want to create your Calculation View during the creation dialog

When asked for the path where the artifact should be created, place your Calculation Views in or below the “src” folder of your database module folder.

The database module folder corresponds to the db module that you know from Web IDE. When creating a project with the template wizard in Business Application Studio you will be asked explicitly for the name of this module.

See the getting started page for an example how to create Calculation Views in Business Application Studio.

 

Save your development files:

Per default your changes will be automatically saved. If you want to change this behavior you can switch it off in the menu:

 

Deploy your development artifacts:

Managing HANA related artifacts is done in the HANA Project Explorer on the lower left. Here you can select the symbol for “Deploy” to start the deployment at the individual levels:

 

You can deploy e.g., on folder level “src” in the example above or on individual artifact level like t1.hdbtable. If you want to deploy the file that is currently active in the editor you can do so with the symbol on the right of the editor:

 

Open an HDI-Container in Database Explorer:

If the container has been created, you can open it with the “Open HDI container” symbol that is available on the project and target container level:

Do a data preview:

A similar data preview mechanism to the one in Web IDE will be added soon. As an interim solution  open the HDI container in Database Explorer and start the data preview there:

If you want to do a data preview on intermediate nodes, please follow as an interim solution the approach of SAP Note 2853770.

 

Build a mtar file

To build a mtar file, right-click on the mta.yaml file and select “Build MTA”

After a successful built the mtar file will become available below the folder “mta_archives” in the File Explorer. It can be deployed by right-clicking on the file and selecting “Deploy MTA Archive”.

For more information on how to use continuous integration for automated deployment, see e.g., tutorials

14 Comments
You must be Logged on to comment or reply to a post.
    • Hi Greg,

      not sure where this question is coming from in the context of the current blog. While "SAP HANA" refers rather to the database, "SAP HANA Native Application" is typically used to stress that it is not an application that is developed in e.g., S/4HANA or BW but that is developed using the HANA development tooling.

      Best,

      Jan

  • Thank you for this amazing documentation. Really helpful. Please keep them coming.

    Also if you can also provide some hint on setting up of the GIT repository in SAP BAS, that would great.

    Thanks,

    Pradeep

    • To set up a git repository for your created project please run the following commands in the terminal:

      1. git config --global user.email "your_email" ; git config --global user.name "your_name"
      2. git init ; git remote add origin your_repo_url ;
      3. git config --global credential.helper 'store'
  • BAS and WebIDE for HANA look very similar to me. What's the technical difference between SAP Cloud and HANA on-premise that lead SAP to recommend BAS for HANA Cloud while it is still recommended to use WebIDE for HANA on-premise?

    • Hi,

      there are for example differences in the way services are handled etc. Even though it looks similar from the user perspective (which was what was intended to make the transition smooth) there are some differences in the underlying technology.

      Best,

      Jan

      • Hi Jan,
        Not sure what you mean by " differences in the way services are handled". My understanding was whatever the front-end developer tool (BAS or WebIDE), the underlying technology is based on HDI advanced model. So, I still do not understand why WebIDE is still the recommendation for HANA on-premise while it is now BAS for HANA Cloud. I was also wondering if BAS will become the recommendation for on-premise as well in the future.

        • Hi Mickael,

          there is for example the difference whether the services are running in a Cloud Foundry environment or XS Advanced. Even though these differences are mostly not relevant for customers using BAS or Web IDE they play a role when developing the tools. It might become an option to also use BAS for on-premise development in the future but at the moment there is neither a decision nor a concrete plan of which I am aware.

          Best,
          Jan

  • Hi Jan Zwickel ,

    Great Article!!

    However , You have mentioned to refer SAP Note 2853770 for data preview at intermediate nodes in a Calculation View. The note is not available at the moment. Please find below the screenshot -

     

    Is there any other note or document which we can refer to get the data preview at intermediate nodes in BAS?

     

    Thanks,

    Mirnal

    /
    • Hi Mirnal,

      thanks for your feedback! It seems the "#" of the link got amiss. I have updated the link. In case you still face some issues, please use this link: https://launchpad.support.sap.com/#/notes/2853770 directly.

      The intermediate preview starting from BAS directly should become available very soon.

      Best,

      Jan