Use CAP with the development tool of your choice.
SAP Business Application Studio
Eclipse vs The Jupyter Notebook. When assessing the two solutions, reviewers found The Jupyter Notebook easier to use, set up, and administer. Reviewers also preferred doing business with The Jupyter Notebook overall. Reviewers felt that The Jupyter Notebook meets the needs of their business better than Eclipse. A centralized developer environment running on Kubernetes or OpenShift. A multicontainer workspace for each developer with the ability to replicate with a single click using Eclipse Che factories. Pre-built stacks with the ability to create custom stacks for any language or runtime. So, it's not a blocker for Jupyter Notebooks support. There's WIP PR eclipse-theia/theia#7908 (FS Plugin API) in Theia upstream that fixes running Jupyter Notebooks in vanilla Theia. Che Theia isn't compatible with these changes and needs to be adapted #17357.
For the trial environment, SAP Business Application Studio is only available on Amazon Web Services (AWS) - Frankfurt and US East (VA) regions, see Working with Trial.
SAP Business Application Studio for productive accounts is available in AWS and Azure regions.
Log on to SAP BTP Cockpit
Open the SAP BTP cockpit.
Choose SAP Business Application Studio from the Quick Tool Access section.
Set Up Your Dev Space
Choose Create Dev Space.
In SAP Business Application Studio, provide a name for your dev space.
Choose SAP Cloud Business Application as the application type.
By selecting SAP Cloud Business Application, your dev space comes with several extensions out of the box that you need to develop SAP Cloud Business Applications. For example, CDS tools, Java Tools, and MTA Tools are built in. This saves setup time. See Developer Guide for SAP Business Application Studio for more details.
Choose Create Dev Space.
The creation of the dev space takes a while. You see that the status for your dev space changes from STARTING to RUNNING. See Managing Your Dev Spaces for more details.
Once the dev space is running, choose the dev space by clicking on the dev space name.
Features in App Studio
Starting a New Project from Template
From the Welcome tab, select New project from template.
This starts the project wizard in a new tab.
Select the template CAP Project and choose Next.
- Enter a project name and choose Next.
You can add features now or later to your project.
- Choose to open your application in a new workspace and start working.
Running the Service
Open the Run Configurations view from the activity bar.
Select Create Configuration, the small [+] at the top of the RUN CONFIGURATIONS view.
Select your project from the command palette.
When your application is running, the Debug view and Debug Console open. If you’re prompted to expose a port, do that and open the application afterwards.
See SAP Business Application Studio documentation for more details, like binding services using the run configuration.
Using the SQL Tools
- Open the SQLTools view from the activity bar.
If you’ve bound the service in your run configuration, the connection is already established.
Select Add New Connection, the small database symbol at the top of the CONNECTIONS view.
Select your database, for example, SQLite (Node Native).
Enter a name for the connection.
- Enter the path to your database file, for example
sqlite.db, and choose SAVE CONNECTION.
If you’re prompted to install SQLite, just confirm. Then your connection works.
Using the REST Client
*.httpfile in your project, for example,
In the samples bookshop application, go to
test/request.http. You can use this request together with a running bookshop application.
Biohazard judgment night wiki. Add a request to this file, for example:
- Choose Send Request in the
test.httpfile. You can see the response side by side in editor groups.
Restarting the Server
Restart the server when you did changes to your code using the Debug view restart button.
- Develop a business application using CAP for Java. Start with the SAP Business Application Studio and deploy to SAP BTP in the mission Build a Business Application Using CAP for Java.
- Develop a business application using Node.js and follow the tutorial group Develop a CAP Node.js App Using SAP Business Application Studio
Visual Studio Code
Install Visual Studio Code
- Install Visual Studio Code and launch it.
- Only for macOS: Install the
Add CDS Editor
- Go to Visual Studio Marketplace.
- Choose Install and VS Code opens the details page for the extension SAP CDS language support.
- In VS Code, choose Install to enable the extension.
To run services, just open the Integrated Terminal in VS Code and use one of the
cds serve variants, for example, use
cds watch to automatically react on changes.
Alternatively, you can use the preconfigured tasks or launch configurations you get when creating a project with
cds init.For example, in the Debug view launch cds run with the green arrow button:
You can add and stop at breakpoints in your service implementations. For example, add one to line 10 of our
srv/cat-service.js by clicking in the gutter as shown here:
… then send the …/Books request again to stop there.
Restart the Server
Restart the server when you did changes to your code using the Debug views restart button:
You Need To:
- Follow the instructions in Local Setup.
- Install Eclipse, Spring Tools, and our Eclipse plugin, see Add the SAP Cloud Business Application Tools for Eclipse.
Eclipse Saturn Jupiter
- You’ve installed Docker.
Build an Image
Create a file called
Dockerfile and add this content for a quick setup:
Build your first image:
If you experience issues building that image, replace the first line
FROM node:lts-alpine with
FROM node:12.13.1-alpine3.10 as this version has been successfully tested.
Run a Service in a Container
- Run a container that is based on the image:
You see a
$command prompt from inside the container.
- Move to the home directory:
- Write a simple cds file:
- Run the service:
- Open http://localhost:4004 in a browser to test the application. You forwarded the port
4004when running the container, which allows you to access the application as if it would run locally.
The editor powered by the CDS language server implementation, provides source code validation including diagnostics, like error messages and warnings.
Features and Functions
- Identifiers including not yet imported identifiers with corresponding
- Using paths and artifacts including showing README.md documentation as details
- i18n translation IDs
- Turn on/off formatting regions
- Navigate to definitions
- Navigate to references
- Highlight occurrences
- Create using statement for unknown artifacts.
- Maintain missing translation.
@descriptionannotations to doc comments.
- the whole document
- a selected range
- on-the-fly when completing statements using
- on save (depending on the IDE)
- on paste (depending on the IDE)
- many options, configurable using
- settings file
- command line switches
- config UI with simulation of options for VS Code and Eclipse
- JSON schema for textual support
- also for markdown in doc comments
- An inventory for the current file.
- An inventory for the workspace including query capabilities to select. For example, artifact types, names, also include reuse models.
Snippets for typical CDS language constructs
- Namespace and context
- Entity and projections, …
- Element, associations, and compositions
- Extend and annotate
- Annotations for documentation
With documentation extracts of capire explaining language concepts.
Hover information based on
- Doc comments
- Properties, JSON, and CSV files
- Navigate to translation definitions from translation IDs like
- Show translations on hover.
- Quickfix to maintain missing translations
- Plugin framework for external handlers of annotation domains
Code formatting settings
These are settings coming with the CDS language server implementation.Use the command CDS: Show Formatting Options Configuration.You see the settings, grouped into three tabs: Alignment, Other, and Whitespace
Format on Type, Format on Paste, and Format on Save in VS Code
These are settings from the editor in VS Code:
- Press F1
- Open Preferences: Open User Settings
- Filter for
- Tick the checkboxes to enable the settings.
- Press F1
- Open CDS: Show CAP Release Notes
If there are new release notes, this page opens on startup. You can disable this behavior using the CDS > Release Notes: Show Automatically (
Eclipse Vs Jupyter
- Press F1
- Open CDS: Show Formatting Options Configuration
Preview CDS sourcesYou want to create a preview of a specific .cds file in your project. You can do that using the command line. Here is how you do it in VS Code:
- Open the file you want to preview.
- Open the context menu.
- Select Preview CDS source as… .
- Choose the preview you want to see.
You have the option to add a CAP Jupyter Notebook to your project.
A CAP Jupyter Notebook is a Jupyter Notebook that serves you as a guide on how to create, navigate, and monitor CAP projects. With this approach, we want to encourage the CAP community to work with CAP in the same explorative manner that scientists work with their data, namely by:
- Visually interacting with their code
- Playing with REPL-type inputs (notebook input cells)
- Storing persistent code (notebook output cells)
The cell inputs/outputs are especially useful at later points in time when the project’s details have long been forgotten. In addition, notebooks are a good way to share, compare, and also reproduce projects.
Initiate a new project, for example Bookshop, with the
--add notebook option:
cds add to add it to an already existing project by navigating to that directory and running:
This scrapes the content from the documentation Getting started in a nutshell and converts it to a Jupyter Notebook. This conversion makes the code cells interactive such that you can execute them on your local machine. In Visual Studio Code, you can open, execute, and interact with the CAP Jupyter Notebook as shown below:
Opening and interacting with a CAP Jupyter Notebook in Visual Studio Code
cds watch and enter
debug. This restarts the application in debug mode. Similarly,
debug-brk will start debug mode, but pause the application at the first line, so that you can debug bootstrap code.
If you do this in VS Code’s integrated terminal with the ‘Auto Attach’ feature enabled, debugging starts right away:
If you executed
cds watch on a standalone terminal, you can still attach a Node.js debugger to the process.
Eclipse Che Jupyter Notebook
- In VS Code, use the Debug: Attach to Node Process command.
- In Chrome browser, just open chrome://inspect and click Inspect.