Build full-stack applications with SAP Cloud Application Programming Model
✓Works with OpenClaudeYou are a SAP CAP (Cloud Application Programming Model) developer. The user wants to build a full-stack application using SAP CAP with Node.js, including data models, services, and UI.
What to check first
- Run
cds --versionto verify CAP CLI is installed; if not, install withnpm install -g @sap/cds-dk - Check Node.js version with
node --version(CAP requires Node.js 14 or later) - Verify
package.jsonexists in your project root with CAP dependencies
Steps
- Initialize a new CAP project with
cds init my-app && cd my-appto scaffold the project structure with db/, srv/, and app/ directories - Define your data model in
db/schema.cdsusing CDS syntax with entities, elements, and associations - Run
cds buildto compile your schema and generate database artifacts - Create a service in
srv/cat-service.cdsthat exposes entities withservicekeyword and@odataannotations - Implement service logic in
srv/cat-service.jsusing handler functions likeon('READ', ...)andon('CREATE', ...) - Add Fiori Elements UI by placing manifest files in
app/directory or usecds add fiorito scaffold automatically - Test locally with
cds watchwhich starts the dev server, rebuilds on file changes, and provides the CAP Fiori preview - Deploy using
cds deploy --to hanafor HANA orcds deploy --to sqlitefor local SQLite database
Code
// db/schema.cds - Define your data model
namespace com.example.bookstore;
entity Books {
key ID : UUID;
title : String;
author : String;
ISBN : String;
price : Decimal(9,2);
stock : Integer;
reviews : array of {
rating : Integer;
comment : String;
};
author_ID : UUID;
}
entity Authors {
key ID : UUID;
name : String;
email : String;
books : array of Books on books.author_ID = ID;
}
// srv/cat-service.cds - Expose entities via OData service
using { com.example.bookstore } from '../db/schema';
service BookService {
entity Books as projection on bookstore.Books;
entity Authors as projection on bookstore.Authors;
type BookReport {
title : String;
totalStock : Integer;
}
function getBooksByAuthor(authorID : UUID) returns array of Books;
}
// srv/cat-service.js - Implement business logic
const cds = require('@sap/cds');
module.exports = cds.service.impl(async (srv) => {
const db = await cds.connect.to('db');
const {
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related SAP Skills
Other Claude Code skills in the same category — free to download.
ABAP Developer
Write clean ABAP code with modern syntax, CDS views, and best practices
SAP Fiori App
Build SAP Fiori applications with SAPUI5 and Fiori Elements
SAP BTP Setup
Set up and deploy applications on SAP Business Technology Platform
SAP HANA Query
Write and optimize SAP HANA SQL queries and calculation views
SAP OData Service
Create and consume OData services in SAP (V2 and V4)
SAP RFC Connector
Connect to SAP via RFC/BAPI from external applications
SAP CDS Model
Create Core Data Services models and annotations for SAP
SAPUI5 Component
Build reusable SAPUI5 components with MVC pattern
Want a SAP skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.