/sap-gen-code:sap-docs-check <work-folder-path> [--dimension ddic|process|all] [<sap-logon-description>]from sap-gen-code
Validates an extracted SAP design spec (DDIC objects and process logic) before ABAP code generation, checking naming, data types, cross-references, and consistency.
Ships in sap-gen-code. 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.
You validate an extracted design spec before it feeds ABAP code generation
(/sap-gen-abap) and DDIC creation (/sap-se11). One skill, two dimensions:
ddic — DDIC object definitions (_domains.txt, _dataElements.txt,
_tables.txt) → check_result_ddic.txt.process — process-logic text (_process.txt) → check_result_process.txt.By default both run (whichever dimension's inputs are present). Pass
--dimension ddic or --dimension process to force one.
Task: $ARGUMENTS
| File | Token | Purpose |
|---|---|---|
<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md | (rule) | Mandatory operating rules |
<SAP_DEV_CORE_SHARED_DIR>/rules/ddic_excel_layout_rules.md | (rule) | DDIC Excel-spec authoring rules — naming-suffix consistency, primitive-type-as-DTEL trap, currency reference, column order. Cross-check extracted DDIC against these rules. |
<SAP_DEV_CORE_SHARED_DIR>/rules/language_independence_rules.md | (rule) | GUI-scripting language independence — RFC-only validator, but rule applies to downstream deploy skills (sap-se11) the validated spec feeds |
<SAP_DEV_CORE_SHARED_DIR>/rules/abap_code_quality_rules.md | (rule) | ABAP code-quality rules — DDIC + process-logic spec quality directly determines downstream ABAP quality; validation findings here surface ABAP-quality risk before code generation |
sap-dev-core/shared/tables/sap_object_naming_rules.tsv | (read by helper) | DDIC naming patterns (DDIC_DOMAIN / DDIC_DATAELEMENT / DDIC_TABLE). Custom override: {custom_url}\sap_object_naming_rules.tsv |
sap-dev-core/shared/tables/domain_datatypes.tsv | (read directly) | Valid SE11 domain data types + per-type length/decimals/sign rules — the authority for the DDIC dimension's data-type check (same table /sap-se11 validates against) |
sap-dev-core/shared/scripts/sap_check_object_name.ps1 | (helper) | Shared name validator invoked by the DDIC dimension |
sap-dev-core/shared/scripts/sap_rfc_lookup_struct.ps1 | (helper) | DDIC structure signature cache — populates _struct_signatures.txt for the live ReferenceTable / TABLE.FIELD checks (both dimensions; same cache /sap-gen-abap Step 1.5e uses) |
sap-dev-core/shared/scripts/sap_check_spec_refs.ps1 | (helper) | Offline (TABLE, FIELD) reference validator — appends Error/Warning rows to the result file (both dimensions' live-ref checks) |
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))"
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. Set {WORK_TEMP} = {work_dir}\temp and ensure it exists:
cmd /c if not exist "{WORK_TEMP}" mkdir "{WORK_TEMP}"
Set {RUN_TEMP} = the per-run scratch dir (Get-SapRunTemp mints + creates {work_dir}\temp\run_<id>):
powershell -NoProfile -ExecutionPolicy Bypass -Command ". '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_connection_lib.ps1'; Write-Output ('RUN_TEMP=' + (Get-SapRunTemp))"
Per the CLAUDE.md "Two-bucket temp model" write this skill's per-run scratch (the _run.json log state and the live-ref request files) under {RUN_TEMP}; keep {WORK_TEMP} (base) only for Get-SapCurrentSessionPath -WorkTemp.
Start a structured log run. State file: {RUN_TEMP}\sap_docs_check_run.json. Best-effort.
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_docs_check_run.json" -Skill sap-docs-check -ParamsJson "{\"work_folder\":\"<WORK_FOLDER>\",\"dimension\":\"<DIMENSION>\"}"
Extract from $ARGUMENTS:
--dimension ddic|process|all — optional; default all.Locate the input files in the work folder:
{doc_name}_domains.txt, {doc_name}_dataElements.txt, {doc_name}_tables.txt — DDIC dimension inputs.{doc_name}_process.txt — process dimension input ({doc_name}_PGM_summary.txt, and the DDIC files, are optional cross-reference inputs).Decide which dimensions to run:
--dimension | Runs |
|---|---|
all (default) | DDIC if any of _domains / _dataElements / _tables is present, AND Process if _process.txt is present. |
ddic | DDIC only. If no DDIC inputs are present, report and stop. |
process | Process only. If _process.txt is absent, report and stop. |
Echo DIMENSIONS_SELECTED: <ddic[,process]>. Then run each selected dimension's
section below, and finish with the combined Summary.
Run this section when ddic is selected. It validates DDIC object definitions
extracted from the design document before they are created in SAP via
/sap-se11, writing problems to {work_folder}/check_result_ddic.txt.
For each domain in _domains.txt:
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_check_object_name.ps1" -ObjectType DDIC_DOMAIN -ObjectName <NAME> -CustomUrl "{custom_url}"
Exit 1 → emit a Naming / Warning row in the result file with the
validator's stdout line. Exit 2 → log once and skip.Validate DATATYPE against
<SAP_DEV_CORE_SHARED_DIR>\tables\domain_datatypes.tsv — the SE11 truth
table /sap-se11 uses (columns: DATATYPE, DESCRIPTION, FIXED_LENGTH,
MAX_LENGTH, DECIMALS_ALLOWED, SIGN_ALLOWED, OBSOLETE, NOTES). Do
NOT validate against a hardcoded inline list — an inline list drifts (the
pre-2026-07 list omitted CUKY, so every currency-key domain false-failed
with "invalid data type" while rule D3b-2 simultaneously required a CUKY
reference).
Check:
OBSOLETE = X (PREC, VARC, DF16_SCL, DF34_SCL) → Warning: obsolete type, do not useFIXED_LENGTH / MAX_LENGTH (e.g. CUKY fixed 5, CHAR up to 1333, CURR up to 17)DECIMALS_ALLOWED = X (e.g. CURR needs DECIMALS)X, the row must have SIGN_ALLOWED = X (DEC, CURR, QUAN, FLTP)For each data element in _dataElements.txt:
-ObjectType DDIC_DATAELEMENT),
same invocation pattern as D1a. Violation → Naming / Warning.Offline mode (no SAP login):
DOMNAME exists in the _domains.txt listOnline mode (SAP login provided):
_domains.txt listTable: DD01L
Fields: DOMNAME
Options: DOMNAME = '{domain_name}' AND AS4LOCAL = 'A'
Use SAP.Functions COM object with 32-bit cscript:
Set oRFC = oFunctions.Add("RFC_READ_TABLE")
oRFC.Exports("QUERY_TABLE") = "DD01L"
oRFC.Exports("DELIMITER") = "|"
' Set FIELDS table
Set oFields = oRFC.Tables("FIELDS")
oFields.Rows.Add
oFields(oFields.RowCount, "FIELDNAME") = "DOMNAME"
' Set OPTIONS table
Set oOptions = oRFC.Tables("OPTIONS")
oOptions.Rows.Add
oOptions(oOptions.RowCount, "TEXT") = "DOMNAME = '" & sDomainName & "' AND AS4LOCAL = 'A'"
oRFC.Call
' Check DATA table row count
If oRFC.Tables("DATA").RowCount = 0 Then
' Domain does not exist
End If
If not found in SAP either → Error: "Domain does not exist"
For each table in _tables.txt:
-ObjectType DDIC_TABLE),
same invocation pattern as D1a. Violation → Naming / Warning.For each field's DATAELEMENT value:
Offline mode:
_dataElements.txt listOnline mode (SAP login provided):
_dataElements.txt listTable: DD04L
Fields: ROLLNAME
Options: ROLLNAME = '{dtel_name}' AND AS4LOCAL = 'A'
If not found → Error: "Data element does not exist"
A common spec mistake: customers write a primitive DDIC type (e.g. CHAR4,
DEC10) in the DATAELEMENT column. SE11 rejects these — only real data
elements work.
However, several primitive-shaped names ARE real SAP-shipped data
elements (e.g. NUMC1, NUMC2, NUMC3, NUMC4, DATS, TIMS, CHAR1).
A regex-only rule produces false positives for those.
Detection: regex against the DATAELEMENT value:
^(CHAR|NUMC|DATS|TIMS|DEC|CURR|QUAN|UNIT|RAW|RAWSTRING|STRING|SSTRING|FLTP|INT1|INT2|INT4|INT8|LANG|CLNT|ACCP|LCHR|LRAW|DF16_DEC|DF34_DEC)\d*$
If matched, BEFORE flagging: confirm the name is NOT a real DTEL.
Warning only, with a hint that the user
should verify the name is a real DTEL or wrap it in a project DE. Never
emit Error from this rule alone in offline mode (false-positive risk).RFC_READ_TABLE on DD04L with
ROLLNAME = '<X>' AND AS4LOCAL = 'A'. The result determines severity:
"DATAELEMENT='<X>' looks like a primitive DDIC type and does not exist as a data element. Wrap it in a project data element (e.g. ZHKDE_SEQ) using a domain (ZHKDM_NUMC3) of that primitive type."In short: rule D3b-1 is a hint to a missing-DTEL error, never a standalone fail. If the name resolves to a real DTEL via DD04L, the regex is wrong and we say nothing.
For a field of CURR type, SAP DDIC requires BOTH ReferenceTable AND
Ref.Field to be populated — including the self-referencing case where the
WAERK column lives in the same table being defined. SE11 on modern S/4HANA
(verified on 1909 and later) refuses to activate a CURR column whose
ReferenceTable is blank, even if Ref.Field is set.
NOTE: an older NetWeaver-era convention permitted leaving ReferenceTable
blank when the reference was to the same table. That convention is
deprecated; do not apply it on S/4HANA. (This rule was inverted on
2026-05-09 after a real deployment surfaced the contradiction.)
Detection: field underlying type is CURR (lookup via _dataElements.txt
→ _domains.txt → DATATYPE) AND (ReferenceTable is blank OR Ref.Field
is blank).
If matched → Error: "CURR field '<F>' is missing ReferenceTable or Ref.Field. SE11 requires both to be populated, including for self-referencing currency fields. Set ReferenceTable=<the table containing the WAERK column> and Ref.Field=<the WAERK column name>."
Walk every data element in _dataElements.txt and look up its DOMNAME in
_domains.txt. Catches the most common typo: a missing/extra digit on the
suffix (e.g. DTEL points at ZHKDM_KEY13 but the spec only defines
ZHKDM_KEY131).
Detection: DTEL.DOMNAME is in Z* / Y* namespace AND not present in
_domains.txt AND (offline) or (not found in DD01L online).
If matched → Error: "DTEL '<DE>' points at DOMNAME='<DOM>' which is not in _domains.txt and not a standard SAP domain. Likely typo — _domains.txt has these similar names: <fuzzy-match-suggestions>". Suggest the closest names by Levenshtein distance ≤ 2.
Detect when domain/DTEL/table names in the same spec use different suffix
conventions (e.g. some end in 13, some in 131). Group all Z-namespace
names by their leading 3 chars (project sub-prefix) and inspect the
trailing numeric segment. If two distinct trailing segments appear within
the same spec → flag as Warning: "Naming convention drift: spec uses both '<suffix-A>' and '<suffix-B>' on Z-namespace objects. Pick one and apply consistently."
For every field in _tables.txt with a non-blank ReferenceTable that
is a STANDARD SAP table (not in the spec's own _tables.txt), verify
via RFC that the table exists AND its Ref.Field exists on it. Catches:
T100 vs T001).T001-WAERK where the actual currency field
might be T001-WAERS).Self-referencing CURR/QUAN fields (ReferenceTable = the same Z* table
defined in this spec) are already covered by rule D3b-2 and the spec's
own field list — no live lookup needed for those.
Detection: walk _tables.txt. For each row with ReferenceTable
matching a standard table (uppercase, doesn't appear in spec's
_tables.txt):
<ReferenceTable>\t<Ref.Field>\tTable <T> field <F> ReferenceTable\tCross-reference
into {RUN_TEMP}\spec_refs_request.txt.<ReferenceTable> names into {RUN_TEMP}\struct_request.txt.<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_rfc_lookup_struct.ps1
to populate {work_folder}\_struct_signatures.txt (same cache
/sap-gen-abap Step 1.5e uses — gen-abap will reuse what this
check populated).<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_check_spec_refs.ps1
to validate. The validator appends rows to
{work_folder}/check_result_ddic.txt in the same TSV format the
rest of this dimension uses.If matched → Error: "ReferenceTable <T>.<F> referenced by field <X> does not exist (per live DDIF_FIELDINFO_GET)." — fix advice
points at SE11 lookup for the correct table+field.
When RFC is unavailable, downgrade to Warning with hint to verify manually post-deploy.
Write only problems (errors and warnings) to {work_folder}/check_result_ddic.txt in TAB-separated format (so the user can open it in Excel to review and update):
No Object Type Object Name Check Description Severity Status
1 Domain ZHKDM_AMT9 DataType CURR type should have DECIMALS defined Warning Open
2 Table ZHKFIXEDVALS9 Field Data element NUMC3 not in design document and not verified in SAP Warning Open
3 DataElement ZHKDE_KEY1 Domain DOMNAME='ZHKDM_KEY13' not in _domains.txt. Closest match: ZHKDM_KEY131 (typo?) Error Open
4 Table ZHKFIXEDVALS Field DATAELEMENT='NUMC3' looks like a primitive DDIC type, not a data element. Wrap in ZHKDE_SEQ. Error Open
Columns:
Domain, DataElement, TableName, DataType, Domain, Field, Key, Naming)Error (blocks SE11 creation) or Warning (proceeds with assumption)Open (user updates to Fixed or Ignored after review)Do NOT include items that passed checks — only record problems.
Run this section when process is selected. It validates the process logic
extracted from a design document before it is used for ABAP code generation by
/sap-gen-abap, writing problems to {work_folder}/check_result_process.txt.
Required input: {doc_name}_process.txt. Optional cross-reference inputs:
{doc_name}_PGM_summary.txt, _domains.txt, _dataElements.txt, _tables.txt.
Scan the process text for issues in these categories:
Write the P1 and P2 findings to {work_folder}/check_result_process.txt in TAB-separated format:
No Category Location Description Severity Status
1 Unclear PROCESSING FLOW 3.2 Processing step "データ更新" has no concrete logic Warning Open
2 Inconsistency FIELD DEFINITIONS / VALIDATION RULES Field "品目コード" is mandatory but validation rule 3 treats it as optional Error Open
3 Missing FILE MAPPING Field "旧品目コード" referenced in validation rule 6 but not in field list Error Open
Columns:
Unclear, Missing, InconsistencyError (blocks code generation) or Warning (can proceed with assumptions)Open (user updates to Fixed or Ignored after review)Write this file BEFORE running P4 — the RFC validator there APPENDS to it and numbers its findings after the existing rows. (Pre-2026-07 the RFC step ran before this one, so writing the base results here overwrote its appended findings.)
Why: the spec often references SAP tables and fields directly — in
_file_mapping_in.txt (SAP_TABLE.SAP_FIELD columns), in validation rules
("file BUKRS = T001-BUKRS"), or in the process flow. A typo there
(MARA.MATNR2, T001.BUKRS_X) doesn't fail the text checks above but
will surface either as a generated SELECT syntax error at SE38 upload
or as a wrong-data bug at runtime. This step catches them offline.
Skip this step if no _file_mapping_in.txt / _file_mapping_out.txt
is present AND no spec section references SAP standard tables, OR if
SAP RFC connection is not configured.
Walk the work folder for:
_file_mapping_in.txt — TSV with columns including SAP_TABLE and
SAP_FIELD. For each row, emit <SAP_TABLE>\t<SAP_FIELD>\tFILE_MAPPING_IN row <N>\tCross-reference._file_mapping_out.txt — same shape._process.txt — grep for MARA.<FIELD>, T001.<FIELD>, etc., or
any <UPPER>.<UPPER> pattern in validation-rule sections. Be
conservative; emit only when both sides match an identifier shape.Filter:
<TABLE>.<FIELD> where <TABLE> starts with Z or Y AND
the table is defined in the spec's own _tables.txt (it's a Z-object
being created in this same run; no live SAP cache hit expected).Write to {RUN_TEMP}\spec_refs_request.txt (one row per pair, tab-separated
— per-run scratch, see the Step 0 two-bucket rule).
Skip the rest of P4 if the request file is empty.
Build a deduplicated list of unique <TABLE> names from the request file.
Write them to {RUN_TEMP}\struct_request.txt (one per line).
Invoke sap_rfc_lookup_struct.ps1 (the same lookup /sap-gen-abap Step
1.5e uses). Token-replace per the FM-lookup pattern (see
sap-gen-abap SKILL.md Step 1.5c/1.5e for the canonical token list).
Output goes to {work_folder}\_struct_signatures.txt so a subsequent
/sap-gen-abap run picks up the same cache without re-fetching.
If RFC fails / is unconfigured, the cache file is written empty/partial
with UNAVAILABLE marker rows. The validator below downgrades affected
checks to Warning automatically — the step is fail-soft.
Template at <SAP_DEV_CORE_SHARED_DIR>\scripts\sap_check_spec_refs.ps1.
Count existing rows in {work_folder}/check_result_process.txt (header
not included — the base file written in P3) to compute STARTING_NO
so the new findings continue the sequence. Pass that, the request file,
the cache file, and the result file path:
$content = Get-Content '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_check_spec_refs.ps1' -Raw
$content = $content.Replace('%%REQUEST_FILE%%', '{RUN_TEMP}\spec_refs_request.txt')
$content = $content.Replace('%%STRUCT_SIG_FILE%%', '{work_folder}\_struct_signatures.txt')
$content = $content.Replace('%%RESULT_FILE%%', '{work_folder}\check_result_process.txt')
$content = $content.Replace('%%STARTING_NO%%', 'THE_NEXT_NO')
Set-Content '{RUN_TEMP}\sap_check_spec_refs_run.ps1' $content -Encoding UTF8
Run:
powershell -ExecutionPolicy Bypass -File "{RUN_TEMP}\sap_check_spec_refs_run.ps1"
The validator appends rows in the same No\tCategory\tLocation\tDescription\tSeverity\tStatus
format the rest of this dimension uses. New error/warning classes added by P4:
| Reason text | Severity |
|---|---|
Table <T> does not exist on the target SAP system (per live RFC). | Error |
Field <F> does not exist on table <T> (per live DDIF_FIELDINFO_GET). | Error |
Cannot validate <T>.<F> — RFC unavailable when the signature cache was populated. | Warning |
Clean up:
cmd /c del {RUN_TEMP}\sap_check_spec_refs_run.ps1
cmd /c del {RUN_TEMP}\spec_refs_request.txt
cmd /c del {RUN_TEMP}\struct_request.txt
Report to the user, covering only the dimensions that ran:
{work_folder}/check_result_ddic.txt.{work_folder}/check_result_process.txt./sap-docs-check./sap-se11 to create the DDIC objects in SAP./sap-gen-abap {work_folder}/{doc_name}_process.txt once the spec is clean.Log the run-end record. Best-effort.
On success:
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action end -StateFile "{RUN_TEMP}\sap_docs_check_run.json" -Status SUCCESS -ExitCode 0
On failure:
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action end -StateFile "{RUN_TEMP}\sap_docs_check_run.json" -Status FAILED -ExitCode 1 -ErrorClass <CLASS> -ErrorMsg "<short>"
Suggested <CLASS>: DDIC_CHECK_FAILED, PROCESS_CHECK_FAILED, INPUT_NOT_FOUND.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sap, abap, ddic, design-spec-validation, code-generation-prep
npx claudepluginhub sapdev-ai/sap-dev --plugin sap-gen-code12 skills in this plugin
/sap-docs-convertApplies customer-specific normalisation rules to the extracted spec files
in a work folder. Reads `spec_conversion_rules.tsv` (default at
sap-dev-core/shared/tables/, override at {custom_url}/spec_conversion_rules.tsv)
and rewrites the affected `_*.txt` files in place.
Three rule categories:
* field_rename — legacy field name → canonical name
* type_rename — legacy DDIC type token → canonical token
* flag_mapping — legacy flag value → one or more KEY=VALUE pairs
Plus optional schema migration (legacy customer YAML/TSV layout → Customer
Brief layout).
Input: work folder containing the extracted `_*.txt` files (output of /sap-docs-extract).
Output: same files rewritten in place; a `.pre-convert/` snapshot is taken first.
This skill is OPTIONAL — projects already authoring specs in Customer Brief
format can skip it entirely.
/sap-docs-estimateTurn the spec pipeline's structural signals into a transparent, falsifiable effort estimate
— no gut feel. `score` reads a spec work folder's `_*.txt` DDIC/process/interface counts and
`/sap-docs-check` ambiguity rows, applies published weights, and maps the complexity class to
a WIDE effort band with named drivers and an assumptions register. `--batch` rolls up a
portfolio of specs; `--ledger` bands a `/sap-cc-triage` migration wave by (tier x object
type). `record-actuals` appends real hours to an append-only ledger so every estimate becomes
measurable; `calibrate` (v1.5) tightens the multipliers once enough pairs accrue. Pure-local,
read-only, no SAP access in v1 (a `--live-delta` brownfield-credit RFC mode is v2). Every
report is labelled UNCALIBRATED so a wide band can never masquerade as a commitment.
/sap-docs-extractReads a SAP design document (Excel .xlsx, Word .docx, PDF) — or an existing work
folder / a _raw.txt file — and extracts structured information into separate text
files by type: program summary, domains, data elements, tables, error messages,
text elements, and process logic. From a document it creates a fresh work folder,
dumps {doc_name}_raw.txt, then structures; existing {doc_name}_*.txt files are
silently overwritten. Optionally chain /sap-docs-convert afterwards for
customer-specific normalisation, then /sap-docs-check and /sap-gen-abap. Legacy
binary .doc is not supported (save as .docx first); an unsupported format aborts
with "ERROR: Unsupported file format."
/sap-docs-layoutEdits the structural layout of a SAP design spec template (.xlsx) by writing
to the workbook's `(Meta) Layout` sheet. Lets customers customize sheet
names, column orders, and output mappings without editing Markdown rules or
skill code. The meta sheet becomes the per-workbook source of truth that
`/sap-docs-extract` reads on its next run.
Operations:
inspect Print the current layout in human-readable form.
bootstrap Copy a `(Meta) Layout` sheet from the canonical
`spec_template.xlsx` into a workbook that doesn't have one.
add-column Add a column to a section. Updates xlsx + meta in one step.
rename-sheet Rename a sheet and update meta so the parser still finds it.
validate Reconcile the meta sheet against actual workbook structure.
Input: workbook path + operation + op-specific args.
Output: in-place modifications to the .xlsx file. A timestamped backup is
written next to the original before any write operation.
/sap-gen-abapGenerates 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.
/sap-gen-abap-unitGenerates ABAP Unit tests for an EXISTING object (global class / function module
/ report) and closes the loop on a live system: pre-check the generated test,
deploy, activate, run with coverage, read failures, fix, repeat until green
(bounded). Reads the active source, builds a call/data map, and runs a SEAM
ANALYSIS that classifies every DB read and external call into a doubling strategy
(OSQL test double for SELECTs, ABAP test double for injected dependencies, or
flags untestable-without-refactor), then emits a test class honest about what it
could and could not cover. Pairs with /sap-run-abap-unit (which runs the tests).
Deploy is GUI (/sap-se24 --test-source CCAU for a class, /sap-se38 for a report
test) and gated — asks before writing anything (Rule 2).
Prerequisites: pinned /sap-login connection; active GUI session for class download
+ deploy + run; SAP NCo 3.1 for RFC source read.