SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Set Up SAP Business Application Studio for CAP Java

Set up the SAP Business Application Studio and create a first service implementation.

Overview

🎓 beginner 20 min. SAP Cloud Application Programming ModelBeginnerSAP Business Technology PlatformJava

You will learn

  • What is SAP Business Application Studio
  • How to create a project skeleton for a CAP Java project
  • How to expose ports of the application in SAP Business Application Studio to the internet.
René Jeglinsky R René Jeglinsky December 10, 2024
Created by December 10, 2024
Contributors

Prerequisites

Prerequisites

Steps

Intro

First things first: You need to set up your development environment and check that everything is running smoothly.

For this tutorial, we use the SAP Business Application Studio as the development tool of choice. SAP Business Application Studio provides a web-based Visual Studio Code-like experience. So, it’s like VS Code, but for your browser.

What’s great about using SAP Business Application Studio?

You get an editor, useful extensions and all the tools required to develop CAP applications and full access to the terminal.

To make sure that everything is set up correctly, this tutorial also includes how to build and run a simple Hello World application. The SAP Cloud Application Programming Model (CAP) supports both Java and Node.js development. But for this tutorial, we’re using Java. The CAP Java SDK is able to tightly integrate with Spring Boot, which provides numerous features out of the box. This means, Spring Boot will be your runtime container.

For a general overview about CAP, you might also want to have a look at the official CAP documentation and the CAP Community.


Step 1 Open SAP Business Application Studio and create your Dev Space

Before you can start using SAP Business Application Studio, you need to create your developer space, where your project will run. Depending on the application you want to develop, you can create different types of dev spaces.

For this tutorial, you will create a dev space personalized for building services and applications with CAP.

Before you begin, check the settings of your browser. You need to add domains ondemand.com and cloud.sap.com to the list of the exceptions to enable pop-ups and new tabs and disable the ad blocker extension if you use one.

  1. Go to the SAP BTP Cockpit on Trial.

  2. Choose SAP Business Application Studio under Quick Tool Access.

    Explained in the accompanying text.
    Explained in the accompanying text.

  3. On the welcome page choose Create Dev Space.

  4. Type CAPTutorial as the name for your dev space and select Full Stack Cloud Application as the application type. Continue with Create Dev Space.

    Shows the selection of available dev spaces, as well as their predefined and additional extensions.
    Shows the selection of available dev spaces, as well as their predefined and additional extensions.

    By selecting Full Stack Cloud Application, your space comes with several extensions out of the box that you will need to develop CAP applications. For example, CDS tools are built in. This saves unnecessary setup time. The creation of the dev space takes a few seconds.

  5. When it’s ready, open your dev space by clicking on the name.

    The page showing all dev spaces. In this example it just holds one dev space.
    The page showing all dev spaces. In this example it just holds one dev space.

    Please note that you’re using the trial version of SAP Business Application Studio. See section Restrictions in the SAP Business Application Studio documentation for more details on how your development environment can be affected.

Step 2 Create application skeleton
+
Step 3 Define a service
+
Step 4 Compile model definition
+
Step 5 Run the application
+
Step 6 Manually open the application
+
Step 7 Inspect OData metadata
+
Step 8 Troubleshooting
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 8
1. Open SAP Business Application Studio and create your Dev Space 2. Create application skeleton 3. Define a service 4. Compile model definition 5. Run the application 6. Manually open the application 7. Inspect OData metadata 8. Troubleshooting

Learn more →