cds-view-entities
Skill0 starsChanged 3 months agoMITView on GitHub
Modelado con CDS view entities: capas del VDM (basic/composite/consumption), asociaciones, anotaciones de UI/analíticas, DCL y expresiones. Úsala cuando el usuario cree vistas CDS, define view entity, asociaciones, anotaciones, access control (DCL) o modele datos para RAP/analítica.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- dovoanhtruong/abap-agent-claudecode-workspacetheir own version, first seen Oct 12, 2026
- likweitan/abap-skillstheir own version, first seen Jul 14, 2026
- williamcorrea23/sap-router-skilltheir own version, first seen Jul 13, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- likweitan/abap-skills★ 72same name
- dovoanhtruong/abap-agent-claudecode-workspace★ 3same name
- williamcorrea23/sap-router-skill★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- abap-cloud-migrationSkill
- abap-cloudSkill
- abapgitSkill
- abap-sql-amdpSkill
- abap-unit-testingSkill
- atc-cloudificationSkill
- authorization-iamSkill
- clean-abapSkill
- odataSkill
- rap-business-eventsSkill
- rapSkill
- released-abap-classesSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 113
No accedas a tablas estándar crudas: consume vistas I_* liberadas.
- Very specific: line 115
No dupliques una I_* estándar para modificarla: extiéndela o joina desde tu ZI_*.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CDS View Entities
Guía para modelar datos con CDS view entities siguiendo el Virtual Data Model (VDM): capas, asociaciones, anotaciones semánticas y control de acceso con DCL.
Cuándo y cómo usarla
- Identifica el objetivo: exponer datos para Fiori, alimentar un BO RAP, construir una query analítica o crear una entidad reutilizable.
- Sitúa el contexto: decide la capa del VDM (basic, interface o consumption) y si consumes vistas
I_*liberadas o tu propia capa basic. - Aplica el patrón: usa
define view entity(no la sintaxis clásicaDEFINE VIEW), nombra los componentes enUpperCamelCase, añade asociaciones y anotaciones, y protege con DCL.
Las tres capas del VDM
CONSUMPTION (C_*) -> proyeccion final para un consumidor concreto
consume
INTERFACE (I_*) -> entidad de negocio estable y reutilizable
consume
BASIC (P_*) -> acceso normalizado a una tabla
consume
Tablas SAP / Z- Basic (
ZP_*): acceso normalizado a una tabla, no reutilizable fuera del módulo. - Interface (
ZI_*): contrato de negocio estable; muchasI_*de SAP están liberadas (C1). - Consumption (
ZC_*): proyección específica para Fiori, OData o analítica.
View entity raíz con asociaciones y auditoría
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Travel Root View'
define root view entity ZR_Travel
as select from ztravel
association [0..1] to I_BusinessPartner as _Customer
on $projection.CustomerId = _Customer.BusinessPartner
{
key travel_uuid as TravelUuid,
travel_id as TravelId,
agency_id as AgencyId,
customer_id as CustomerId,
total_price as TotalPrice,
currency_code as CurrencyCode,
@Semantics.user.createdBy: true
created_by as CreatedBy,
@Semantics.systemDateTime.createdAt: true
created_at as CreatedAt,
@Semantics.systemDateTime.localInstanceLastChangedAt: true
local_last_changed_at as LocalLastChangedAt,
@Semantics.systemDateTime.lastChangedAt: true
last_changed_at as LastChangedAt,
_Customer // publicar la asociacion
}Cardinalidades: [1..1] exactamente uno, [0..1] cero o uno (por defecto), [1..*] uno o varios. Publica la asociación en la lista de campos para que los consumidores puedan navegar por ella.
Proyección de consumo, textos y búsqueda
Sobre la interface se define la consumption con contrato transaccional y anotaciones de UI/búsqueda.
@EndUserText.label: 'Travel Consumption'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@Search.searchable: true
define root view entity ZC_Travel
provider contract transactional_query
as projection on ZI_Travel
{
key TravelId,
@Search.defaultSearchElement: true
@Search.ranking: #HIGH
@Search.fuzzinessThreshold: 0.8
@ObjectModel.text.element: [ 'CustomerName' ]
CustomerId,
_Customer.BusinessPartnerName as CustomerName,
TotalPrice,
CurrencyCode,
_Customer
}@ObjectModel.text.elementvincula un código con su descripción para no mostrar dos columnas.localized(por ejemplo_Status._Text.Description as StatusText : localized) inyecta el texto en el idioma del usuario.- Las transformaciones complejas (
concat,concat_with_space) van en la capa raíz, no en la proyección.
Control de acceso con DCL
Una view entity con @AccessControl.authorizationCheck: #CHECK exige un rol DCL asociado, o el ATC avisa. El rol filtra los datos según las autorizaciones PFCG del usuario.
@MappingRole: true
define role ZR_Travel_Auth {
grant select on ZR_Travel
where ( CompanyCode ) = aspect pfcg_auth( S_TRVL, BUKRS, ACTVT = '03' );
}Valores de la anotación: #CHECK (exige rol), #NOT_REQUIRED (como check pero sin warning), #NOT_ALLOWED (sin control). El control implícito solo aplica al acceder directamente a la vista con Open SQL o SADL, no cuando se usa como fuente de otra CDS.
Buenas prácticas y errores comunes
- Usa
define view entity, no la sintaxis clásicaDEFINE VIEW ... WITH. Las view entities no crean vista de diccionario y validan más estricto. - No accedas a tablas estándar crudas: consume vistas
I_*liberadas. - Nombra en
UpperCamelCasepara respetar la convención OData que heredarán los servicios. - No dupliques una
I_*estándar para modificarla: extiéndela o joina desde tuZI_*. - Planifica el DCL desde el modelado: un acceso indirecto sin rol puede exponer datos que creías filtrados.
Referencias
- Cursos y másters SAP de Logali Tech: https://logalitech.com/masters
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

