sap-activate-object
Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for reports/programs/function- group…
Diagnoses and reprocesses failing IDocs — the #1 AMS interface incident class — read-only over RFC (no GUI). `find` runs a bounded EDIDC search (status / message type / partner / date window / docnum), resolves status texts (TEDS2) and severity, and counts failures per
$ npx -y skills add sapdev-ai/sap-dev --skill sap-idoc --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sap-idocContext preview
The summary Claude sees to decide when to auto-load this skill.
Diagnoses and reprocesses failing IDocs — the #1 AMS interface incident class — read-only over RFC (no GUI). `find` runs a bounded EDIDC search (status / message type / partner / date window / docnum), resolves status texts (TEDS2) and severity, and counts failures per
name: sap-idoc description: | Diagnoses and reprocesses failing IDocs — the #1 AMS interface incident class — read-only over RFC (no GUI). `find` runs a bounded EDIDC search (status / message type / partner / date window / docnum), resolves status texts (TEDS2) and severity, and counts failures per status+message type. `explain <DOCNUM>` gives the full EDIDS status history for one IDoc — each step with its severity, message id, parameters and rendered text — plus an SLG1 cross-reference, so the root cause (e.g. "posting period not open", "sold-to party not maintained") is read straight off the log. `triage` clusters status-51/56 failures by root cause and hands custom-handler clusters to /sap-fix-incident. `reprocess` status-routes a DOCNUM / cluster / selection to RBDMANI2 / RBDAPP01 / RSEOUT00 via /sap-run-report (confirm-gated) then re-reads EDIDS to verify. Prerequisites: SAP profile via /sap-login (RFC); SAP NCo 3.1 (32-bit). No GUI session, no Z-object dependency for find/explain/triage. argument-hint: "find [--dir=1|2] [--status=51,56] [--mestyp=M] [--partner=P] [--from=YYYYMMDD] [--to=YYYYMMDD] [--max=N] | explain <DOCNUM> | triage [find-filters] | reprocess <DOCNUM|--status=..&--mestyp=..>"
You diagnose failing IDocs in bulk and reprocess them behind a confirm gate, read-only over RFC. The work is triage: decode hundreds of status-51/56 IDocs, cluster them by actual root cause, and reprocess a whole cluster with one gate.
Task: $ARGUMENTS
**You are read-only for `find` / `explain` / `triage`.** The only state change is `reprocess`, which executes an SAP-standard reprocess report through /sap-run-report behind an evidence-first confirm gate.
---
| File | Token / call | Purpose | |---|---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/safety_policy.md` | *(rule)* | **Rule 0 (highest priority)** — environment guard; enforced by Step 4 via `sap_safety_gate.ps1` | | `<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md` | *(rule)* | Mandatory operating rules — reads always allowed; reprocess is a SAP-supplied report, gated | | `<SKILL_DIR>/references/sap_idoc_read.ps1` | `-Action find\|explain [filters\|-Docnum]` | EDIDC find + EDIDS explain (RFC) | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_lib.ps1` / `sap_object_resolver.ps1` / `sap_artifact_lib.ps1` | dot-sourced by the engine | RFC connect, `Read-SapTableRows`, artifact index | | `/sap-run-report` | sub-skill | Executes RBDMANI2 / RBDAPP01 / RSEOUT00 (`reprocess`) — owns the execution gate | | `/sap-diagnose` | related | Triages interface incidents via its `smq` (queues) reader (Wave-0 T1-B); this skill is the IDoc half — invoke directly or as a follow-up | | `/sap-fix-incident` | sub-skill | Handoff for clusters whose handler is custom (Z/Y) code |
---
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))"Set `{RUN_TEMP}` via `Get-SapRunTemp`.
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_idoc_run.json" -Skill sap-idoc -ParamsJson "{}"---
| Mode | Args | Access | |---|---|---| | `find` | `[--dir=1\|2]` `[--status=..]` `[--mestyp=..]` `[--partner=..]` `[--from=..]` `[--to=..]` `[--max=500]` | **read-only** | | `explain` | `<DOCNUM>` | **read-only** | | `triage` | *find-filters* | **read-only** | | `reprocess` | `<DOCNUM>` or a bounded selection (`--status=` & `--mestyp=`/`--partner=`) | **gated write** |
`find`/`triage` require **at least one bound** (status / mestyp / partner / date / docnum) — the engine refuses an unbounded scan (`IDOC_SELECTION_UNBOUNDED`). `test send` / `config-check` / `pointers` and segment-level SDATA **decode** are **not implemented in v1** (see Scope). If asked, say so and continue.
---
RFC connection only — no GUI. A profile must be pinned (`/sap-login`). RFC unavailable → fail loud (`RFC_LOGON_FAILED`), manual pointer WE02/WE05; never a partial "no IDocs" answer.
---
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_idoc_read.ps1" -Action find -Status "51,56" -SharedDir "<SAP_DEV_CORE_SHARED_DIR>" -OutTsv "{RUN_TEMP}\idoc_list.tsv"Parse `IDOC:` rows + `COUNT:` digests + `STATUS: OK rows=<n|">Max"> capped=..`. Render the per-status × message-type counts first (the triage digest), then the list. `capped=Y` or `rows=">Max"` → tell the user it's "at least N — narrow the window or raise `--max`". `IDOC_SELECTION_UNBOUNDED` → ask for a bound and STOP.
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_idoc_read.ps1" -Action explain -Docnum "<DOCNUM>" -SharedDir "<SAP_DEV_CORE_SHARED_DIR>"
Parse `HEADER:` + ordered `STEP:` lines. The **last `sev=E` step** carries the root cause (`text=`). Present the dossier: header (message type, partners, current status) → status timeline → the error message(s). Then cross-reference SLG1 over the failure window via `/sap-diagnose --reader slg1` (standalone single-reader mode) for the application-log detail. `IDOC_NOT_FOUND` → report and STOP.
Run `find` with the given filters, then **cluster** the failures. Key each IDoc by `(MESTYP, STAMID, STAMNO)` — sample one `explain` per distinct message id to get the error text — and label each cluster with a root-cause hypothesis + count + the DOCNUM list. Write `{RUN_TEMP}\idoc_clusters.tsv`. A cluster whose `IDOCTP` is custom (`Z*`/`Y*`) gets a `/sap-fi
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.
Repo: sapdev-ai/sap-dev
Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for reports/programs/function- group…
Natural-language SAP API discovery over RFC (no GUI): turn a goal like "create a sales order" or "post a goods movement" into a ranked, trap-annotated,…
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), creates an ATC Run Series bound to…
Executes BDC (Batch Data Communication) sessions in SAP via RFC. Reads SHDB recording files from the bdc/ folder, connects via SAP NCo 3.1, calls…
Changes the package (TADIR-DEVCLASS) assignment of an SAP repository object via the "Object Directory Entry" dialog (Goto > Object Directory Entry). Routes by…
Validates ABAP source (report / program / FM / class / include) before deployment — one skill, dimension-dispatched: naming (variable conventions), type (DDIC…