Skip to Content
Technical Articles
Author's profile photo DJ Adams

SAP Cloud Application Programming Model (CAP) – start here

Note: While this blog post was originally published in 2018, it’s been updated for 2020 and now also for 2021 thanks to great help and input from the excellent Iwona Hahn. Take a few mins to have a fresh look through, as you’ll find that many items have been updated. And don’t forget to “share & enjoy“!

There’s been a lot of activity and interest around CAP for SAP Business Technology Platform (BTP), not least during the last couple of years of SAP TechEd events, and also as it coalesces into a fundamental technology in the cloud development stack. I thought it would be useful to provide an overview of the key resources, for folks who are wondering how to get started.

Briefly, CAP for SAP BTP is a framework of tools, languages and libraries, some from SAP, some open source. With these tools, languages and libraries you can efficiently and rapidly build enterprise services and applications in a full-stack development approach. It guides you along a golden path of best practices, allowing you to focus on your domain while relieving you from tedious technical tasks.

You can find core documentation for CAP in capire.

Begin with the Getting Started section, as that will take you through the basics as well as detailing some best practices and reference material.

You can also find what’s new in the new Release Notes section.

SAP Developer Center 

In the SAP Developer Center, there are missions, tutorial groups and tutorials.

In the beginner-level mission “Take a Deep Dive into OData” there’s a tutorial group “Build Your First OData-based Backend Service” which gives you a high level taster.

If you’re feeling more adventurous, or more hungry for knowledge and insight, there are a couple of complete missions available too:

The mission Build a Business Application Using CAP for Node.js guides you through developing a business application using CAP. Start on your local environment and deploy to the cloud.

If you’re of the Java persuasion, there’s a similar mission you may like – Build a Business Application Using CAP for Java:

You can also find other tutorials tagged with “SAP Cloud Application Programming Model” via this URL:

and you’ll be presented with appropriately filtered content like this:


SAP Community

Here on the SAP Community you’ll find an array of posts talking directly or indirectly about CAP. You can find the complete set using the tag:

SAP Cloud Application Programming Model

Daniel’s post “Introducing the new Application Programming Model” is a great place to start.

There’s also a dedicated topic page which you should definitely check out: – this has all sorts of links including a summary of the latest blog posts and also the latest Q&A, which you can get to directly too via the tag specifically for CAP related questions and answers.


SAP TechEd sessions

CAP has proved to have been a popular topic in the sessions and in the corridors at SAP TechEd over the last couple of years.


There was an array of sessions at SAP TechEd Barcelona – check out the Agenda Builder to find out more.

Here are a couple of them:

  • CNA376 “Build Applications with the Programming Model on SAP Cloud Platform” – hands-on workshop (2hr)
  • CNA652 “Less Than One Hour to a SaaS Application with SAP Cloud Platform” –  CodeJam (mini-edition) (1hr)

The exercise material “spaceflight” for CNA376 is on GitHub for both Node and Java.

If you’re wanting a brief overview of CAP, you could watch this brief (7min) interview between the wonderful Gregor Wolf, and me, from SAP TechEd 2019 in Barcelona: CAPM for Developers, Barcelona 2019:


There is a great session from Christian Georgi SAP Cloud Application Programming Model Evolution – What’s New [DEV103] which is a lecture session with all the news on both the Node.js and Java runtimes.



If you have a look at the exercises for CNA376 you’ll see they’re for a Node.js (JavaScript) runtime. As well as tools and features for the Application Programming Model being available in the SAP Web IDE Full-Stack, there’s also an extension for Visual Studio Code.

Read more about this SAP CDS Language Support extension in Joerg Mann‘s post “Introducing Core Data & Services (CDS) for VS Code” and grab it from the Visual Studio Marketplace – find out more in the tools section of the CAP documentation.

There’s also a short (12 minute) video which gives an overview of all the great features of this extension: An overview of the SAP CDS Language Support extension for VS Code

What’s more, there’s CAP support in the new SAP Business Application Studio too!


Other media

On SAP’s unofficial community podcast, Coffee Corner Radio, there’s a 16 minute pod bite (#5) where I interview Rui Nogueira on the Application Programming Model.

On SAP CodeTalk, there’s a short interview with Ian Thain and me talking about CAP at a high level:

On the SAP Mentors GitHub organisation there’s a repo representing CAP community activity – check it out at

If you like to learn by watching folks hack around on screen, and perhaps also take part, then you probably want to check out the Hands-on SAP dev series of live streams which cover all sorts of SAP development topics including of course CAP. Check out the recordings of past episodes here:

That’s what comes to mind to me this evening – if there’s anything else (please let me know) I’ll add it to this post as and when it appears or occurs to me.

Happy hacking!



11 Oct 2018 – added link to SAP CodeTalk interview; added link to Java exercise materials for CNA376

21 Dec 2018 – replaced reference to the original user tag applicationprogrammingmodel with the new tag SAP Cloud Application Programming Model (hat tip to Mike Doyle for the reminder)

03 Jan 2019 – added info on finding tutorials by tag via a URL (hat tip to André Pfohlmann). Also added info on how to see what’s new with the Application Programming Model, via an answer in the Community Q&A from Jijo Roy Jacob 

25 Mar 2020 – major update with huge help from Iwona Hahn 

28 Sep 2020 – new location for VS Code Extension

16 Feb 2021 – more great updates thanks again to Iwona Hahn 

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Pierre Dominique
      Pierre Dominique

      Thanks DJ. I started to investigate this topic a while ago thanks to one of your posts and it's good to have all the resources in one place.

      I'm also working with XSA and I really hope that SAP will consolidate everything because it gets a bit frustrating to have different tools and techniques for on prem and cloud. Web IDE for SAP HANA, Web IDE Full stack, APM in the cloud but not on prem etc.


      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author

      Hey Pierre, thanks, you're welcome. I'm glad you're investigating, I am too, it's a fascinating area and one that I see as very important.

      I think there are things that can be consolidated, but at the same time, we have different requirements too that have to be catered for. With APM - you may be happy to find that you can do stuff purely on prem too, certainly from a development perspective (and then deploy to CF etc later). For example, I've used Node.js and sqlite as a persistence layer locally on my machine here.

      That said, it's early days and I'm looking forward to see how APM pans out even more. Cheers!

      Author's profile photo Thomas Jung
      Thomas Jung

      The application programming model is also planned to come to HANA/XSA on premise in a revision to the Web IDE for SAP HANA 2.0 SPS 03 that is due to ship in about 2-3 weeks. So very soon you should have this same functionality there as well. We are already using this version internally and did some demos at TechEd Las Vegas.

      Author's profile photo Michelle Crapo
      Michelle Crapo

      Thank you for another great blog!   The possibles are endless, aren't they?  I just downloaded from Github and had to install a lot of different programming languages.   Nope not using that one for awhile but nice to look at the code.

      Author's profile photo Former Member
      Former Member

      Hi DJ,

      i don't really have a comment about the actual content, which i'm sure is as excellent as any other that you have authored for the SAP Community, but more about your blogging "best practice".

      i really appreciate listing the actual update at the bottom of the blog page. very often, i see an update to content created by others, but there is no way for me to figure out what the update is about and what has changed. in your case, it's done perfectly and is showing that you appreciate both the social technology as well as the audience that is the intended consumer of that social content.

      cheers, gm

      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author

      Heya - thanks very much - and I appreciate you noticing the detail. Cheers, and have a great weekend!

      Author's profile photo Henrik Damhøj Andersen
      Henrik Damhøj Andersen

      Great blog!

      Is it possible to get the service layer to implement oData v4 instead of v2?

      Regards, Henrik

      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author

      Hey thanks Henrik - the basic answer is yes, it's possible, in the Java implementation, at least (and they're working on the Node.js flavour too). I've reached out to a colleague for an example of what to do, and will post here when I receive the info. HTH!

      Author's profile photo Henrik Damhøj Andersen
      Henrik Damhøj Andersen

      Hi DJ,


      Can wait for the next update of HANA Express with APM 🙂

      Regards, Henrik

      Author's profile photo Harald Gutbrod
      Harald Gutbrod



      I tried cds for nodejs and created a small service in VS Code. When I start the service local with "cds serve all"  the service is only available as Odatav4. The Metadata shows

      <edmx:Edmx xmlns:edmx="" Version="4.0">

      I would like to use Fiori Elements as Frontend, but Fiori Elements seems only supporting Odata V2. Is there a way to switch to Odatav2 in the service?

      I've already tried this in package.json, without success:

          "odata": {
            "version": "v2"


      best regards,



      Author's profile photo Mike Doyle
      Mike Doyle

      Hi DJ, another tag seems to have taken off with your colleagues: SAP Cloud Application Programming Model

      There are a few new blogs with this tag. Maybe you should amend/amend your link?

      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author

      Thanks Mike, I’d changed all the applicationprogrammingmodel tags for my and my colleagues’ posts here (I'd been semi-involved in the formation of the new tag internally) but forgot to make the change in the content here. Cheers for the reminder – now done!

      Author's profile photo Daniel Wroblewski
      Daniel Wroblewski



      thanks for for the blog

      1) Where is the reference for building the CDS data model file, and for building the OData service (cat-service)?

      2) if I want to make certain fields of an entity read only, do you suggest doing that in the service or in the UI? Either way, how do I do that?


      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author

      Hey Daniel, I didn't write an entire blog, just one post - but thanks 😉

      To your questions, briefly (tho I would recommend any Q&A be made in

      1. Follow the documentation link in the first part of this post, and have a look specifically at the "Core Data and Services (CDS) Language Reference" section
      2. You can use annotations for this (there's a subsection in the language reference mentioned above) - have a look specifically at the @readonly annotation. Depending on requirement, it can be done at either level.


      Author's profile photo Shibaji Chandra
      Shibaji Chandra

      Hi DJ,


      I was following the tutorial:

      two issues:

      1. Even though I ran
        npm i -g @sap/cds​

        I see in my Visual Code editor it's not recognizing:

        using { Country, managed } from '@sap/cds/common';
      2. Even though I commented the dependencies and trying to run the cds by cds run, I am getting the following error:


      C:\cloudsdk\cap-node\my-bookshop>cds run

      { Error: Cannot find module 'express'
      at Function.Module._resolveFilename (module.js:536:15)
      at Function.Module._load (module.js:466:25)
      at Module.require (module.js:579:17)
      at require (internal/module.js:11:18)
      at module.exports (C:\Users\i304296\AppData\Roaming\npm\node_modules\@sap\cds\server.js:6:21)
      at serve (C:\Users\i304296\AppData\Roaming\npm\node_modules\@sap\cds\bin\serve.js:39:46)
      at run (C:\Users\i304296\AppData\Roaming\npm\node_modules\@sap\cds\bin\run.js:31:44)
      at main (C:\Users\i304296\AppData\Roaming\npm\node_modules\@sap\cds\bin\cds.js:66:18)
      at Object.<anonymous> (C:\Users\i304296\AppData\Roaming\npm\node_modules\@sap\cds\bin\cds.js:27:3)
      at Module._compile (module.js:635:30) code: 'MODULE_NOT_FOUND' }


      Could you please give any clue what am I missing?

      Author's profile photo Shibaji Chandra
      Shibaji Chandra

      Never mind I fixed the issue. I was having node version 8.9.1 that was causing issue. Now I have upgraded the same to 10.16.3 and it's working.


      Author's profile photo Iwona Hahn
      Iwona Hahn

      Thanks for the update :).

      Author's profile photo Christian Schaefer
      Christian Schaefer

      Thank you for updating this. I have still trouble to get the "Service SDK" layer though. Is there any documentation about that?

      There used to be a "SAP Cloud Platform SDK for service development" (e. g.

      It included, for example, an OData Query generator, built on Olingo. Does it still exist? Where is the documentation?

      Also I find it unfortunate that most documentation is tutorial based. This is great to get started, but then I would rather read a comprehensive reference documentation instead. Copy&paste programming from tutorials is not my goal.


      Author's profile photo DJ Adams
      DJ Adams
      Blog Post Author

      Hey Christian, thanks for the question - let me get in touch with some folks internally and see if they can help out here. Cheers! DJ