/sap-abap-cds
Comprehensive SAP ABAP CDS (Core Data Services) reference for data modeling, view development, and semantic enrichment. Use when creating CDS views or view entities, defining data models with annotations, working with associations and cardinality, implementing input parameters,
$ npx -y skills add secondsky/sap-skills --skill sap-abap-cds --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/sap-abap-cds
Context preview
The summary Claude sees to decide when to auto-load this skill.
Comprehensive SAP ABAP CDS (Core Data Services) reference for data modeling, view development, and semantic enrichment. Use when creating CDS views or view entities, defining data models with annotations, working with associations and cardinality, implementing input parameters,
SKILL.md
sap-abap-cds.SKILL.mdname: sap-abap-cds
description: "Comprehensive SAP ABAP CDS (Core Data Services) reference for data modeling, view development, and semantic enrichment. Use when creating CDS views or view entities, defining data models with annotations, working with associations and cardinality, implementing input parameters, using built-in functions, writing CASE expressions, implementing access control with DCL, handling CURR/QUAN data types, troubleshooting CDS errors, querying CDS views from ABAP, or displaying data with SALV IDA. Covers ABAP 7.4+ through ABAP Cloud."
license: GPL-3.0
metadata:
maintainer: "Eduard Jiglau"
maintainer_email: "hello@sap-ai-skills.com"
website: "https://sap-ai-skills.com"
version: "2.4.1"
last_verified: "2026-04-02"
abap_release: "7.4 SP8+ / 7.50+ / ABAP Cloud"
sources:
- "https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abencds.html"
- "https://github.com/SAP-samples/abap-cheat-sheets"
keywords: [ABAP CDS, Core Data Services, CDS view, CDS view entity, define view, DDL, DCL, annotations, "@AbapCatalog", "@AccessControl", "@EndUserText", "@Semantics", "@UI", "@Consumption", "@ObjectModel", associations, cardinality, path expressions, input parameters, WITH PARAMETERS, built-in functions, CASE expression, CAST, session variables, GROUP BY, HAVING, joins, access control, DEFINE ROLE, pfcg_auth, SALV IDA, Eclipse ADT, CDS annotations, Fiori Elements, OData, RAP, currencyCode, unitOfMeasure, SD_CDS_ENTITY105]SAP ABAP CDS (Core Data Services)
Related Skills
- **sap-abap**: Use for ABAP programming patterns used with CDS or when implementing EML statements in ABAP
- **sap-btp-cloud-platform**: Use for CDS deployment scenarios on BTP or ABAP Environment configurations
- **sap-fiori-tools**: Use when building Fiori Elements applications that consume CDS views or working with UI annotations
- **sap-cap-capire**: Use for comparing CDS syntax between ABAP and CAP or when integrating ABAP CDS with CAP services
- **sap-api-style**: Use when documenting CDS-based OData services or following API documentation standards
When to Use This Skill
Use this skill when creating ABAP CDS views or view entities, defining associations and cardinalities, adding UI or semantic annotations, implementing DCL access control, handling currency/unit fields, troubleshooting CDS compiler errors, or comparing classic CDS views with newer view entities.
**Quick Reference**: [https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abencds.html](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abencds.html) | SAP Cheat Sheets: [https://github.com/SAP-samples/abap-cheat-sheets/blob/main/15_CDS_View_Entities.md](https://github.com/SAP-samples/abap-cheat-sheets/blob/main/15_CDS_View_Entities.md)
Version Compatibility
This skill covers CDS features from **7.40 SP8** through **ABAP Cloud**. Key version boundaries:
| Feature | 7.40 SP8 | 7.50 | 7.51 | 7.55+ | |---------|:--------:|:----:|:----:|:-----:| | CDS View (`DEFINE VIEW`) | x | x | x | x | | CDS associations, parameters, built-in functions | x | x | x | x | | CDS Table Functions (`DEFINE TABLE FUNCTION`) | | x | x | x | | CDS Access Control (DEFINE ROLE / pfcg_auth) | x | x | x | x | | CDS Access Control (implicit evaluation) | | x | x | x | | Session variables (`$session.user/client/system_language`) | x | x | x | x | | `@Environment.systemField` annotation | | x | x | x | | `UPPER`/`LOWER` functions | | | x | x | | `$session.system_date` | | | x | x | | CDS Metadata Extensions (`ANNOTATE VIEW`) | | | x | x | | Cross Join in CDS | | | x | x | | **CDS View Entity (`DEFINE VIEW ENTITY`)** | | | | x | | New cardinality syntax (`to one`/`to many`) | | | | 7.57+ |
**On a 7.40 system**: Use `DEFINE VIEW` (not `DEFINE VIEW ENTITY`). CDS table functions are **not available** before 7.50. Basic DCL (`DEFINE ROLE` with `pfcg_auth`) is available from 7.40 SP08, but implicit role evaluation in ABAP SQL requires 7.50+. `$session.user/client/system_language` are available from 7.40 SP08. The templates in `templates/` include both classic CDS View and View Entity variants.
Table of Contents
- [1. CDS View Fundamentals](#1-cds-view-fundamentals)
- [2. Essential Annotations](#2-essential-annotations)
- [3. Expressions and Operations](#3-expressions-and-operations)
- [4. Built-in Functions](#4-built-in-functions)
- [5. Joins](#5-joins)
- [6. Associations](#6-associations)
- [7. Input Parameters](#7-input-parameters)
- [8. Aggregate Expressions](#8-aggregate-expressions)
- [9. Access Control (DCL)](#9-access-control-dcl)
- [10. Data Retrieval from ABAP](#10-data-retrieval-from-abap)
- [11. Common Errors and Solutions](#11-common-errors-and-solutions)
- [12. Useful Transactions and Tables](#12-useful-transactions-and-tables)
- [Bundled Resources](#bundled-resources)
- [Source Documentation](#source-documentation)
---
1. CDS View Fundamentals
View Types
| Type | Syntax | Database View | Since | |------|--------|---------------|-------| | **CDS View** | `DEFINE VIEW` | Yes | 7.4 SP8 | | **CDS View Entity** | `DEFINE VIEW ENTITY` | No | 7.55 |
**Recommendation**: Use CDS View Entities for new development.
Basic CDS View Syntax
@AbapCatalog.sqlViewName: 'ZCDS_EXAMPLE_V'
@AbapCatalog.compiler.CompareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Example CDS View'
define view ZCDS_EXAMPLE
as select from db_table as t
{
key t.field1,
t.field2,
t.field3 as AliasName
}CDS View Entity Syntax (7.55+)
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Example View Entity'
define view entity Z_CDS_EXAMPLE
as select from db_table as t
{
key t.field1,
t.field2,
t.field3 as AliasName
}**Key Difference**: View entities omit `@AbapCatalog.sqlViewName` - no SQL view generated.
Eclipse ADT Setup
1. **File** → **New** → **Other** → **Core Data Services** → **Data Definition**
Read more
name: sap-abap-cds
description: "Comprehensive SAP ABAP CDS (Core Data Services) reference for data modeling, view development, and semantic enrichment. Use when creating CDS views or view entities, defining data models with annotations, working with associations and cardinality, implementing input parameters, using built-in functions, writing CASE expressions, implementing access control with DCL, handling CURR/QUAN data types, troubleshooting CDS errors, querying CDS views from ABAP, or displaying data with SALV IDA. Covers ABAP 7.4+ through ABAP Cloud."
license: GPL-3.0
metadata:
maintainer: "Eduard Jiglau"
maintainer_email: "hello@sap-ai-skills.com"
website: "https://sap-ai-skills.com"
version: "2.4.1"
last_verified: "2026-04-02"
abap_release: "7.4 SP8+ / 7.50+ / ABAP Cloud"
sources:
- "https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abencds.html"
- "https://github.com/SAP-samples/abap-cheat-sheets"
keywords: [ABAP CDS, Core Data Services, CDS view, CDS view entity, define view, DDL, DCL, annotations, "@AbapCatalog", "@AccessControl", "@EndUserText", "@Semantics", "@UI", "@Consumption", "@ObjectModel", associations, cardinality, path expressions, input parameters, WITH PARAMETERS, built-in functions, CASE expression, CAST, session variables, GROUP BY, HAVING, joins, access control, DEFINE ROLE, pfcg_auth, SALV IDA, Eclipse ADT, CDS annotations, Fiori Elements, OData, RAP, currencyCode, unitOfMeasure, SD_CDS_ENTITY105]SAP ABAP CDS (Core Data Services)
Related Skills
- **sap-abap**: Use for ABAP programming patterns used with CDS or when implementing EML statements in ABAP
- **sap-btp-cloud-platform**: Use for CDS deployment scenarios on BTP or ABAP Environment configurations
- **sap-fiori-tools**: Use when building Fiori Elements applications that consume CDS views or working with UI annotations
- **sap-cap-capire**: Use for comparing CDS syntax between ABAP and CAP or when integrating ABAP CDS with CAP services
- **sap-api-style**: Use when documenting CDS-based OData services or following API documentation standards
When to Use This Skill
Use this skill when creating ABAP CDS views or view entities, defining associations and cardinalities, adding UI or semantic annotations, implementing DCL access control, handling currency/unit fields, troubleshooting CDS compiler errors, or comparing classic CDS views with newer view entities.
**Quick Reference**: [https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abencds.html](https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abencds.html) | SAP Cheat Sheets: [https://github.com/SAP-samples/abap-cheat-sheets/blob/main/15_CDS_View_Entities.md](https://github.com/SAP-samples/abap-cheat-sheets/blob/main/15_CDS_View_Entities.md)
Version Compatibility
This skill covers CDS features from **7.40 SP8** through **ABAP Cloud**. Key version boundaries:
| Feature | 7.40 SP8 | 7.50 | 7.51 | 7.55+ | |---------|:--------:|:----:|:----:|:-----:| | CDS View (`DEFINE VIEW`) | x | x | x | x | | CDS associations, parameters, built-in functions | x | x | x | x | | CDS Table Functions (`DEFINE TABLE FUNCTION`) | | x | x | x | | CDS Access Control (DEFINE ROLE / pfcg_auth) | x | x | x | x | | CDS Access Control (implicit evaluation) | | x | x | x | | Session variables (`$session.user/client/system_language`) | x | x | x | x | | `@Environment.systemField` annotation | | x | x | x | | `UPPER`/`LOWER` functions | | | x | x | | `$session.system_date` | | | x | x | | CDS Metadata Extensions (`ANNOTATE VIEW`) | | | x | x | | Cross Join in CDS | | | x | x | | **CDS View Entity (`DEFINE VIEW ENTITY`)** | | | | x | | New cardinality syntax (`to one`/`to many`) | | | | 7.57+ |
**On a 7.40 system**: Use `DEFINE VIEW` (not `DEFINE VIEW ENTITY`). CDS table functions are **not available** before 7.50. Basic DCL (`DEFINE ROLE` with `pfcg_auth`) is available from 7.40 SP08, but implicit role evaluation in ABAP SQL requires 7.50+. `$session.user/client/system_language` are available from 7.40 SP08. The templates in `templates/` include both classic CDS View and View Entity variants.
Table of Contents
- [1. CDS View Fundamentals](#1-cds-view-fundamentals)
- [2. Essential Annotations](#2-essential-annotations)
- [3. Expressions and Operations](#3-expressions-and-operations)
- [4. Built-in Functions](#4-built-in-functions)
- [5. Joins](#5-joins)
- [6. Associations](#6-associations)
- [7. Input Parameters](#7-input-parameters)
- [8. Aggregate Expressions](#8-aggregate-expressions)
- [9. Access Control (DCL)](#9-access-control-dcl)
- [10. Data Retrieval from ABAP](#10-data-retrieval-from-abap)
- [11. Common Errors and Solutions](#11-common-errors-and-solutions)
- [12. Useful Transactions and Tables](#12-useful-transactions-and-tables)
- [Bundled Resources](#bundled-resources)
- [Source Documentation](#source-documentation)
---
1. CDS View Fundamentals
View Types
| Type | Syntax | Database View | Since | |------|--------|---------------|-------| | **CDS View** | `DEFINE VIEW` | Yes | 7.4 SP8 | | **CDS View Entity** | `DEFINE VIEW ENTITY` | No | 7.55 |
**Recommendation**: Use CDS View Entities for new development.
Basic CDS View Syntax
@AbapCatalog.sqlViewName: 'ZCDS_EXAMPLE_V'
@AbapCatalog.compiler.CompareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Example CDS View'
define view ZCDS_EXAMPLE
as select from db_table as t
{
key t.field1,
t.field2,
t.field3 as AliasName
}CDS View Entity Syntax (7.55+)
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Example View Entity'
define view entity Z_CDS_EXAMPLE
as select from db_table as t
{
key t.field1,
t.field2,
t.field3 as AliasName
}**Key Difference**: View entities omit `@AbapCatalog.sqlViewName` - no SQL view generated.
Eclipse ADT Setup
1. **File** → **New** → **Other** → **Core Data Services** → **Data Definition**
40 SAP development plugins with evidence-tracked verification SAP development plugins for AI coding assistants, with public-source or package-registry verification tracked where available.
Repo: secondsky/sap-skills
Other skills on sap-skills.
- /sap-abap
Comprehensive ABAP development skill for SAP systems. Use when writing ABAP code, working with internal tables, structures, ABAP SQL, object-oriented programming, RAP (RESTful Application Programming Model), CDS views, EML statements, ABAP Cloud development, string processing,
Open skill - /sap-ai-core
Guides development with SAP AI Core and SAP AI Launchpad for enterprise AI/ML workloads on SAP BTP. Use when: deploying generative AI models, building orchestration workflows with templating/filtering/grounding, implementing RAG with vector databases, managing ML training
Open skill - /sap-api-policy
Evidence-based assessment of whether an SAP API/interface usage scenario aligns with the SAP API Policy (v.4.2026a). Use whenever someone asks whether a way of calling SAP is allowed/compliant — e.g. Published API vs internal/private/"confidential" API status, "Documented Use",
Open skill - /sap-api-style
This skill provides comprehensive guidance for documenting SAP APIs following the SAP API Style Guide standards. It should be used when creating or reviewing API documentation for REST, OData, Java, JavaScript, .NET, or C/C++ APIs. The skill covers naming conventions,
Open skill - /sap-browser-automation
Use when an agent must inspect or operate an authenticated SAP web UI through an in-app Browser, Microsoft Edge CDP, or an existing Playwright client, especially when SAP SSO reuse, isolated Edge profiles, deterministic target selection, screenshots, or browser bootstrap
Open skill - /sap-btp-best-practices
SAP BTP best practices for enterprise architecture, account management, security, and operations, with verification evidence tracked in the repository ledger. Use when planning BTP implementations, setting up account hierarchies, configuring environments, implementing
Open skill

