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

Develop a CAP JAVA App Using SAP Business Application Studio

Develop a simple CAP Java application using SAP Business Application Studio.

Overview

🎓 beginner 25 min. SAP Business Application StudioBeginnerSAP Cloud Application Programming Model

You will learn

  • โœ”How to create a CAP project
  • โœ”How to develop business applications based on the SAP Cloud Programming Model (CAP)
  • โœ”How to run and test your application using the Run Configurations tool The application you’ll develop is a simple bookshop app consisting of a data model with three entities:
  • โœ”Books
  • โœ”Authors
  • โœ”Genres The data model is exposed via the Catalog Service. The application has some initial data that is used for testing the application, and some custom logic that runs after reading the books from the Books entity. Once you have all the code in place, you will test the application locally.
Paola Laufer P Paola Laufer March 17, 2025
Created by March 17, 2025
Contributors

Prerequisites

Prerequisites

Steps

Step 1 Create new CAP Java project
โ€”

  1. From the SAP Business Application Studio hamburger menu, select File > New Project from Template.

    You can also go to the Command Palette and choose SAP Business Application Studio: New Project From Template.

  2. Select the CAP Project template, and click Start.

    start project
    start project

  3. Enter bookshop as the name for the project.

  4. From the Select your runtime dropdown list, select Java.

  5. Select the SAP HANA Cloud checkbox.

    hana
    hana

  6. Click Finish.

    The project is generated.

  7. From the SAP Business Application Studio hamburger menu, select File > Open Folder.

  8. In the command palette, open the projects folder.

    storyboard
    storyboard

  9. Select your project and click OK.

    storyboard
    storyboard

    The Storyboard is displayed.

    storyboard
    storyboard

Step 2 Define bookshop data schema
+
Step 3 Define the bookshop service
+
Step 4 Add sample data
+
Step 5 Create a Java class for the custom event handler
+
Step 6 Test the app with local database
+
Step 7 Deploying your app
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 7
1. Create new CAP Java project 2. Define bookshop data schema 3. Define the bookshop service 4. Add sample data 5. Create a Java class for the custom event handler 6. Test the app with local database 7. Deploying your app

Learn more →