efeumutaslan/SAP-SKILLS / skills/sap-rap-comprehensive
sap-rap-comprehensive
VerifiedSAP RAP (RESTful Application Programming Model) comprehensive development skill. Use when creating RAP business objects, writing BDEF/CDS view entities, implementing validations/ determinations/actions, handling drafts, writing EML, or extending standard RAP BOs. If the user mentions RAP, BDEF, behavior definition, CDS view entity, EML, managed/unmanaged BO, or service binding, use this skill. Covers BTP, S/4HANA Cloud, and On-Premise.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.5 KB |
| references/bdef-syntax-reference.md | markdown | 11.1 KB |
| references/eml-cheatsheet.md | markdown | 8.2 KB |
| references/rap-complete-guide.md | markdown | 62.1 KB |
| scripts/validate-rap-bo.sh | script | 3.8 KB |
| templates/handler-class.abap | other | 5.4 KB |
| templates/managed-bo.cds | other | 3.6 KB |
| templates/test-class.abap | other | 5.1 KB |
templates/managed-bo.cds
View on GitHub// ============================================================
// RAP Managed Business Object — Complete Template
// Replace {{PLACEHOLDER}} values with your names
// ============================================================
// --- 1. Database Table ---
// Create via ADT: New > Dictionary > Database Table
// @EndUserText.label : '{{Entity Description}}'
// define table {{ztab_entity}} {
// key client : abap.clnt not null;
// key {{entity}}_uuid : sysuuid_x16 not null;
// {{entity}}_id : abap.numc(8);
// description : abap.char(256);
// status : abap.char(1);
// @Semantics.amount.currencyCode : '{{ztab_entity}}.currency_code'
// total_amount : abap.curr(15,2);
// currency_code : abap.cuky;
// created_by : syuname;
// created_at : timestampl;
// last_changed_by : syuname;
// last_changed_at : timestampl;
// local_last_changed_at : timestampl;
// }
// --- 2. CDS View Entity (Interface Layer) ---
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: '{{Entity Description}}'
define root view entity {{ZI_Entity}}
as select from {{ztab_entity}}
{
key {{entity}}_uuid as {{Entity}}UUID,
{{entity}}_id as {{Entity}}ID,
description as Description,
status as Status,
@Semantics.amount.currencyCode: 'CurrencyCode'
total_amount as TotalAmount,
currency_code as CurrencyCode,
@Semantics.user.createdBy: true
created_by as CreatedBy,
@Semantics.systemDateTime.createdAt: true
created_at as CreatedAt,
@Semantics.user.lastChangedBy: true
last_changed_by as LastChangedBy,
@Semantics.systemDateTime.lastChangedAt: true
last_changed_at as LastChangedAt,
@Semantics.systemDateTime.localInstanceLastChangedAt: true
local_last_changed_at as LocalLastChangedAt
}
// --- 3. CDS Projection View (Consumption Layer) ---
// @AccessControl.authorizationCheck: #CHECK
// @EndUserText.label: '{{Entity Description}} - Projection'
// @Metadata.allowExtensions: true
// define root view entity {{ZC_Entity}}
// provider contract transactional_query
// as projection on {{ZI_Entity}}
// {
// key {{Entity}}UUID,
// {{Entity}}ID,
// Description,
// Status,
// TotalAmount,
// CurrencyCode,
// CreatedBy,
// CreatedAt,
// LastChangedBy,
// LastChangedAt,
// LocalLastChangedAt
// }
// --- 4. Behavior Definition ---
// managed implementation in class {{zbp_i_entity}} unique;
// strict ( 2 );
// with draft;
//
// define behavior for {{ZI_Entity}} alias {{Entity}}
// persistent table {{ztab_entity}}
// draft table {{zdraft_entity}}
// etag master LocalLastChangedAt
// lock master total etag LastChangedAt
// authorization master ( global, instance )
// {
// field ( readonly ) {{Entity}}UUID;
// field ( numbering : managed ) {{Entity}}UUID;
// field ( mandatory ) Description;
//
// create; update; delete;
//
// determination SetDefaults on modify { create; }
// validation ValidateDescription on save { field Description; }
//
// draft action Resume;
// draft action Edit;
// draft action Activate optimized;
// draft action Discard;
// draft determine action Prepare;
//
// mapping for {{ztab_entity}} corresponding;
// }
// --- 5. Service Definition ---
// define service {{ZSD_Entity}} {
// expose {{ZC_Entity}} as {{Entity}};
// }
// --- 6. Service Binding ---
// Create via ADT: New > Service Binding
// Binding Type: OData V4 - UI
// Service Definition: {{ZSD_Entity}}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |