Skip to content
Development
Skill

/sap-gen-rap

Generate a complete, mutually-consistent managed-RAP business object file set from a base table — the biggest capability gap for on-prem clean-core dev without ADT. `generate` renders the root CDS + projection CDS + two behavior definitions + behavior pool + service definition +

From plugin
sap-dev
8123 skills3 agents
Install
$ npx -y skills add sapdev-ai/sap-dev --skill sap-gen-rap --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-rap

Context preview

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

Generate a complete, mutually-consistent managed-RAP business object file set from a base table — the biggest capability gap for on-prem clean-core dev without ADT. `generate` renders the root CDS + projection CDS + two behavior definitions + behavior pool + service definition +

SKILL.md

sap-gen-rap.SKILL.md
name: sap-gen-rap
description: |
  Generate a complete, mutually-consistent managed-RAP business object file set
  from a base table — the biggest capability gap for on-prem clean-core dev without
  ADT. `generate` renders the root CDS + projection CDS + two behavior definitions +
  behavior pool + service definition + service-binding spec + MANUAL_STEPS.md (field
  list/keys resolved live via DDIF_FIELDINFO_GET; dialect-forked 7.54 classic vs
  7.55+ view-entity); `package` builds an abapGit-layout zip so ZABAPGIT_STANDALONE
  imports it with no ADT; `verify` re-reads every artifact over RFC (TADIR + DDLS/
  CLAS/SRVD active via DWINACTIV; BDEF/SRVB presence — activation/publish honestly
  COULD_NOT_CHECK, never a false pass). S/4-ONLY (refuses SAP_BASIS < 7.54 or a
  system with no RAP infrastructure — RAP_RELEASE_UNSUPPORTED). generate/package/
  verify are read-only/local; `deploy` (guided partial deploy with ADT pauses) is
  v1.5. Scope: managed, OData V2, root-only, non-draft. Prerequisites: /sap-login
  pinned to the S/4 system; SAP NCo 3.1 (32-bit).
argument-hint: "generate <STEM> --table <ZTABLE> [--package <PKG>]  |  package <work_folder>  |  verify <work_folder | --stem <STEM>>"

SAP RAP Business Object Generation (no ADT)

Writing a consistent RAP file set by hand — interface CDS + projection + a BDEF pair

  • behavior pool + SRVD/SRVB, all cross-referencing each other with exact names — is

error-prone even in ADT. This generates the whole set from a base table, packages it for a no-ADT abapGit import, and verifies the result with authoritative RFC re-reads.

Task: $ARGUMENTS

**S/4-only.** RAP does not exist on ECC. Step 1.2 refuses a system below SAP_BASIS 7.54 or with no `R3TR BDEF` rows (`RAP_RELEASE_UNSUPPORTED`), pointing to /sap-gen-abap

  • /sap-gen-cds. **generate/package/verify are read-only/local** (the only SAP touch is

a DDIC read + verify re-reads); no writes, no TR.

---

Shared Resources

| File | Token / call | Purpose | |---|---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md` | *(rule)* | Mandatory operating rules | | `<SAP_DEV_CORE_SHARED_DIR>/tables/sap_object_naming_rules.tsv` | *(read)* | `RAP_INTERFACE_VIEW` / `RAP_PROJECTION_VIEW` / `RAP_BEHAVIOR_CLASS` / `RAP_SERVICE_DEFINITION` / `RAP_SERVICE_BINDING` rows | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_check_object_name.ps1` | *(invoke)* | Naming validator (Step 1.5) | | `<SKILL_DIR>/references/sap_gen_rap_generate.ps1` | `-Table -Stem -Release -OutDir` | Render the RAP file set (DDIF_FIELDINFO_GET + templates) | | `<SKILL_DIR>/references/sap_gen_rap_package.ps1` | `-WorkDir -Stem` | abapGit-layout zip | | `<SKILL_DIR>/references/sap_gen_rap_verify.ps1` | `-Ddls -Bdef -Clas -Srvd -Srvb` | RFC verification (read-only) | | `<SKILL_DIR>/references/templates/*.tpl` | *(render)* | 7 templates (root 754/755, projection, 2 BDEF, behavior pool, SRVD, manual steps) | | `../sap-gen-cds/references/sap_cds_release_probe.ps1` | *(invoke)* | CVERS SAP_BASIS for the Step 1.2 release gate | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_artifact_lib.ps1` / `sap_finding_lib.ps1` | `%%ARTIFACT_LIB_PS1%% %%FINDING_LIB_PS1%%` | Register outputs + verdict |

> Ships **no GUI VBS**. The RFC legs (generate DDIC lookup, verify) connect to the > pinned profile. `<SAP_DEV_CORE_SHARED_DIR>` is 3 levels up from `<SKILL_DIR>` then > `sap-dev-core\shared` (cross-plugin).

Step 0 / 0.5 — Work Dir + Logging

Resolve `work_dir`/`{RUN_TEMP}`/`{custom_url}` (house one-liner — `sap_connection_lib.ps1` is dot-sourced there — with `Write-Output ('RUN_TEMP=' + (Get-SapRunTemp))` appended; `{RUN_TEMP}` = the per-run scratch dir holding the log state file — mint it once here and reuse, re-minting breaks the `-Action end` state-file lookup), then `sap_log_helper.ps1 -Action start` (state `{RUN_TEMP}\sap_gen_rap_run.json`).

Step 1 — Mode Dispatch

`generate` | `package` | `verify` (implemented) | `deploy` (**v1.5** — see Scope; refuse with that note). Parse `--table`, `--package` (default `$TMP`), `--stem`.

Step 1.2 — Release + Capability Gate (generate/verify)

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

Parse `SAP_BASIS=<n>`. **`< 754` → STOP `RAP_RELEASE_UNSUPPORTED`** (RAP infrastructure absent; use /sap-gen-abap + /sap-gen-cds). `754` → the **classic** root-view dialect (`-Release 754`); `>= 755` → **view-entity** dialect (`-Release 755`). Capability cross-check: `verify` reading `TADIR R3TR BDEF` returning zero on the whole system also means no RAP → same refusal. (Verified: S4D 1909 = 754, has BDEF rows.)

Step 1.5 — Naming Pre-Check (generate)

Validate all five names via `sap_check_object_name.ps1` (`RAP_INTERFACE_VIEW ZI_<stem>`, `RAP_PROJECTION_VIEW ZC_<stem>`, `RAP_BEHAVIOR_CLASS ZBP_<stem>`, `RAP_SERVICE_DEFINITION ZUI_<stem>`, `RAP_SERVICE_BINDING ZUI_<stem>_O2`). A violation → ask proceed/abort (`OBJECT_NAMING_VIOLATION`).

Step 2 — generate

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_gen_rap_generate.ps1" -Table <ZTABLE> -Stem <STEM> -Release <754|755> -OutDir "{work_dir}\rap\<stem>" -Package "<PKG>" -Label "<text>" -WorkDir "<work_dir>"

Reads the base table's fields + keys over RFC (`DDIF_FIELDINFO_GET`, skips MANDT), renders the file set (`RAPGEN:` per artifact) + `MANUAL_STEPS.md` + `srvb_spec.md`. Present the generated set to the user. **The behavior pool is empty** (managed CRUD needs no handler); validations/determinations from a spec are a manual-paste follow-up (v1.5). `STATUS: ERROR` on a table with no fields/keys.

Step 3 — package

powershell -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_gen_rap_package.ps1" -WorkDir "{work_dir}\rap\<stem>" -Stem <STEM>

Builds `<stem>_rap_abapgit.zip` (aba

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.