Creating a Project in SAP Business Application Studio

After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Create a project
  • Discover the key tools and navigation features
  • Describe workspaces

Projects in SAP Business Application Studio

Watch this video to learn about file structure in the repository of SAP Business Application Studio.

When a project, or more generally, a folder, is opened in the Explorer view, you can navigate its content (sub-folders and files), open files with the editor, delete or move files, and so on.

The ribbon at the top of the Explorer view shows the name of the folder (capitalized). It is opened as a workspace, meaning that specific Business Application Studio settings can be associated to the folder.

A dedicated topic will discuss Workspaces later on.

Using the Terminal to Manage Projects

If you are familiar enough with Linux Bash commands for files and folders, you can also use the Terminal view to manage the content of a project. You can open the terminal directly on the folder of your choice by right-clicking this folder in the Explorer view and choosing Open in Terminal.

If you want to open the Terminal on the root folder of the workspace, do not right-click this root folder. Instead, right-click the empty space (below the workspace content) or right-click any file (not folder). Then choose Open in Terminal.

Importing and Exporting Development Content

There are different ways to transfer content between your computer and the development space of SAP Business Application Studio.

Import and Export Functionality

Import (Welcome page)

Import project (right-click on blank area)

Imports exclusively .tar or .zip archives and extracts them.

After importing a project, the new folder can be opened in a new workspace.

FileUpload FilesUploads archives or single files

The content of an archive must be extracted with the command line (tar / unzip) after the upload.

Drag and drop from your file explorerWith drag and drop, you can copy files, folders, or both, from your file explorer window to any folder visible In the Explorer view.

To target the root folder, just drop them on the blank area below the workspace content.

DownloadDownloads files and/or folders. Multiple objects are archived as a single .tar file.

To download the entire root folder, right-click the blank area below the file structure.

When using FileUpload Files and drag and drop from your file explorer, the uploaded content might overwrite existing content (same file name and same target folder). You do not get any warning.

Working with Git

SAP Business Application Studio includes the full fledged Git source control system, allowing to manage the life cycle of your code locally, but also to connect to a remote corporate/public Git repository to interact with other developers, share code, and so on.

Git operations can be invoked from the terminal, which is suitable for experienced Git users, or from the Git view which gives you access to the base Git functionality in a more guided approach.

A dedicated lesson covers Git in SAP Business Application Studio.

Create a New Project from a Template

Import a project

The Interface of SAP Business Application Studio

Watch this video to learn about the Business Application Studio Interface.

SAP Business Application Studio offers a lot of different ways to perform the same action: menu commands, keyboard shortcuts, quick commands, and so on. The different views on the left are there to cover your need as a developer. Explore the file structure to create/modify/move/delete files, search/replace within file content, connect your workspace to Git, Debug, and so on.

The list of available views depend on the extensions that are included by default (depending on the kind of application your development space was created for) or added as options.

Some of the views are added automatically as icons to the very left of the screen, others are not; but you can anyway open any existing view by choosing ChooseOpen View.

Some views have their own left pane, while others appear as a sub-pane of another one. For example, the SAP HANA Projects and Java Projects views are presented in the same Explorer view.

To get a neat workplace, you can easily hide the icons of the views you do not need, and also hide any additional extension-related pane.

SAP Business Application Studio Editors

Watch this video to learn about the text editor and running commands.

By default, the Find Command opens in Quick Command mode (see below). So make sure you remove the Quick Command symbol ( > ) if you want to open a file or use a keyword, for example.

Keywords such as view or debug must be followed by a space.

The Quick Command feature is a powerful way to execute repetitive or one-time actions. The available commands come under different categories, such as Cloud Foundry, CDS, graphical modeling, and so on. Exactly like the views, the quick commands depend on the extensions installed in your development space.

The complexity of quick commands can vary. Some are very simple, such as renaming a file; other can be more complex, and sometimes trigger the display of a wizard to execute the task, such as creating a modeling artifact.

The file structure of your Development Space is exposed when you choose the Files & Folders tile in the Welcome screen. The root folder for development content is /home/users/projects.

This folder should not be used to stored directly content in it. Always create a sub-folder, which would typically correspond to a specific project.

The status bar of SAP Business Application Studio provides several types of information. Among these are notifications, information on problems (warnings or errors) in your code,

Another important piece of information if you work in Cloud Foundry is the Cloud Foundry status and, if applicable, Cloud Foundry target. It also provides Git-related information, when a project is Git-enabled, such as the name of the checked-out branch.

Work with Base Features of Business Application Studio

Workspaces in SAP Business Application Studio

In SAP Business Application Studio, development projects are organized into workspaces.

A workspace corresponds to a pointer to one or several project folders, and it also stores a version of the preferences.

By default, when you open a folder in the Explorer view, this folder is opened as a workspace. In turn, only the structure of the corresponding folder files and sub-folders is exposed in the Explorer.

It is also possible to create multi-root workspaces. For that, you open the first folder as a workspace, and then add one or more folders to the same workspace.

Among others, a multi-folder workspace allows you to work in configurations such as the following:

  • Working on two sibling folders in parallel without opening any other of their other siblings
  • Working on two or more folders located at different levels in the folder structure

Compared with a single-folder workspace, a multi-root workspace is materialized by a dedicated file of type .theia-workspace or .code-workspace. For example, myprojects.theia-workspace. This file contains the list of folders associated to that workspace, as well as the SAP Business Application Studio preferences that are defined specifically at the workspace level.

We recommend that you store workspace definition files in a dedicated location under the projects folder. For example, you could create a specific folder projects/workspaces.

After opening a folder (as a single-folder workspace), you can use Add folder to workspace. The new workspace Is initially untitled, and its folders list and preferences are stored by default in the file /user/.theia/untitled.theia-workspace.

Except if you need this workspace only temporarily, you can then save the workspace and choose for the corresponding .theia-workspace file a relevant name and location.

When saving a .theia-workspace file in SAP Business Application Studio, the Save As window does not show any GUI command to create sub-folders. But if needed, you just define new sub-folders by adding them to the Name field. For example, after choosing the /user/projects folder in the dropdown list, you can define the workspace name myworkspaces/ws1.theia-workspace. The folder myworkspaces will be automatically created, along with the ws1.theia-workspace file.

Workspace Preferences

For a given development space, containing one or more workspaces, preferences are organized into a hierarchy as follows:

  • Development space (= User) preferences – These are general preferences common to all workspaces
  • Workspace preferences
  • Folder preferences (only for a multi-root workspace)

The preferences are stored in different locations:

Development Workspace Preferences Storage

Preference levelScenario: One folder opened as a workspaceScenario: multi-root workspace
Development Space / Useruser/settings.jsonuser/settings.json
Workspace<project folder>/.vscode/settings.json<workspace name>.theia-workspace
Folder[Not applicable]<project folder>/.vscode/settings.json

Save progress to your learning plan by logging in or creating an account