This end-to-end tutorial helps you set up your SAP BTP Trial and build a full-stack application using:
SAP CAP (Cloud Application Programming Model)
This guide is ideal for students, beginners, and consultants who want to understand how real full-stack applications are built on SAP BTP.
Creating a SAP BTP Trial Account
Go to: https://account.hana.ondemand.com/
Click Create Account → This creates:
A Global Account
Understanding Global Account, Directories & Subaccounts
Global Account:
This is the root-level account that contains all subaccounts, users, quotas, and entitlements.
Directories help organize subaccounts logically such as:
Development
How to create:
Account Explorer → Create → Directory
A Subaccount is where the actual development happens. We can:
Enable services
Steps:
Account Explorer → Create → Subaccount
Entitlements are your service quotas — they define which services your subaccount can use (e.g., HANA Cloud, XSUAA, Destinations).
You can always allocate or modify entitlements for each subaccount.
Boosters help you set up complex scenarios with just a few clicks, such as:
SAP HANA Cloud
Navigate to:
Boosters → Start
A space is a workspace inside Cloud Foundry used for:
Deploying apps
An instance is a running version of a service like:
Destination
Go to:
Subaccount → Services → Instances & Subscriptions
Select SAP HANA Cloud
If you face a permission error → assign the user:
In the left-hand panel, go to Security > Users
SAP HANA Cloud Administrator role collection
Subaccount Admin
Mapping allows CAP HDI containers to deploy artifacts to HANA Cloud.
Instance → Actions → Manage Configuration
Click Sign in to Cloud Foundry → Add Mapping → Review → Save
Open BAS → Create Dev Space:
Full-Stack Cloud Application
Enable:
Open the Dev Space once it turns RUNNING.
Building a CAP Project
Project Steps:
Open the workspace
"cds": {
"build": {
"tasks": [
{
"for": "hana",
"dest": "../db"
},
{
"for": "node-cf"
}
]
},
"requires": {
"db": {
"kind": "hana-cloud"
}
}npm installnpm install -g hana-cli
hana-cli createModuleAdd CDS files - Right click on db folder -
namespace app.e_learning;
using { Language, managed } from '@sap/cds/common';
type string50 : String(50);
entity Categories {
key id : UUID;
name : string50;
description : String(100);
Courses : Association to many Courses on Courses.category=$self;
}
entity Courses : managed {
key course_id : UUID;
course_name : string50;
price : String(100);
Language : Language;
category : Association to Categories;
}using app.e_learning from '../db/e_learning';
service eLearning {
entity Categories as projection on e_learning.Categories;
entity Courses as projection on e_learning.Courses;
}Build Project
cds buildDeploying to SAP HANA Cloud
Go to DB module → Deploy
Now, right click on table and click on Open Data
Running the App Locally
cds bind -2 e_Learning-db:SharedDevKey
npm install
cds watch --profile hybridDeployment to Cloud Foundry
mbt buildDeploy
cf deploy mta_archives/e_Learning_1.0.0.mtarAdding Approuter + XSUAA for Authentication
Provides a single entry point for your application and handles routing & authentication.
Create using BAS:
Right-click → Create MTA Module from Template → Approuter
Authentication is different from authorization
Authentication - Ensures the user is valid and can access the system.
Authorization - Checks the scopes/roles
Adds OAuth2.0-based authentication & authorization.
cds add xsuaa
npm installThis generates:
Generating a Fiori Application:
Using templates:
Right-click → Create MTA Module from Template → SAP Fiori App
Run:
cds watch
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |