
Explore SAP CAPM, a cloud application programming model built with Node.js, libraries, tools, and a framework. Define data services, entities, and annotations using a declarative, service-based approach for scalable applications.
How to run:
Use Node 10.16.3 and Make sure SAP® CAPM Libraries are installed Globally
Run npm Install in the package.json folder
Use cds run --in-memory in the package.json folder
You can use the NVM link here: https://github.com/nvm-sh/nvm/blob/master/README.md to work with multiple versions of NodeJS, for our project we are using NodeJS version 10.16.3
Configure the npm registry, install the CDS SDK globally, and use the CDS command to create and manage a hello world service in SAP CAPM.
Learn how to create a hello world node.js service with SAP CAPM using cds, bootstrap a project, install dependencies, and implement a simple read handler that returns hello world.
Learn to build a CDS service in SAP CAPM with CDS code and the VS Code CDS plugin, define a function, pass data in requests, and run/test on localhost 4004.
Create a CDS schema for a student entity, populate csv data in a CSP folder, and test a local sqlite3 database for CAPM service; cloud options include hdi and hana.
Expose the student entity as a read-only projection via a service and run cds run in memory to load data from the database, matching the namespace.
Learn to display data in SAP capm by adding a user interface annotation to the feeds view, defining line items for email, first name, last name, and signup date.
Explain moving ui5 code into the app folder and building a unified ui5 application with the app structure, including index.cds, index.html, web app, manifest.json, and fury service cds.
Learn how to move a UI annotation into a CDS file, link the fiori-service.cds and index.cds, and render a service-driven UI in SAP CAPM.
Configure the manifest.json file with a service, datasource, and entitySet, run the app locally, and explore metadata and annotations to render a list report UI.
Deploy your CAPM app to ACP Cloud Foundry, explore HANA database options with HDI containers, and enable runtime creation of tables during deployment.
Deploy the SAP CAPM app to SQLite with CDS deploy, inspect the generated .db file in VS Code, and run the app using the local .db storage for data.
Learn to create an HDI trial container via the CLI and build project database artifacts by translating CDS data into deployable artifacts, using the service marketplace and CLI workflows.
Learn to build the HANA database artifacts with SAP CAPM, convert models to HDBCDS, and generate files in the gen folder for container deployment.
Create and configure a manifest.yaml to deploy the generated DB artifact and CAPM app to Cloud Foundry, bind it to the HDI container, and ensure proper health checks.
Explore how mta.yaml extends manifest.yaml to enable resource bundles and versioning for cloud foundry deployment, and configure hana via package.json, noting node_modules are not deployed.
Deploy database artifacts and a Node.js app to Cloud Foundry using cds deploy --to hana, building HANA-compatible artifacts, and validating data in deployed tables.
Learn to implement CDS CRUDQ operations with CDS QL transactions, extend services, and debug CAPM applications using async/await, get, update, insert, delete, and event hooks.
This is an empty service where you will get and update a sample template to start with
How to run:
Use Node 10.16.3 and Make sure SAP® CAPM Libraries are installed Globally
Run npm Install in the package.json folder
Use cds run --in-memory in the package.json folder
How to run:
Use Node 10.16.3 and Make sure SAP® CAPM Libraries are installed Globally
Run npm Install in the package.json folder
Use cds run --in-memory in the package.json folder
Explore SAP CAPM level one by extending a read-only student service with query variations and filters, model a student entity with associations, and prepare by installing dependencies.
Install npm packages, re-add dependencies, and deploy to cloud foundry; learn arrow functions and their benefits while testing the service with a database locally using the CSP file.
Explore how to access the CDS module and the student entity inside a service to perform a custom select query, including TypeScript context.
Learn to debug CAPM code in VS Code, set breakpoints, inspect runtime variables, and implement read request filters to control output, using launch.json and watch expressions.
Learn to use async functions and await to manage asynchronous calls like select from student and ajax requests, and compare promises with then and catch.
Learn to filter data in SAP CAPM with where in a select statement and passing filters via API requests. Use email as the key and observe request.query building the filter.
Learn to apply where filters in a select statement, pass email and first name parameters, and use limit, group by, order by, and having in SAP CAPM APIs.
Implement a custom filter in SAP CAPM by limiting output to a service endpoint and filtering results by name, with debugging steps to verify the select flow.
Explore how SAP CAPM handles query-based data, showing that keys return a single record while no keys return multiple results, with focus on filtering and validation.
Clean and optimize an SAP CAPM service by simplifying code, using on and after events for post-processing, and transforming data within the return structure without adding new properties.
Implement update functionality for a student service using a post request, filtering by email, and updating fields from request data; learn transaction handling and test with Postman.
Learn to update multiple records inside a CDS transaction, return the updated data, and handle success or errors with resolve, reject, and a final catch.
Update and return data within a transaction, handle errors, and run multiple queries to update records, returning a student object or error details to the frontend.
Learn how to fix errors by handling multiple resolves and using transactions to enable rollback. Updates are executed only when transactions complete, ensuring data integrity.
Implement insert and delete operations for student records in a SAP CAPM service, handling key fields and unique keys with post requests, and test with a get call.
Implement delete student in a capm service using a transaction, deleting by email (and optional first name) to demonstrate CRUDQ in capm, with post calls and verification.
Master SAP CAPM by extending services, using annotations, and modularizing features; deploy and test new fields, such as a full name derived from first and last name, via custom endpoints.
Modularize by creating a new CDS service with a paired JavaScript file, moving code into modules, and deploying to verify behavior, including a before insert student event for email pre-checks.
Implement a simple before event to validate emails by lowercasing input and blocking Gmail with a 500 error. Extend the service with a new implementation, deploy, and test with postman.
Explore CDS data modeling with CAPM by designing entities for students, courses, content, and enrollment, normalizing end-to-end relations, and building a UI5 app using annotations for routing and navigation.
How to run:
Use Node 10.16.3 and Make sure SAP® CAPM Libraries are installed Globally
Run npm Install in the package.json folder
Use cds run --in-memory in the package.json folder
Learn CDS data modeling for an LMS project by defining the content entity with id, content type, and a 1:N association to courses and enrollments, using annotations and CDS structure.
Explore cds data modeling in sap capm by defining a 1:n association between course and content, adding course properties, and modeling enrollments and students with key fields.
Add sample data to the student, course, and enrollment entities in a SAP CAPM project, configuring fields, relationships, and primary keys to reflect one-to-many enrollments between students and courses.
Learn to model sample data and expose read-only entity endpoints in SAP CAPM, such as get student, get course, get enrollment, and get content.
Deploy changes to the db with cds deploy to apply edits to entities and associations in sap capm. Link associations in contents and enrollments using primary keys with underscore notation.
Learn how to manually test services and navigate their associations among student, enrollment, course, and content in SAP CAPM, with URL pattern navigation and auto-generated service implementations.
Build a SAP CAPM UI5 frontend using UI annotations and navigation routes, wiring to a service entity set, while debugging 404 errors and deploying with cds deploy and cds run.
Learn to add navigation from the student list to the detail page in SAP CAPM by defining the get student navigation, the pattern, and the target in the manifest.
Learn to define UI facets by creating a personal information field group and exposing it as a section using reference facets, labels, and targets in SAP CAPM.
Fixes errors in getting student info and adds navigation to enrollment details by configuring UI annotations, line items, and routing for get enrollment.
Explore how to add enrollment details in the SAP CAPM navigation, linking student details to enrollment and then to course details using get enrollment and get course service.
resolve a third-level navigation issue in sap capm by defining enrollment and course detail routes, adding enrollment detail navigation, and aligning get entity set to display course data.
Enable auto expand in the manifest to fix data gaps when navigating enrollment to course details, and add headers and libraries to ensure data loads and navigation in SAP CAPM.
Explore how auto expansion makes navigation optional in SAP CAPM by annotating CDS entities, building facets for personal information and enrollment details, and testing navigation without code.
Overview
Learn and Understand the NodeJS based CAPM Model from SAP® for Cloud App Development With CDS End-to-End in SAP® BTP/Cloud Foundry
Start with Basic End-to-End CAPM App Development and Gradually Understanding Complex Scenarios and Features
This section starts slowly with basics and progressively advances on crucial concepts required to work with CAPM. In the consecutive Levels of CAPM, we will see the depth of DB, Service, CDS, Annotations, and Tools at our disposal. This week should give you an end-to-end spectrum and strong foundation to start your Journey with New SAP® CAPM.
Details of What You Will Learn in this Course:
In Section 1:
In this section, we have covered Level 1 where we will see a Basic End-to-End CAPM App from Scratch.
First, we will start with a short theory to understand what to expect
Then we will set our Development environment for CAPM dev and install NPM Repo to use CDS Command from npm sap registry
Then we will get starting with creating some Hello World Service App and testing in local env
After that, we will take our usecase of the LMS system and create a simple Student entity and create CSV sample data
We will then create a simple Service to read all the Student data. In this case, we will use sqlite3 DB to test results locally
After that, we will add Annotation to our Student entity so, in Fiori® Preview we can see Data in App
Once we have developed our services, we will go and separate UI part of the code and create a UI5 App that contains information about routes, uses data model from the service and adds UI annotations to the service
After that we will test the end-to-end scenario locally
Now, it is time to launch our app in SAP® Cloud Foundry. We will create an HDI container and this time with the DB artifacts we will see our structure get created and also data get added.
We will push the final application into the cloud and test the final Fiori® Launchpad and App.
This section starts slowly with basics and progressively advances on crucial concepts required to work with CAPM. In the consecutive Levels of CAPM, we will see the depth of DB, Service, CDS, Annotations, and Tools at our disposal. This week should give you an end-to-end spectrum and a strong foundation to start your Journey with New CAPM.
In Section 2:
In this section of Level 2, we will see NodeJS CRUDQ Service in CAPM, Async Functions and Debugging.
How to implement CDS based service with CDS QL
How to work with an event like on, before and after in service and usage
Learn Async Code with Promise and with Async & Await
Learn how to use CDS transactions to execute single or multiple queries
How to handle the Promise of CDS transaction with reject and resolve status
Implement Update, Delete, Select, Query and Insert with debugging
Testing in postman, in the browser, in the console and on debugging screen using VS code
How to extend already implemented service and add more functionality like changing URL pattern, or changing return structure with CDS code.
This week will give you a firm foundation on basic NodeJS code which is essential to master when you work with SAP® CAPM based project development.
In Section 3:
In this Week of Learn SAP® Cloud Platform, we have covered Level 3 of CAPM(SAP® Cloud Application Programming Model). Where you will find:
Data Modeling with CDS(Core Data Service)
How to Model Data with Association using our LMS(Learning Management System) Example
How to use UI Annotations to represent Data in UI5 App Out of box Navigation in APIs
Using Navigation and Routes in CAPM UI5 App
Using UI Annotation to showcase Navigation Data