sap-activate-object
Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for…
Generates ABAP source code from a process text file ({doc_name}_process.txt) produced by sap-docs-extract. Supports generating: - Dialog/Module Pool programs - ABAP Reports (帳票/バッチ) - Function Modules / RFC Uses variable naming conventions from
Claude Code
$ npx -y skills add sapdev-ai/sap-dev --skill sap-gen-abap --agent claude-code
Codex
$ npx skills add sapdev-ai/sap-dev --skill sap-gen-abap -a codex -y
Cursor
$ npx skills add sapdev-ai/sap-dev --skill sap-gen-abap -a cursor -y
Gemini CLI
$ npx skills add sapdev-ai/sap-dev --skill sap-gen-abap -a gemini-cli -y
GitHub Copilot
$ npx skills add sapdev-ai/sap-dev --skill sap-gen-abap -a github-copilot -y
OpenCode
$ npx skills add sapdev-ai/sap-dev --skill sap-gen-abap -a opencode -y
Windsurf
$ npx skills add sapdev-ai/sap-dev --skill sap-gen-abap -a windsurf -y
name: sap-gen-abap
description: |
Generates ABAP source code from a process text file ({doc_name}_process.txt)
produced by sap-docs-extract. Supports generating:
- Dialog/Module Pool programs
- ABAP Reports (帳票/バッチ)
- Function Modules / RFC
Uses variable naming conventions from sap-dev-core/shared/tables/abap_naming_rules.tsv (or custom override from {custom_url}).
Prerequisites: Run /sap-docs-convert and /sap-docs-extract first.
argument-hint: "<path-to-process-txt> [--refresh-cache]"You generate ABAP source code from a process text file produced by `/sap-docs-extract`.
Task: $ARGUMENTS
| File | Purpose | |---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md` | Mandatory operating rules | | `<SAP_DEV_CORE_SHARED_DIR>/rules/language_independence_rules.md` | GUI-scripting language independence — offline generator, but rule applies to downstream deploy skills the generated source feeds | | `<SAP_DEV_CORE_SHARED_DIR>/rules/abap_code_quality_rules.md` | **Mandatory ABAP code-quality rules** — release-aware modern syntax, OOP scaffolds, exception classes, performance gates, authz hooks, ABAP Unit, dependency + traceability emission | | `<SAP_DEV_CORE_SHARED_DIR>/templates/customer_brief.md` (+ `customer_brief_<LANG>.md` variants — `_JA` shipped) | One-page Project Profile read at Step 0a via the language-aware resolution chain; drives release / OOP / perf decisions | | `<SAP_DEV_CORE_SHARED_DIR>/tables/abap_naming_rules.tsv` | Variable naming prefixes (overridable via `{custom_url}`) | | `<SAP_DEV_CORE_SHARED_DIR>/tables/frequently_errors.tsv` | **TIER-3 seed of the frequently_errors loop** — curated FM / class-method / codegen traps + remedies. Read (merged with `{custom_url}` tiers) at Step 1.5f. | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_error_hints.ps1` | CLI for the frequently_errors loop. `-Action resolve` (Step 1.5f read path) merges the 3 tiers for the spec's FMs/methods/auth-objects and writes `{work_folder}\_error_hints.txt`. OFFLINE. | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_error_hints_lib.ps1` | Engine dot-sourced by `sap_error_hints.ps1` (3-tier merge, dedup, attribution, upsert). | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_log_helper.ps1` | Shared start/step/end wrapper around `sap_log_lib.ps1`. State file: `{RUN_TEMP}\sap_gen_abap_run.json`. Logging is best-effort. |
---
**Resolve `work_dir` via the env-aware helper** — do NOT take `work_dir` from a direct `settings.json` read (that ignores the `SAPDEV_AI_WORK_DIR` env var and `userconfig.json`). Use the `WORK_DIR=` value printed by:
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))"The settings note below still applies to the OTHER keys.
**Settings reads/writes follow `<SAP_DEV_CORE_SHARED_DIR>/rules/settings_lookup.md`** — merge per-key on the `.value` field (env var → `settings.local.json` → `userconfig.json` → `settings.json`); non-per-connection writes go to `userconfig.json`. Resolve cross-plugin paths: 3 levels up from `<SKILL_DIR>`, then into `sap-dev-core\settings.json` and (if present) `sap-dev-core\settings.local.json`. Read `custom_url`.
| Setting | Default if blank | |---|---| | `work_dir` | `C:\sap_dev_work` | | `custom_url` | `{work_dir}\custom` |
Set `{WORK_TEMP}` = `{work_dir}\temp` and `{RUN_TEMP}` = the `RUN_TEMP=` value printed above (`Get-SapRunTemp` mints + creates a fresh per-run dir `{work_dir}\temp\run_<id>`). Per the CLAUDE.md "Two-bucket temp model": keep `{WORK_TEMP}` (base) only for the log state file; write this run's generated scratch — the filled `*_run.ps1` lookup scripts AND their `*_request.txt` inputs — under `{RUN_TEMP}` so concurrent runs (parallel sub-agents, multi-build) never collide on a fixed name.
Ensure the base temp directory exists:
cmd /c if not exist "{WORK_TEMP}" mkdir "{WORK_TEMP}"---
Start a structured log run. Best-effort: silently no-ops if disabled or the lib can't load. `<SAP_DEV_CORE_SHARED_DIR>` resolves to `plugins/sap-dev-core/shared/`. State file: `{RUN_TEMP}\sap_gen_abap_run.json`.
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_gen_abap_run.json" -Skill sap-gen-abap -ParamsJson "{\"input\":\"<PROCESS_TXT_PATH>\"}"---
Resolve the brief language-aware (first hit wins), where `<LANG>` is `userConfig.template_language`, else `userConfig.sap_language` (the SAP logon language), else `EN` — and `EN` needs no `_EN` probe (the base, unsuffixed file IS the EN variant):
1. `{custom_url}\customer_brief_<LANG>.md` — customer override, language-specific name. 2. `{custom_url}\customer_brief.md` — customer override. 3. `<SAP_DEV_CORE_SHARED_DIR>/templates/customer_brief_<LANG>.md` — built-in language variant (`_JA` ships today). 4. `<SAP_DEV_CORE_SHARED_DIR>/templates/customer_brief.md` — the empty default.
The resolved brief may be in any shipped language — map its fields semantically; the MODE flags below are language-independent. Extract these fields and use them to set generator MODE flags applied end-to-end:
| Brief field | MODE flag set | |---|---| | ABAP release ≥ `7.40 SP08` | `MODE_MODERN_ABAP = TRUE` (use `DATA(...)`, `VALUE #(...)`, `@` host vars, `line_exists()`, `FOR/COND/REDUCE`) | | OOP scaffolds = `yes` (or new program) | `MODE_OOP = TRUE` (emit `lcl_main` + `START-OF-SELECTION → run( )`) | | ABAP Unit tests required | `MODE_UNIT_TESTS = TRUE` (emit `ltcl_main` with one `test_*` per golden I/O) | | Change document logging required | `MODE_CHANGE_DOC = TRUE` | | Volume band per object | `MODE_PERF_BAND = sm
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.
Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for…
Natural-language SAP API discovery over RFC (no GUI): turn a goal like "create a sales order" or "post a goods movement" into a…
Runs the SAP ABAP Test Cockpit (ATC) end-to-end as a quality gate: builds an SCI Object Set scoped to the target object(s),…
Executes BDC (Batch Data Communication) sessions in SAP via RFC. Reads SHDB recording files from the bdc/ folder, connects via…
Changes the package (TADIR-DEVCLASS) assignment of an SAP repository object via the "Object Directory Entry" dialog (Goto >…
Validates ABAP source (report / program / FM / class / include) before deployment — one skill, dimension-dispatched: naming…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.