Skip to content
Development
Skill

/sap-gen-abap

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

From plugin
sap-dev
9123 skills3 agents

Claude Code

$ npx -y skills add sapdev-ai/sap-dev --skill sap-gen-abap --agent claude-code

SKILL.md

sap-gen-abap.SKILL.md
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]"

Generate ABAP Skill

You generate ABAP source code from a process text file produced by `/sap-docs-extract`.

Task: $ARGUMENTS

Shared Resources

| 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. |

---

Step 0 — Resolve Work Directory

**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}"

---

Step 0.5 — Start Logging

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>\"}"

---

Step 0a — Read the Customer Project Brief

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

Read more
@sapdev-ai
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.

9123 skills3 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
9
Star history of sapdev-ai/sap-dev on GitHub, a chart by star-history.com

Other skills on sap-dev.

sap-activate-object

sap-activate-object

Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for…

@sapdev-ai@sapdev-aiInstall Skill
sap-api-advisor

sap-api-advisor

Natural-language SAP API discovery over RFC (no GUI): turn a goal like "create a sales order" or "post a goods movement" into a…

@sapdev-ai@sapdev-aiInstall Skill
sap-atc

sap-atc

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),…

@sapdev-ai@sapdev-aiInstall Skill
sap-call-bdc

sap-call-bdc

Executes BDC (Batch Data Communication) sessions in SAP via RFC. Reads SHDB recording files from the bdc/ folder, connects via…

@sapdev-ai@sapdev-aiInstall Skill
sap-change-package

sap-change-package

Changes the package (TADIR-DEVCLASS) assignment of an SAP repository object via the "Object Directory Entry" dialog (Goto >…

@sapdev-ai@sapdev-aiInstall Skill
sap-check-abap

sap-check-abap

Validates ABAP source (report / program / FM / class / include) before deployment — one skill, dimension-dispatched: naming…

@sapdev-ai@sapdev-aiInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about sap-gen-abap.

Which coding agents can use sap-gen-abap?
sap-gen-abap installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.