Skip to content
Development
Skill

/sap-gen-cds

Generates an ABAP CDS view (Core Data Services) from a spec or a natural-language description and deploys it to a live SAP system WITHOUT ADT — via the RFC-enabled installer FM Z_CDS_DDL_INSTALL (which hosts CL_DD_DDL_HANDLER_FACTORY). Emits classic DDL (DEFINE VIEW with

From plugin
sap-dev
8123 skills3 agents
Install
$ npx -y skills add sapdev-ai/sap-dev --skill sap-gen-cds --agent claude-code

How 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-gen-cds

Context preview

The summary Claude sees to decide when to auto-load this skill.

Generates an ABAP CDS view (Core Data Services) from a spec or a natural-language description and deploys it to a live SAP system WITHOUT ADT — via the RFC-enabled installer FM Z_CDS_DDL_INSTALL (which hosts CL_DD_DDL_HANDLER_FACTORY). Emits classic DDL (DEFINE VIEW with

SKILL.md

sap-gen-cds.SKILL.md
name: sap-gen-cds
description: |
  Generates an ABAP CDS view (Core Data Services) from a spec or a natural-language
  description and deploys it to a live SAP system WITHOUT ADT — via the RFC-enabled
  installer FM Z_CDS_DDL_INSTALL (which hosts CL_DD_DDL_HANDLER_FACTORY). Emits classic
  DDL (DEFINE VIEW with @AbapCatalog.sqlViewName) on SAP_BASIS 7.50-7.54, and can emit
  view entities (DEFINE VIEW ENTITY) on 7.55+. Creates the DDL source (DDLS), registers
  its TADIR entry under a package, activates it (generating the SQL view for classic
  views), and verifies via RFC (TADIR / DD02L / DD25L). Also supports delete.
  Part of the D13 clean-core codegen lane. Phase 1 = basic / composite views; RAP
  behaviour definitions + OData binding are out of scope (demand-gated Phase 2).
  Prerequisites: SAP profile saved via /sap-login (RFC password required); SAP NCo 3.1
  (32-bit, .NET 4.0) in GAC; SAP_BASIS >= 7.50; the installer FM Z_CDS_DDL_INSTALL
  present + Remote-Enabled (Step 3 bootstraps it if absent).
argument-hint: "<VIEW_NAME> [--from <spec-or-desc>] [--sql-view <NAME>] [--base <TABLE>] [--package <PKG>] [--delete] [--activate|--no-activate]"

SAP CDS View Generation Skill

You generate an ABAP CDS view from a spec / description and deploy it to a live SAP system with **no ADT** — the DDL source is created + activated through the RFC-enabled installer FM `Z_CDS_DDL_INSTALL`.

Task: $ARGUMENTS

---

Shared Resources

| File | Token / use | Purpose | |---|---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/safety_policy.md` | *(rule)* | **Rule 0 (highest priority)** — environment guard; enforced by Step 0b via `sap_safety_gate.ps1` | | `<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md` | *(rule)* | Mandatory operating rules. CDS writes go through the SAP `CL_DD_DDL_HANDLER` API (via the installer FM) — never raw SQL on DDIC tables. | | `<SAP_DEV_CORE_SHARED_DIR>/rules/tr_resolution.md` | *(rule)* | TR resolution — transportable views delegate to `/sap-transport-request`; `$TMP` needs no TR. | | `<SAP_DEV_CORE_SHARED_DIR>/tables/sap_object_naming_rules.tsv` | *(read)* | `CDS_VIEW` + `CDS_SQL_VIEW` naming rows (validated in Step 1.5). | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_check_object_name.ps1` | *(invoke)* | Shared object-name validator. | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_lib.ps1` | *(dot-source)* | NCo helpers used by the deploy/verify references. | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_tadir_delete.ps1` | *(invoke)* | Clears the DDLS TADIR orphan the handler's `delete` leaves behind (delete flow). | | `<SKILL_DIR>/references/sap_cds_release_probe.ps1` | *(invoke)* | RFC read of CVERS SAP_BASIS for the Step 0a release gate. | | `<SKILL_DIR>/references/Z_CDS_DDL_INSTALL.abap` | *(deploy source)* | The installer FM source of record (bootstrapped in Step 3). | | `<SKILL_DIR>/references/sap_cds_deploy.ps1` | *(invoke)* | RFC caller for the installer FM (CREATE / DELETE); fails loud if the FM is absent / not Remote-Enabled. | | `<SKILL_DIR>/references/sap_cds_verify.ps1` | *(invoke)* | RFC verification: TADIR(DDLS) + generated SQL view active (DD02L / DD25L). |

---

Step 0 — Resolve Work Directory

Resolve `work_dir` via the env-aware helper (never a direct `settings.json` read). Resolve `<SAP_DEV_CORE_SHARED_DIR>` (cross-plugin: 3 levels up from `<SKILL_DIR>`, then `sap-dev-core\shared`). Capture `WORK_DIR` + `RUN_TEMP`:

powershell -NoProfile -ExecutionPolicy Bypass -Command ". '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_settings_lib.ps1'; . '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_connection_lib.ps1'; Write-Output ('WORK_DIR=' + (Get-SapWorkDir)); Write-Output ('RUN_TEMP=' + (Get-SapRunTemp)); Write-Output ('CUSTOM_URL=' + (Get-SapSettingValue 'custom_url' ((Get-SapWorkDir) + '\custom')))"

Set `{WORK_TEMP}` = `{work_dir}\temp`; write this skill's scratch (generated `.ddl`) under `{RUN_TEMP}`.

Step 0.5 — Start Logging

powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_gen_cds_run.json" -Skill sap-gen-cds -ParamsJson "{\"view\":\"<VIEW_NAME>\"}"

---

Step 0a — Release Gate (>= 7.50, honest NOT_SUPPORTED)

CDS DDL sources require the DDL handler infrastructure — SAP_BASIS **7.50+**. Classic CDS (`DEFINE VIEW ... @AbapCatalog.sqlViewName`) works 7.50-7.54; **view entities** (`DEFINE VIEW ENTITY`, no SQL view) need **7.55+**. Probe the release (the reader runs from a file — never an inline `-Command` with `$vars`, which the bash host expands to empty before PowerShell parses):

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_cds_release_probe.ps1" -SharedScripts "<SAP_DEV_CORE_SHARED_DIR>\scripts"

Parse the `SAP_BASIS=<release>` line; `RELEASE: ERROR …` → surface it (no RFC destination / read failed) and do not guess a release.

  • `SAP_BASIS >= 750` → continue. Choose the DDL dialect: **classic** (default, always

safe on 7.50-7.54) or **view entity** only when `>= 755` AND the caller asked for one.

  • `SAP_BASIS < 750` (e.g. ECC6 / 7.31) → **STOP**. Report

`NOT_SUPPORTED: CDS views require SAP_BASIS >= 7.50 (this system is <release>). Use classic ABAP (/sap-gen-abap) instead.` Log end `Status SKIPPED`, `ErrorClass CDS_RELEASE_UNSUPPORTED`.

---

Step 0b — Safety Gate (Rule 0 — `safety_policy.md`)

This skill deploys and activates a CDS view in the live system (DDLS create + TADIR registration + activation through the installer FM) and can also `--delete`. Generation (Step 2) is local, but the flow continues into deploy — run the environment gate up front:

powershell -NoProfile -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_safety_gate.ps1" -Action assert -Skill sap-gen-cds

| Verdict (last line) | Exit | Action | |---|---|---| | `SAFETY: ALLOW ...` | 0 | proceed (log via `-Action step`, step `safety_gate`) | | `

Read more
Ships withsap-dev

SAP development automation skills for AI coding assistants. Windows-only — the skills drive SAP GUI for Windows via GUI Scripting (plus optional RFC via SAP NCo); there is no macOS/Linux path.

Get the whole plugin

Other skills on sap-dev.