Fiori annotations

Describing a service so a Fiori client can render it without hand-written UI code — titles, value helps, hierarchies and visibility expressed as model annotations rather than screen logic.

Overview

SAP SHIPS
Node.js →

@sap/cds Maps protocol-agnostic annotations to OData, with value-list shortcuts applied from the model.

@sap/ux-cds-compiler-facade Wraps the CAP CDS compiler behind one set of APIs for annotation handling, so tooling reads a model without tracking which compiler version is installed.

@sap/ux-cds-odata-language-server-extension Adds the OData annotation features to @sap/vscode-cds, the CDS plug-in for Visual Studio Code: completion, micro-snippets, diagnostics, vocabulary documentation, Go to Definition and an i18n check inside a .cds file.

Java →

com.sap.cds:cds-services-bom Serves the OData V4 metadata a Fiori elements client reads, carrying the annotations the compiled model holds, and hosts the index page whose Fiori preview renders a list page from them, turned on in a deployment with cds.index-page.enabled. The translation itself is the compiler's: a CAP Java build compiles the model to CSN with the Node.js package @sap/cds-dk, so a shortcut such as @hierarchy follows the cds-dk version the build installs rather than this release. One annotation the Java runtime reads itself rather than the compiler is @cds.java.descendants.aggregate, which on a virtual element builds a hierarchy view from an aggregate expression.

Not covered: It stops at translating what the model states. Labels, read-only and mandatory fields, value lists on managed associations and recursive hierarchies have a CDS shortcut; every other term, UI.LineItem and UI.SelectionFields among them, is written out in the vocabulary's own structure. A field that is not a managed association gets no value list from the shortcut. A tree view still needs the hierarchy qualifier and the TreeTable setting in the UI5 app's manifest.json, which is the app's file rather than the model's. Hiding a control by role takes a singleton and an on handler of the developer's own. For a vocabulary outside the standard set the compiler has no access to the vocabulary's content, so the values are translated generically and nothing checks that a term is applied where it belongs. The preview is disabled in production.

SourceServing SAP Fiori UIschecked
THE COMMUNITY ADDS

Three cds-plugins write Fiori vocabulary terms a model would otherwise carry by hand. @mpah/enum-value-help covers the case the value-list shortcut leaves alone, a field typed by a CDS enum, by adding @Common.ValueList against a generated view of the enum's own values. cap-js-geoloc-plugin generates the actions, and under autoCalculate the side effects, that its own address and route annotations imply. urp-vocab publishes a vocabulary of its author's own rather than SAP's, so what reads it has to be a matching renderer.

Artifacts14

14 of 14 artifacts
ArtifactSignals
CDS plugins3
@mpah/enum-value-helpCAP plugin generating value help for enum fields from an annotation
Signals
none
cap-js-geoloc-pluginAnnotation-driven geocoding, address correction and routing for CAP
Signals
Functional boundary
cap-user-infoUser details and quickview links for createdBy and modifiedBy
Signals
none
Generators1
@sap/generator-fioriEntry point for generating a Fiori application from a template
Signals
none
IDE extensions1
@sap/ux-cds-odata-language-server-extensionOData annotation features for the @sap/vscode-cds extension
Signals
none
Packages9
@sap-ux/cds-annotation-parserParser for annotations in CDS source
Signals
none
@sap-ux/cds-odata-annotation-converterConverter from CDS annotations to their OData form
Signals
none
@sap-ux/fiori-annotation-apiProgrammatic API for reading and writing project annotations
Signals
none
@sap-ux/odata-vocabulariesOASIS and SAP OData vocabularies with a VocabularyService
Signals
none
@sap/cdsCAP Node.js runtime
Signals
none
@sap/cds-fioriFiori draft handling and UI-facing behaviour for CAP services
Signals
none
@sap/ux-cds-compiler-facadeWrapper around the CDS compiler for annotation handling
Signals
none
com.sap.cds:cds-services-bomMaven bill of materials pinning CAP Java module versions
Signals
none
urp-vocabCDS vocabulary for User-Rendered Patterns display annotations
Signals
Functional boundary

Tasks4Beta

CoversCovers, under conditionsAssessed, not knownNot assessed
Carry a vocabulary SAP does not ship into the OData metadata1 covers, 1 not known

Annotations written with terms of somebody's own reach the service's OData metadata, with the reference to their vocabulary document beside them, instead of being dropped in translation.

Covers getting the terms into the metadata. What reads them at the other end is not part of it: a Fiori elements client reads the OASIS and SAP terms, and anything else needs a renderer of its own.

Covers@sap/cdscds.cdsc.odataVocabularies names a further vocabulary's alias, namespace and URI, and from then on every annotation prefixed with it is translated and the metadata carries the edmx:Reference to the vocabulary document beside the annotation.

Remaining work: Make the URI reachable where that matters, and write whatever reads the terms. The compiler has no access to the vocabulary's content, so it checks neither the values nor that a term is applied where its own definition allows.

Open artifact →

Assessed, not knownurp-vocabA vocabulary of its author's own, used from CDS as using urp from 'urp-vocab' and applied as @urp.display and five further terms. Whether its terms reach the OData metadata is not established: its readme names the terms and the widget types but says nothing about registering the vocabulary with the compiler, nothing about cds.cdsc.odataVocabularies, and nothing about what reads the terms. Its declared repository, github.com/your-username/urp-vocab, is an unedited placeholder, so the package's own files are the only record there is.

Remaining work: Read the published package's files before treating it as an answer here. On what is written down, it is a vocabulary definition and not a translation path.

Open artifact →

Put a value help on a field a Fiori client rendersAlso in UI5, ABAP1 covers, 2 under conditions

A field in a Fiori elements app offers the values it allows instead of a free-text input, with the list coming from the model rather than from code in the app.

Covers getting the value-list annotation onto the field. Where the values are kept — a code list entity, a CDS enum, a table of its own — is the model's design and not this outcome, and so is anything the app adds on top of the control.

Covers@mpah/enum-value-helpAnswers the case the shortcut leaves alone, a field typed by a CDS enum. @enumValueHelp on the field makes the plugin add @Common.ValueList against a generated EnumValueHelpView that serves the enum's own values by entity and field, and @enumValueHelpFixedValues adds @Common.ValueListWithFixedValues as well, which is what makes the control a dropdown rather than a search dialog. It scans for the annotations while the CDS model loads and exposes the view to the services that hold an annotated entity.

Remaining work: Mark each enum field, and @enumValueHelpFixedValues as well where the list should be fixed. Nothing picks the fields.

Open artifact →

Covers, under conditions@sap/cdsTwo ways, both from the model. @cds.odata.valuelist on the entity that holds the values gives every managed association targeting it a value list, and the reuse types of @sap/cds/common already carry it, so a field typed from a code list there arrives with one. Any other case is the @Common.ValueList record written out in the vocabulary's own structure, which the compiler translates because the mapping is generic rather than written per term.

Conditions: The shortcut reaches a field only where that field is a managed association to the annotated entity. A field that is not an association needs the @Common.ValueList record written by hand, naming the collection and the parameters that tie the local property to the value-list property.

Remaining work: Model the entity the values come from and expose it on the service, then decide field by field whether the shortcut applies or the record has to be written out.

Open artifact →

Covers, under conditionscom.sap.cds:cds-services-bomThe same two ways on a Java service. The shortcut and the vocabulary translation belong to the compiler, which a CAP Java build runs on Node.js as @sap/cds-dk, and this release serves the metadata that comes out of it.

Conditions: The shortcut reaches a field only where that field is a managed association to the annotated entity. Which shortcuts a project has follows the @sap/cds-dk version the Maven build installs, which since CDS Maven plugin 3.6.0 is a devDependency in package.json rather than a version in pom.xml.

Remaining work: The same modelling as on Node.js. Nothing in this part of the outcome is written in Java.

Open artifact →

See the annotations rendered before any Fiori app exists2 under conditions

A developer changing @UI annotations sees the page they produce straight away, with no UI application in the project to generate or rebuild first.

Covers the loop while the annotations are being written. It is not a way to ship a screen: what answers this outcome is a page the server renders, not an app, and the distinction is where the decision sits.

Covers, under conditions@sap/cdsThe index page carries a Fiori preview link for every entity exposed over OData V4 and serves a Fiori elements list page from that entity's annotations, so the effect of an annotation change is visible without creating a UI application.

Conditions: The entity has to be exposed over OData V4; the link appears for those entities and not for others. It is disabled in production. cds.fiori.preview set to true turns it back on in a cloud deployment for a test or a demo.

Remaining work: Nothing in the project for the local loop. A real app still has to be generated once the page in question is more than a list report.

Open artifact →

Covers, under conditionscom.sap.cds:cds-services-bomThe same preview from a Java service, with its own switch: cds.index-page.enabled, rather than the cds.fiori.preview a Node.js project sets.

Conditions: The entity has to be exposed over OData V4. It is disabled in production. cds.index-page.enabled set to true turns it back on in a cloud deployment for a test or a demo.

Remaining work: Nothing in the project for the local loop, and the annotations themselves still come from the model the Maven build compiles.

Open artifact →

Show a self-referencing entity as a Fiori tree tableAlso in ABAP2 under conditions

An entity whose rows point at their own parent is rendered as an expandable tree in a Fiori elements list report instead of a flat list.

Covers the annotations the service carries and the one setting in the app's manifest.json that the guide requires with them. Building the hierarchy in the data, and anything the app does inside the tree's rows, is outside it.

Covers, under conditions@sap/cds@hierarchy on the entity expands at compile time to the Fiori-level annotate and extend statements the tree would otherwise need written by hand, and the runtime serves the result.

Conditions: The entity needs a recursive association to itself, which is what the shortcut reads. The UI5 app's manifest.json has to name the hierarchy qualifier and set the table type to TreeTable; the qualifier follows the pattern <entity name in service>Hierarchy.

Remaining work: Add the controlConfiguration block to the app's manifest.json, and keep the qualifier in step with the entity's name in the service, because the pattern is derived from it.

Open artifact →

Covers, under conditionscom.sap.cds:cds-services-bomThe same @hierarchy shortcut, because a CAP Java build compiles the model with the same Node.js compiler, and one annotation this runtime reads itself: a virtual element marked @cds.java.descendants.aggregate builds the hierarchy view from an aggregation expression, which is how a tree shows an aggregate over a row's descendants rather than the row's own value.

Conditions: The entity needs a recursive association to itself. The same hierarchy qualifier and TreeTable setting in the app's manifest.json as on Node.js. The shortcut belongs to the compiler, so it is available once the Maven build installs an @sap/cds-dk that has it, independently of the cds-services-bom version.

Remaining work: Add the controlConfiguration block to the app's manifest.json, and write the aggregation expression where the tree is meant to show aggregates.

Open artifact →

Content46

Group by46 of 46 pieces
Piece, what it offers
CAP Foundry: Engineering SAP CAP Applications from Business Intent with Guardrailed AI
SAP Community, Shahid, Blog
Reading Between the Lines: Under-Documented Fiori Elements Capabilities in SAPUI5 1.149
SAP Community, Sören Leibach, Blog
Dynamic Criticality in SAP CAP Using Fiori Elements and Node.js
SAP Community, Pranesh_SD, BlogThe reasoningA recipe
Show 43 more
Deep Insert in SAP CAPM Using Composition and Fiori Elements
SAP Community, Talari Hari Kumar, BlogThe reasoningA recipeRunnable code
From SEGW and Legacy UI5 to RAP with ARC-1
blog.zeis.de — Marian Zeis, Marian Zeis, part 7 of 10, BlogRunnable codeThe reasoning
New majors
Fullstack CAP Application with HANA Cloud (Decoupled Architecture) [Part-2]
SAP Community, sanjucs, BlogThe reasoningRunnable code
Build BTP CAP App with Fiori Integration – Part 2: Implementing End to End App
SAP Community, SuryaRamesh, part 2 of 2, BlogThe reasoning
Building an Enterprise Application Using Fiori Elements and CAP - Part 1
SAP Community, Farooq, part 1 of 3, BlogThe reasoning
Building an Enterprise Application Using Fiori Elements and CAP – Part 2
SAP Community, Farooq, part 2 of 3, BlogThe reasoning
Building an Enterprise Application Using Fiori Elements and CAP – Part 3
SAP Community, Farooq, part 3 of 3, BlogThe reasoningRunnable code
Core changed
CAP JavaでObject Pageの項目の動的な入力制御を実装する
Qiita, Mio Yasutake, Blog
Tree-Table Support in CAP is Now Generally Available
SAP Community, BirgitS, BlogThe reasoning
Visualizing Your SAP Bill of Materials Using CAP, Fiori elements, and the UI5 Network Graph
SAP Community, Marian Zeis, BlogThe reasoningRunnable code
Core changed
Use SAP CAP SAPUI5 Smart Filter to Show Value Help that are not Associated Entitites
SAP Community, JhoelAnthonyRamosRomeroPE, Blog
Calling bound / unbound CAP actions from Fiori elements application.
SAP Community, vidhyasagarmule, BlogThe reasoning
Extend Upload Set with Table to Fiori Elements and utilize Object Store
SAP Community, Kazuhiko Takata, BlogThe reasoningRunnable code
Core changed
CAP with Fiori Elements: Actions on List Report / Object Page using Annotations - Part1
SAP Community, Ajit_K_Panda, part 1 of 2, BlogThe reasoningA recipeRunnable code
Core changed
CAP with Fiori Elements: Actions on List Report / Object Page using Annotations – Part2
SAP Community, Ajit_K_Panda, part 2 of 2, BlogThe reasoningRunnable code
Core changed
CAP with Fiori Elements: Configure Multiple Views on List Report Tables
SAP Community, Ajit_K_Panda, BlogThe reasoningRunnable code
Core changed
CAP - Dynamically hide UI facets in Fiori Elements
SAP Community, AjayRathore, BlogA recipe
Core changed
Create Fiori List Report with object page using CAPM(node.js) Service
SAP Community, Md_sanaullah, BlogThe reasoning
Developing SAP Fiori Element application by using SAP Cloud Application Programming Model
SAP Community, shobhit, BlogThe reasoningA recipeRunnable code
Core changed
Building an Analytical List Page with CAP OData V4
SAP Community, Mio Yasutake, BlogThe reasoningA recipeRunnable code
Gone quiet
Fiori Elements Analytical Table with CAP: Does it work with V2 and V4?
SAP Community, Mio Yasutake, BlogThe reasoningRunnable code
Core changed
CAP with Fiori Elements: Side Effects, Custom Actions, Dynamic Expressions
SAP Community, Ajit_K_Panda, BlogThe reasoningRunnable code
Core changed
Upload data from excel in CAP (Node.js)
SAP Community, KM11, BlogRunnable code
Core changed
Display of hierarchical data in SAP Fiori elements using SAP Cloud Application Programming Model
SAP Community, OliverKlemenz, BlogThe reasoningRunnable code
1 stale part
Case-insensitive filters in Fiori Elements (List report + CAP)
SAP Community, Kishannaicker, Blog
Extend SAP SuccessFactors on SAP BTP with CAP - Develop the SAP Fiori Elements Application
SAP Community, ale_biagi, BlogThe reasoning
Build and deploy a CAP Project Node.js API with a SAP Fiori Elements UI and a managed approuter configuration
SAP Community, jlong, BlogThe reasoningA recipeRunnable code
Core changed
The SAP Fiori elements feature showcase with CAP CDS annotations
SAP Community, stefaniehager, BlogThe reasoning
Tips and Tricks for Working with Annotations in CAP Projects using Language Server Protocol (LSP) capabilities
SAP Community, maryana_naboka, BlogThe reasoning
Build SAP Overview Page using SAP HANA Cloud & SAP CAP service annotations in Visual Studio Code
SAP Community, Sai_Nithesh_G, BlogThe reasoningA recipeRunnable code
Core changed
SAP CAP Remote Services & SAP Fiori Elements
SAP Community, Former Member, BlogThe reasoningA recipeRunnable code
Core changed
From R/3 ABAP to CAP/Fiori Elements on SAP BTP- Deployment
SAP Community, former_member231477, BlogRunnable code
Core changed
From R/3 ABAP to CAP/Fiori Elements on SAP Cloud
SAP Community, former_member231477, BlogThe reasoningRunnable code
Core changed
Create an SAP Fiori Elements UI for CAP Node.js applications in SAP Business Application Studio
SAP Community, liat_b, BlogThe reasoning
Part 2: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elements
SAP Community, former_member748, part 2 of 2, BlogThe reasoningA recipeRunnable code
Core changed
Part 1: How to build an extension application for SAP S/4HANA Cloud using CAP, SAP Cloud SDK and SAP Fiori elements
SAP Community, former_member748, part 1 of 2, BlogThe reasoningA recipeRunnable code
Core changed
Random collection of useful code fragments for CAP Fiori Elements and SAPUI5
SAP Community, leoirudayam, BlogThe reasoningRunnable code
Core changed
SAP Fiori Element using CAP Model – List Report App
SAP Community, jhodel18, BlogThe reasoning
SAP Fiori Elements using CAP Model - Introduction
SAP Community, jhodel18, BlogThe reasoning
Developing a Fiori elements app with CAP and Fiori Tools
SAP Community, MioYasutake, BlogThe reasoningA recipeRunnable code
Core changed
Developing Fiori Element Application (List Report and Object Page) consuming the OData service created using SAP Cloud Application Programming model
SAP Community, former_member187069, BlogThe reasoningA recipe
Core changed
Introducing the Cloud Application Programming Model (CAP)
SAP Community, Daniel7, Blog
Develop a Full-Stack CAP Application Following SAP BTP Developer's Guide
SAP Developer Center, SAP, WorkshopThe reasoningA recipe

Seen working17

ArtifactSignals
Samples17
blog-bookshopCAP bookshop with Fiori elements UI deployed whole to Cloud Foundry
No license
blog-cap-chartFiori overview page comparing aggregated and plain donut-chart cards
No license
cap-alpAnalytical List Page over a CAP OData V4 service
No license
cap-defaultvalue-functionCommon.DefaultValuesFunction pointed at a CAP service function
none
cap-fe-masseditMass edit enabled in a Fiori elements list report over CAP
none
cap-feature-controlSingleton entity whose flags drive Fiori elements feature control
none
cap-materialbom-graphCAP sample drawing a material BOM as a UI5 network graph
No license
capire/incidents-appIncident Management reference application for CAP
none
fiori-dynamic-feature-controlOne object page field made read-only from another's value, two ways
No license
fiori-inline-editList report inline edit on a draft-enabled CAP service
No license
fiori-navigation-patternsOutbound navigation patterns from a Fiori Elements list report
No license
fiori-table-maintenanceCAP and UI5 app for in-place table maintenance with SmartTable
No license
SAP-samples/cap-sflightTravel-booking reference app on CAP Node.js and Java backends
none
SAP-samples/fiori-elements-feature-showcaseShowcase of Fiori elements for OData V4 features on a CAP backend
none
SAP-samples/fiori-elements-fpm-exercises-codejamCodeJam building a bookshop app on the flexible programming model
none
SAP-samples/fiori-elements-v4-cap-advancedExercise solutions for the UX405 course on Fiori elements with CAP
none
ui5-call-actionUI5 apps calling CAP OData actions and functions from custom code
No license

Details

What changed — and what it makes stale1
@sap/cds-dk 9.6.0, CAP

Before this release, a tree view on a recursive association meant hand-writing the OData-level annotations yourself: @Aggregation.RecursiveHierarchy, an extension adding @Hierarchy.RecursiveHierarchy with computed columns, and @Capabilities filter/sort restrictions. @hierarchy on the entity now expands to all of that at compile time.

Makes stale:

Guidance that says a Fiori tree view needs several hand-written OData annotations. Since December 2025 a single @hierarchy (optionally naming the association) is enough.

Coverage
statecore and community, CAP
assessed
relationshipunassessed
also inUI5, ABAP
For your agent
Ref
capability:fiori-annotations
JSON
/capabilities/fiori-annotations.json
MCP
Connecting an agent