/sc4sap:create-programfrom sc4sap
Creates ABAP programs (Report, CRUD, ALV, Batch) with Main+Include structure, supporting OOP or Procedural paradigms. Runs a Socratic interview to resolve ambiguity, then orchestrates coding and QA agents for delivery.
Ships in sc4sap. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Offline profile (
common/offline-mode.md): blocked — reply with the stop line there and stop.
Core ABAP program creation skill. Generates a Main Program wrapped with conditional Includes following the sc4sap template convention. Supports both OOP (two-class split: Data + Screen/ALV) and Procedural (PERFORM) paradigms. Full pipeline: SAP version preflight → Socratic interview → planner → writer spec → user confirm → executor/qa/reviewer.
sc4sap:create-program is the flagship skill for creating new ABAP programs. It handles a wide range of purposes (Report, CRUD, ALV list, Batch, Interface). Before coding starts, it runs an internal Socratic interview to resolve ambiguity, then produces a confirmed spec, then orchestrates coding and QA agents to deliver activated, tested ABAP objects following sc4sap conventions.<Response_Prefix>Every response triggered by this skill MUST begin with [Model: <main-model> · Dispatched: <sub-summary>] per ../../common/model-routing-rule.md § Response Prefix Convention.</Response_Prefix>
<Phase_Banner>Multi-phase skill. Before each Agent(...) dispatch, emit ▶ phase=<id> (<label>) · agent=<name> · model=<Opus|Sonnet|Haiku> per ../../common/model-routing-rule.md § Phase Banner Convention. Resolve the dispatch mode first per ../../common/model-dispatch-mode.md: auto (default) uses the model below/in the rule; user-defined asks the user Opus / Sonnet / Haiku (recommended one first) before each dispatch group. Resolve the cost mode too per ../../common/cost-mode.md (standard default; eco → pass BOTH model and effort on every Agent(...) call per its lever-A table (omitting effort silently runs the agent at its frontmatter effort, usually high), Skill("sc4sap:eco", "--attach") first and on every continuation turn, and this skill's eco recipe in cost-rules.md § 2). Cost rules for fix rounds, the post-delivery --fix hand-off and main-thread context (cost-rules.md § 1, § 3) apply in both modes.</Phase_Banner>
<Team_Mode>Four teamMode integration points — Type A: Phase 1A (post-interview cross-module consistency) + Phase 2 (planner conflict resolution) — see team-mode.md. Type B: Phase 4 Wave 2/3 — user opt-in at Phase 3.5 (default off; executor's novel code gets live consultant review) — see team-mode-b.md. Type D: Phase 1A↔1B bridge — user-chosen at Phase 1A close (legacy sequential 1B vs Type D team synthesis); analyst + architect + consultant parallel synthesis replaces sequential 1B when selected — see team-mode-d.md. Base protocol: ../../common/team-consultation-protocol.md.</Team_Mode>
<Fix_Entry>Arguments with --fix "<request>", or a {PROG} whose state.json shows Phase 8 completed → run cost-rules.md § 1c (start from handoff.md; Phases 0–3 do not re-run) instead of the pipeline below.</Fix_Entry>
<Use_When>
<Do_Not_Use_When>
/sc4sap:create-objectUpdateProgram / UpdateInclude MCP calls in patch mode (../../common/patch-mode.md)/sc4sap:create-object (with service binding + behavior definition)/sc4sap:create-object with type=program
</Do_Not_Use_When><Shared_Conventions>
The following rules are shared across sc4sap skills and live in sc4sap/common/. Load and apply them during the relevant phases of this skill:
| Convention | Reference File | Applied In |
|---|---|---|
| Include structure (OOP t/s/c/ct/e/o/i; Procedural t/s/o/i/f + c/a) | ../../common/include-structure.md | Planner, Executor |
| OOP two-class pattern (LCL_DATA + LCL_ALV) | ../../common/oop-pattern.md | Executor (OOP mode only) |
| ALV rules (Full vs SALV, field catalog standard) | ../../common/alv-rules.md | Executor, Reviewer |
| Text element rule (no hardcoded display literals) | ../../common/text-element-rule.md | Executor, Reviewer |
| Constant rule (no magic literals in logic) | ../../common/constant-rule.md | Executor, Reviewer |
Procedural FORM naming (_{screen_no} suffix) | ../../common/procedural-form-naming.md | Executor (Procedural mode only), Reviewer |
| Naming conventions (program/include/class/screen) | ../../common/naming-conventions.md | Planner, Executor, Reviewer |
| ECC DDIC fallback (Table / DTEL / DOMA on ECC) | ../../common/ecc-ddic-fallback.md | Planner (gate), Executor (program generation), Reviewer |
| Clean ABAP — shared baseline | ../../common/clean-code.md | Executor, Reviewer (always) |
| Clean ABAP — OOP paradigm | ../../common/clean-code-oop.md | Executor, Reviewer — only when Phase 1B paradigm = OOP |
| Clean ABAP — Procedural paradigm | ../../common/clean-code-procedural.md | Executor, Reviewer — only when Phase 1B paradigm = Procedural |
| Mandatory main-program template (OOP) | ../../common/oop-sample/zrsc4sap_oop_ex.prog.abap (+ companion includes / screens in same folder) | Executor Wave 3 (starting skeleton) + Reviewer B3 bucket (structural match) — OOP paradigm |
| Mandatory main-program template (Procedural) | ../../common/procedural-sample/main-program.abap (+ include samples zsdr90010*.abap and README.md in same folder) | Executor Wave 3 + Reviewer B3 bucket — Procedural paradigm |
| Code template (optional, Phase 1B dim 2a) | code-template.md — saved templates in templates/<NAME>/ (profile.md + skeleton/) | Interview, writer (Code template section of spec.md), executor + reviewer B3 for the roles mapped to a template; replaces the two rows above for those roles only |
Paths are relative to this skill's directory (sc4sap/skills/create-program/).
ECC DDIC gate. When the planner's object list includes a new Table, Structure, Data Element, or Domain AND SAP_VERSION = ECC, Phase 4 (Executor) follows ../../common/ecc-ddic-fallback.md: Path 1 — the MCP tools in their ECC call shapes (CreateTable / CreateStructure with fields, CreateDataElement with a domain), which create, transport and activate through the ZMCP_ADT_DDIC_* FMs. Only on a Path 2 error (no OData backend, FMs not installed, old MCP): generate a helper report in $TMP from the template under skills/create-object/ecc/, activate the helper, emit the mandatory user message (SE38 run → uncheck dry-run → SE11 activate + assign transport), and do not treat the DDIC object as created until the user confirms activation. Remaining objects (classes, includes, screens, …) proceed on the normal flow; the plan should sequence the DDIC helpers first so the user can create them before code that depends on them is activated.
</Shared_Conventions>
<Preflight_SAP_Version_Check> MUST run BEFORE the Socratic interview starts. The entire development approach (tables, BAPIs, CDS availability, ABAP syntax, RAP eligibility) depends on the SAP platform and release.
Steps:
.sc4sap/config.json for sapVersion, abapRelease, and activeModules
.sc4sap/sap.env → SAP_ACTIVE_MODULES as fallbackcommon/active-modules.md and precompute the cross-module concern list for the program's primary module. Every downstream phase (planner, writer, executor) receives this list and must factor in integration fields (e.g., MM primary + PS active → add PS_POSID).abapRelease (e.g. 750, 756, 758) — drives allowed syntaxBranching consequences:
if_oo_adt_classrun, or SALV-only output. Fail-fast with an explanation. Full prohibited-statement list and Cloud-native API replacements: see ../../common/cloud-abap-constraints.md.Outputs:
.sc4sap/program/{PROG}/platform.md — resolved platform, release, and constraints<Inventory_Lookups>
Runs immediately after package + module are resolved during the interview (Phase 1 dimension #6) and feeds every downstream phase. Two sequential inventory passes: CBO Inventory (reusable Z*/Y* objects in the target package — delegated to sap-stocker on cache miss) then Customization Inventory (existing BAdI impls / CMOD projects / form-based exits / appends per module).
Full procedure (when-to-stock, three-option prompt, dispatch template, persistence paths, reuse-gating rules) lives in inventory-lookups.md. Read and follow literally. Output files consumed by planner / writer / executor:
.sc4sap/program/{PROG}/cbo-context.md.sc4sap/program/{PROG}/customization-context.md
</Inventory_Lookups><Interview_Gating>
MANDATORY — never skip, never shortcut, never merge. Phase 1 runs as two sequential sub-phases (1A then 1B) on every sc4sap:create-program invocation.
Full procedure — two-stage rule, lead agents, dimension lists, skip rules, gates, output files, and enforcement contracts — lives in interview-gating.md. Read that file and follow it literally before asking the first question.
One-line summary:
Phase 1A
sap-{module}-consultantinterviews business context (purpose / reason / company rules / reference assets / standard-SAP alternatives) → filemodule-interview.md, gate ≤ 5% → Phase 1Bsap-analyst+sap-architectinterview technical dimensions (purpose-type / paradigm / display / screen / data / package / test) → fileinterview.md, gate ≤ 5% → proceed to<Spec_Approval_Gate>. Phase 1B never starts before 1A closes; Phase 2 planner refuses to run if either file is missing. </Interview_Gating>
<Spec_Approval_Gate>
MANDATORY — never skip, never shortcut. After <Interview_Gating> closes (ambiguity ≤ 5%) and Phase 2 (Planning) produces plan.md, the skill MUST run a spec-approval gate before any Create* / Update* MCP call.
Full procedure — required steps, enforcement contract, rationale, spec template, and the verbatim user-facing approval prompt — lives in spec-approval-gate.md. Read that file and follow it literally.
One-line summary (the full text lives in the companion file):
Invoke
sap-writer→ producespec.md→ display to user → wait for an explicit approval keyword (승인/approve/ok/proceed/go ahead/confirmed). "yes" / "빨리" / "해봐" / silence are NOT approval — loop with revisions. Phase 4 Executor refuses to run if spec.md is missing, unapproved, or modified after approval. </Spec_Approval_Gate>
<Session_Trust_Bootstrap>
MANDATORY — runs at the very start of Phase 1A, BEFORE the module consultant asks the first question. Invoke /sc4sap:trust-session with parent_skill=sc4sap:create-program to pre-grant MCP tool + file-op permissions for the entire session. This ensures interview-time MCP calls (consultant SPRO lookups, SearchObject, GetWhereUsed) and downstream Phase 4–8 activity both run without permission prompts.
.sc4sap/session-trust.log already has a line within the last 24h, skip silently.GetTableContents and GetSqlQuery are NEVER auto-approved — they require explicit per-call user consent. See ../trust-session/SKILL.md Layer 1.
</Session_Trust_Bootstrap><Execution_Mode_Gate>
MANDATORY — runs between <Spec_Approval_Gate> and Phase 4. After spec approval, the skill prompts the user to pick an execution cadence: auto / manual / hybrid. Persists the choice to .sc4sap/program/{PROG}/state.json under execution_mode.
trust-session is NOT re-invoked here — it already ran at the start of Phase 1A.
Full procedure — verbatim mode-prompt text, per-mode semantics, state.json schema (also drives C-2 resume support), and manual-mode phase-transition prompt — lives in execution-mode.md. Read that file and follow it literally before dispatching Phase 4.
</Execution_Mode_Gate>
<Agent_Pipeline>
The full phase-by-phase pipeline (Phase 0 – Phase 8) lives in agent-pipeline.md in this skill folder.
Read that file before dispatching any agent. It is the authoritative source for:
sap-{module}-consultant, business context)sap-analyst + sap-architect, technical dimensions)sap-planner + consultants, CBO reuse gate, SPRO lookup)sap-writer)sap-executor)sap-qa-tester, OOP mode)sap-code-reviewer, mandatory, see phase6-review.md)sap-debugger)Do not inline or paraphrase phase logic here — update agent-pipeline.md instead so the pipeline stays single-sourced.
</Agent_Pipeline>
<MCP_Tools_Used>
SearchObject — existence checkListTransports / CreateTransport — transport managementGetPackage — package validationCreateProgram + UpdateProgram — main programCreateInclude + UpdateInclude — all includes (TOP/SEL/CLASS/ALV/PBO/PAI/EVENT/FORM/TEST)CreateScreen + UpdateScreen — custom screens (ALV full mode)CreateGuiStatus + UpdateGuiStatus — PF-Status for custom screensCreateTextElement + UpdateTextElement — text-xxx resourcesGetAbapSemanticAnalysis — local parse of the text it is given (no include resolution); the SAP syntax check runs inside ActivateObjectsGetInactiveObjects — post-activation verificationRunUnitTest / GetUnitTestResult — QA (OOP mode)
</MCP_Tools_Used><State_Files>
.sc4sap/program/{PROG}/platform.md — Phase 0 preflight output.sc4sap/program/{PROG}/module-interview.md — Phase 1A business interview (consultant-led: purpose / reason / company-specific rules / reference assets / standard-SAP alternatives).sc4sap/program/{PROG}/interview.md — Phase 1B technical interview (analyst+architect-led: 7 dimensions + 2a code template Q&A log).sc4sap/program/{PROG}/cbo-context.md — CBO reuse candidates (written by <Inventory_Lookups> / inventory-lookups.md).sc4sap/program/{PROG}/customization-context.md — Z*/Y* BAdI impl / CMOD / form-exit / append reuse candidates (written by <Inventory_Lookups> / inventory-lookups.md).sc4sap/program/{PROG}/ddic-brief.md — Haiku sap-checker scout facts for objects named in Phase 1A (read before any Get* by 1B / consultants / planner).sc4sap/program/{PROG}/plan.md — planner output.sc4sap/program/{PROG}/spec.md — writer output (requires user confirm).sc4sap/program/{PROG}/state.json — execution_mode + per-phase status/timing (schema in execution-mode.md, drives resume support).sc4sap/program/{PROG}/verify-phase4.md — Haiku verify results for text pools, screens, GUI statuses, inactive count (see phase4-verify.md).sc4sap/program/{PROG}/review-bucket-{B1|B2|B3|B4}.md — Phase 6 per-bucket reviews, buckets strategy (merged into review.md, see phase6-buckets.md).sc4sap/program/{PROG}/review-candidates.md — Phase 6 Haiku detector output, detect-judge strategy (see phase6-detect-judge.md).sc4sap/program/{PROG}/review.md — Phase 6 consolidated review.sc4sap/program/{PROG}/decisions.md — executor ## Decisions lines, appended by main (feeds the report's Decisions & Assumptions).sc4sap/program/{PROG}/receipt.json — Done Criteria verdicts built by scripts/evidence/build-receipt.mjs from the hook-written .sc4sap/evidence/ledger.jsonl (agents never write either; see common/evidence-receipt.md).sc4sap/program/{PROG}/report.md — final completion report (Evidence first, per common/verification-evidence.md); on a first creation also report.html, published as a private claude.ai Artifact when the host has the Artifact tool (result-artifact.md).sc4sap/program/{PROG}/{spec,report}.html — optional single-file HTML copies, offered after Phase 8.sc4sap/program/{PROG}/handoff.md — written after Phase 8; the only start context of a --fix run in a new session (cost-rules.md § 1b–1c).claude/settings.local.json — permissions allowlist (written by /sc4sap:trust-session during Phase 3.5).sc4sap/session-trust.log — audit trail of trust-session invocations
</State_Files>Task: $ARGUMENTS
agent-pipeline.md (opens in a new tab)code-template.md (opens in a new tab)cost-rules.md (opens in a new tab)execution-mode.md (opens in a new tab)interview-gating.md (opens in a new tab)inventory-lookups.md (opens in a new tab)multi-executor-split.md (opens in a new tab)phase4-parallel.md (opens in a new tab)phase4-verify.md (opens in a new tab)phase6-buckets.md (opens in a new tab)phase6-detect-judge.md (opens in a new tab)phase6-output-format.md (opens in a new tab)phase6-review.md (opens in a new tab)result-artifact.md (opens in a new tab)spec-approval-gate.md (opens in a new tab)team-mode-b.md (opens in a new tab)team-mode-d.md (opens in a new tab)team-mode.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
inheritThree short reads, in order
npx claudepluginhub babamba2/superclaude-for-sap --plugin sc4sap31 skills in this plugin
/adobe-from-pdfBuild an Adobe form (SFP — interface, context and XDP layout) from a PDF of the printed form, the way smartform-from-pdf builds a SmartForm, upload it to the DEV system, print it there and score the print against the source page. Awaiting approval — not runnable yet./adobe-previewDraw the expected print of an Adobe form (SFP, S/4HANA) as HTML pages in mm (plus JPG / PDF with a local browser) — the XFA layout with its master pages, flowed tables with repeated headers, page breaks, captions, pictures (dates, numbers, currency shifts), rich text with embedded fields, rounded boxes and images — filled with invented sample values sized to the interface's DDIC types. On a development system it can print SAP's example forms through ADS and score the preview against SAP's own PDF./analyze-codeABAP code analysis — size-gated review (one Opus sap-code-reviewer, or Haiku sap-checker detectors + Opus judge for large objects), Haiku evidence check on every finding, then a canned report or a richer briefing on the main thread/analyze-symptomRead-only, step-by-step root cause analysis for SAP operational errors. Reads the dump summary and failing source via MCP (known-issue web lookup only when the failure is in standard SAP code), widens to transports and where-used only when the clues call for it, narrows hypotheses with minimal user questions, and provides SAP Note search keywords. Never changes code or data./ask-consultantDirect operational Q&A with a SAP module consultant agent. Auto-routes the question to the matching sap-{module}-consultant and answers against the configured SAP environment (version, industry, country, active modules)./assistBusiness assistant for the connected SAP system — looks up and changes specific documents through the installed business actions (query → preview → user confirm → execute), one confirmed step at a time. Use for requests about concrete SAP data such as open purchase orders, goods receipt, delivery complete, PO release, production order release / confirmation / TECO, sales order create or change, delivery / billing block, post goods issue, billing, FI document display or reversal, payment block, G/L posting, internal order status, cost center actuals, cost repost or activity allocation, document output status or reprint, shipments, picking, packing / handling units, shipment costs, warehouse transfer orders and requirements, bin and warehouse stock (ECC LE / WM), maintenance notifications and orders, equipment, functional locations and maintenance plans (ECC PM), EWM warehouse tasks, warehouse orders, bins, stock locations, handling units and delivery warehouse progress (S/4 EWM, lookups only). Korean requests too — 미결 PO, 입고, 완결, 납기 변경, 승인, 생산오더, 실적 등록, 기술적 완료, 판매오더, 출하 보류, 청구 보류, 출고 전기, 청구 생성, 전표 조회, 역분개, 지급보류, 분개 전기, 내부오더, 코스트센터 실적, 비용 재전기, 활동 배부, 출력 상태, 재출력, 운송/선적 생성, 피킹, 포장, HU, 운송비, 이전오더(TO) 생성/확정/취소, 이전요청(TR), 저장빈, 창고 재고, 재고실사, 보전오더, 보전통지, 고장 통지, 설비, 기능위치, 보전계획, 보전오더 기술적 완료, 미결 창고작업, 창고작업 조회, 창고오더, 빈 저장빈, 재고 위치, 납품 창고 진행, 검사로트, 사용결정, 검사결과 입력, 품질통지. Not for how / why / configuration questions (ask-consultant).Other plugins' skills for the same job