BlogBlogtypeA post on somebody's own site or a community platform. Nobody edits it after publication, so it dates from the day it was written.See every one →SAP Community

[Part – 2] Enrich CAP based Services with Behaviors using Annotations

The second half of a two-part walkthrough of CAP's behavioral annotations, following on from access control and input validation in the first part. This post works through @cds.autoexpose, @cds.api.ignore, @cds.persistence.exists/skip, @cds.on.insert/@cds.on.update and the @odata.Type/@odata.singleton mapping overrides, all shaping how a CDS model is projected into a service, which is data modelling. Alongside these it covers @cds.query.limit for default and maximum page sizes (pagination and streaming), @odata.etag with exclusive and shared locks for optimistic concurrency (concurrency control), and @cds.search for scoping $search to chosen elements (search), each with a CDS code example.

Where it sits

Explains
Data modellingData modellingcapabilityDefining the shape of data before anything serves it: entities and their types, how they relate, and the projections and views that services and applications consume.Pagination and streamingCAPPagination and streamingcapabilityReturning results a client can consume without loading everything — server-driven paging, and streaming large binaries rather than buffering them.Concurrency controlCAPConcurrency controlcapabilityStopping two people who opened the same record from silently overwriting each other — detecting that the version you read is no longer the version you are saving over.SearchSearchcapabilityFree-text search across an entity and its compositions, pushed into the database rather than filtered in the service. Declared search, database similarity search and filtering in application code are often lumped together.

Who is behind it

Lukas SchwabeLukas SchwabePersonWrote this
In the atlas: contributes to 1, wrote 2
@pandayo
author

Properties

About this work

declared and crawled
Published
declared
Published on
declared

More on this38

Group by38 of 38 pieces
Piece, what it offersStill applies
Also explainingData modelling37
SAP Table to CDS Mapper - New Version thanks to AI-supported Development
SAP Community, LBretschneider
nothing recorded
CDS Associations & Joins
YouTube — SAP Developers playlists, SAP Developers
nothing recorded
052: 10 Minutes from Start to Launchpad
Software-Heroes, Björn S.
nothing recorded
Beyond READ_TEXT: Decoding SAPscript Long Texts (STXL) with SQLScript in CDS/AMDP
SAP Community, aamelin1
nothing recorded
Building an SAP BTP Agent Architecture from Scratch: Python + CAP + HANA
SAP Community, neilaspin
nothing recorded
Understanding Fuzzy Search in SAP Fiori Applications
SAP Community, Ruchi5
nothing recorded
Handling Concurrent Updates in SAP CAP Java
SAP Community, Anjali_PathakThe reasoning
nothing recorded
Deep Insert in SAP CAPM Using Composition and Fiori Elements
SAP Community, Talari Hari KumarThe reasoningA recipeRunnable code
nothing recorded
Calculating IBP Technical Week "Key Figure Date" in S/4HANA Using CDS View
SAP Community, bharatbajaj
nothing recorded
Building an Enterprise Application Using Fiori Elements and CAP - Part 1
SAP Community, Farooq, part 1 of 3The reasoning
nothing recorded
Semantic search in CAP (Node.js): vector embeddings and cosine similarity
SAP Community, Nico SchoenteichThe reasoningRunnable code
nothing recorded
Create CDS Views and expose through OData service in CAPM
SAP Community, VenkateshMundru
nothing recorded
A CAP Plugin for Flexible Number Range Management: cds-numberrange-plugin
SAP Community, abdulbasitThe reasoningRunnable code
nothing recorded
Understanding Projections in CAPM: Select Only What You Need!
SAP Community, Avisek_The reasoning
nothing recorded
Generating Adobe Form Using RAP framework OData Services
SAP Community, Megastar
nothing recorded
My CAP Projects Toolbox
SAP Community, vvdries
nothing recorded
SAP Incentive Management - Understanding of CSN file & CLI Command to generate
SAP Community, YoganandaThe reasoningA recipeRunnable code
nothing recorded
CAP, CDS, CDL, CSN and jq - finding associations
SAP Community, DJ AdamsThe reasoning
nothing recorded
SAP CAP(Cloud Application Programming)开发框架概述
SAP Community, ArthurYang
nothing recorded
Use Aspects, Association and Convert OData V4 to V2 using Proxy
SAP Community, rahul_rajagopalThe reasoning
nothing recorded
#CAP-TechBytes Input Validation
SAP Community, ThajunnizaThe reasoning
nothing recorded
#BTP #SAPCAP: Quirky Nuggets (N01-N02)
SAP Community, Ajit Kumar Panda
nothing recorded
Understanding entity relationships in CDS
SAP Community, Avinash_Vaidya
nothing recorded
Case-insensitive filters in Fiori Elements (List report + CAP)
SAP Community, Kishannaicker
nothing recorded
SAP CAP Recent Enhancements the HANA Dev Should Know About
SAP Community, Thomas Jung
nothing recorded
SAP CAP Adapter to expose OData as custom REST Service
SAP Community, Former Member
nothing recorded
Improved Search Performance in SAP BTP Core, SAP Cloud Application Programming Model, Node.js Runtime
SAP Community, Arley Triana Morin
nothing recorded
Creating structured types, enums and named aspects using the CDS Graphical Modeler
SAP Community, Xiao-fei_SongThe reasoning
nothing recorded
Importing @sap/cds common.cds to your CAP project using the CDS Graphical Modeler
SAP Community, Xiao-fei_Song
nothing recorded
First Java Cap Application
SAP Community, bruce_wang3
nothing recorded
Developing Business Services with Cloud Application Programming(CAP) Model in SAP Business Studio
SAP Community, Ranjith
nothing recorded
Computed field example in CAP
SAP Community, DJ AdamsThe reasoningA recipeRunnable code
Core changed
SAP Cloud Platform Backend service: Tutorial [11]: CDS : magic: key: generation
SAP Community, CarlosRoggan
nothing recorded
Develop a full stack Business application with SAP Cloud Application Programming Model
SAP Community, former_member584731
nothing recorded
Learn how to define constraints declaratively in your CDS model
SAP Developer Center, SAPThe reasoningA recipe
nothing recorded
Explore the declarative power of status-transition flows
SAP Developer Center, SAPThe reasoningA recipe
nothing recorded
Analyze and optimize ABAP Cloud model apps built on core data services
SAP TechEd — session catalogueThe reasoning
nothing recorded
#BTP #SAPCAP: Quirky Nuggets (N05-N06)
SAP Community, Lukas Schwabe
nothing recorded

Details

Graph7 edges
← POINTS HERE
POINTS OUT →
explainsData modellingcapability, core and community
explainsPagination and streamingcapability, core only
explainsConcurrency controlcapability, core and community
explainsSearchcapability, core and community
published onSAP Communitypublishing source
discovered viaSAP Communitycap-tag
Source
Type
blog
Published on
Host
community.sap.com
First seen
History1
  • Entered the atlasDiscovered via SAP Community · cap-tag.
For your agent
Ref
content:part-2-enrich-cap-based-services-with-behaviors-using-annotations
JSON
/content/part-2-enrich-cap-based-services-with-behaviors-using-annotations.json
MCP
Connecting an agent