logo

Are you need IT Support Engineer? Free Consultant

Technology Blog Posts by Members articles

  • By Sanjay
  • 24/04/2026
  • 32 Views

Let's see an end  to end demonstration for creating the CAPM project, entity, service with annotations, create the entry via Post man tool and Preview the Application in Fiori.

Below mentioned detailed points covered in this Blog,

  1. BTP Cockpit and its properties
  2. Creation of CAP Project
  3. Linkage of Entity to the HANA DB in the SAP HANA Cloud central
  4. Post man tool Authorization and Post Operation
  5. Preview in the Fiori Application

BTP Cockpit and its properties:

Create a BTP Cock PIT Trial account and Sub Account.

Idaevangelin_0-1776679820371.Png

In the Instances and Subscription Add SAP HANA Cloud and SAP Business Application Studio.

Idaevangelin_1-1776679820378.Png

Create a Space in the Cloud Foundry, which is a shared, isolated location with an organization (org) used to develop, deploy and manage application and services.

Idaevangelin_2-1776679820383.Png

In SAP BTP Cockpit administrators navigate to security->Role collections, create or edit a collection, and add roles-derived from application templates-to define the granular access.

Idaevangelin_3-1776679820388.Png

Idaevangelin_4-1776679820393.Png

Creation of CAP Project:

In this Business Application studio create a Dev space and create a Project as mentioned below.

Idaevangelin_5-1776679820398.Png

 

Idaevangelin_6-1776679820401.Png

 

Idaevangelin_7-1776679820406.Png

 

Idaevangelin_8-1776679820411.Png

Once Project created a project with workspace created. Here I have created ENTITY_CRUD project. As per below image under DB Node we can create the entity and service for the entity create under SRV node.

gen

Auto-generated folder created during build; contains compiled artifacts from your CDS models. You normally don’t edit this manually.

 .vscode

Holds VS Code-specific settings like launch configs and workspace preferences for development.

app

Used for UI/front-end apps (like SAP Fiori); contains HTML, UI5, or other frontend resources.

db

Defines your data model and database artifacts using CDS files (like itemrecordsdb.cds) and deployment configs (undeploy.json).

gen

Another generated folder used during build/deploy; stores intermediate files created by CAP tools.

mta_archives

Contains packaged .mtar files used for deployment to SAP BTP (multi-target application archives).

node_modules

Stores all installed npm dependencies required for your CAP project.

srv

Defines the service layer (business logic & APIs); CDS files like itemrecordssrv.cds expose entities as OData services.

.cdsrc-private.json

Local configuration file for CAP (like profiles, credentials); usually not committed to Git.

.gitignore

Specifies files/folders (like node_modules) that Git should ignore.

 eslint.config.mjs

Configuration for code linting to maintain code quality and standards.

mta.yaml

Defines how the application is structured and deployed in SAP BTP (modules, resources, dependencies).

package.json

Main project config file listing dependencies, scripts, and metadata.

package-lock.json

Locks exact versions of installed dependencies for consistent builds.

 README.md

Documentation file describing the project, setup, and usage.

Idaevangelin_9-1776679820413.Png

An entity with Itemrecords created. Here I have used ‘manage, cuid’   from @sap/cds/manage which will create a UUID key for every record creation.

Idaevangelin_10-1776679820417.Png

Create a service for itemrecords db which acts as an interface between your data models and outside the world like UI apps or external systems.

Idaevangelin_11-1776679820419.Png

Idaevangelin_12-1776679820421.Png

Once entity and service generated in the project deploy the project using cf deploy mta_archives/<file>.mtar bash commands. After successful deployment we can see service instances created in the BTP cockpit as shown below.

To link the created entity in BAS to SAP HANA Cloud create a service key for the <entity>-db instance as shown from the below steps.

Choose Entity_CRUD-db and click on the navigation panel where service key need to create. In this illustration I have created as ENTITY_CRUD-db-key.

Idaevangelin_13-1776679820426.Png

Idaevangelin_14-1776679820431.Png

Once service key generated, we can see the JSON file in the view parameter. This JSON file needs to upload in the SAP HANA explorer to link the DB.

Idaevangelin_15-1776679820433.Png

Idaevangelin_16-1776679820439.Png

Linkage of Entity to the HANA DB in the SAP HANA Cloud central:

Navigate to Subscribed SAP HANA CLOUD and create instances which allows you to use in-memory computing for real-time transactional and analytical processing. Once instance is created it should be in Running status which indicates Active, available for SQL connections and able to perform data processing, backups and administrative tasks.

Idaevangelin_17-1776679820446.Png

Now, open the SAP HANA database Explorer in the SAP HANA cloud central, click on the + icon where instance type to be chosen as HDI container and choose Apply from JSON string where need to paste the JSON file from the service key entity in the BTP cockpit.

Idaevangelin_18-1776679820454.Png

 

 

Idaevangelin_19-1776679820455.Png

 

 

Idaevangelin_20-1776679820466.Png

Once JSON file applied Entity from the BAS linked to the SAP HANA Cloud central.

 

Idaevangelin_21-1776679820473.Png

 

 

Post man tool Authorization and Post Operation:

To Authenticate authorization in the Post Man tool go to <entity>-auth in the BTP cockpit as shown below.

 

Idaevangelin_22-1776679820478.Png

 

Here I have navigated to the ENTITY_CRUD-auth where service key SK-ENTITY_CRUD is created once service key created a JSON file generated with client ID, client secret, URL.

Idaevangelin_23-1776679820480.Png

 

 

Idaevangelin_24-1776679820482.Png

 

 

 

Idaevangelin_25-1776679820487.Png

 

Client ID, URL client secret mapped to the Authorization in the post man tool and generate the Access Token.

 

Idaevangelin_26-1776679820491.Png

 

 

Idaevangelin_27-1776679820493.Png

 

Using post operation can create a data to the entity in the CAP project.

 

Idaevangelin_28-1776679820496.Png

 

 

Successful created entries showing in the SAP HANA Cloud central.

Idaevangelin_29-1776679820500.Png

 

 Preview in the Fiori Application:

To Preview the data in the Fiori application, In the CAP project search with Open Application Generator and create a List Report page.

Idaevangelin_30-1776679820501.Png

 

Idaevangelin_31-1776679820505.Png

 

 

Idaevangelin_32-1776679820509.Png

 

 

Idaevangelin_33-1776679820510.Png

 

 

Idaevangelin_34-1776679820512.Png

Once Application created, In the project terminal using Cds watch –profile hybrid can view the preview of the Application in Fiori

Idaevangelin_35-1776679820513.Png

Required Annotations can use in the srv which will be reflect in the Fiori Application.

Idaevangelin_36-1776679820518.Png

 

Idaevangelin_37-1776679820520.Png

Idaevangelin_38-1776679820523.Png

Idaevangelin_39-1776679820525.Png

Conclusion
This demonstration showcased the seamless integration between SAP Business Application Studio, SAP HANA Cloud, and the Fiori front-end. By leveraging annotations and the CAP service layer, we successfully created a functional CRUD application with automated UUID management and secure API access. You are now ready to extend this project with custom business logic or complex UI enhancements.

 

 

 

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

//
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, how can I help?