/sap-project:sap-transport-copies <TR1[,TR2,...]> | --current [--target <SID>] [--desc "..."] [--release] [--import] | verify <TOC> --sources <TRs> | list [--user U] | cleanupfrom sap-project
Builds and verifies SAP Transport of Copies (ToC) headlessly over RFC with E071 union checking as a hard gate before release. Useful for QA testing workflows on ECC 6 and S/4HANA.
Ships in sap-project. 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 assemble a Transport of Copies from one or more source TRs and prove the E071 union is complete before release — never releasing a ToC whose object list doesn't cover its sources.
Task: $ARGUMENTS
| File | Token / call | Purpose |
|---|---|---|
<SAP_DEV_CORE_SHARED_DIR>/rules/safety_policy.md + <SAP_DEV_CORE_SHARED_DIR>/scripts/sap_safety_gate.ps1 | Rule 0 | Environment guard — Steps 3/4 runs -Action assert before the write |
<SKILL_DIR>/references/sap_transport_copies_rfc.ps1 | -Action create|include|verify|list|release | ToC build + E071 union + release (RFC + wrapper) |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_lib.ps1 | dot-sourced | NCo 3.1 connect/disconnect |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_object_resolver.ps1 | dot-sourced | Read-SapTableRows (E070/E071/E07T) |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_artifact_lib.ps1 | dot-sourced | ToC manifest + union-diff registration |
/sap-login · /sap-dev-init | sub-skills | Pinned profile · deploys the wrapper (this skill never does) |
/sap-se01 · /sap-stms | sub-skills | cleanup delete · --import (their own gates) |
--current resolves the session dev-default TR. --target falls back to userConfig
toc_default_target; blank + no default = hard ERROR (never guess a target).
Resolve work_dir + {RUN_TEMP} (canonical one-liner — sap_connection_lib.ps1 is dot-sourced
there — with Write-Output ('RUN_TEMP=' + (Get-SapRunTemp)) appended). {RUN_TEMP} = the
per-run scratch dir holding the log state file; mint it once here and reuse (re-minting breaks
the -Action end state-file lookup). Start logging (sap_log_helper.ps1,
state {RUN_TEMP}\sap_transport_copies_run.json). Pure RFC — no GUI session.
First token = a TR list or --current → build; else verify | list | cleanup. Resolve
--target (arg → toc_default_target → hard ERROR). Render the description (toc_desc_template,
placeholders {SOURCES}/{TARGET}/{YYYYMMDD}/{USER}, 60-char truncate).
Pinned RFC profile required (/sap-login) — missing → RFC_LOGON_FAILED, STOP. Pre-check each
source over RFC (E070 exists, type K/W, same system); enumerate tasks via STRKORR. Any miss →
hard ERROR naming the bad TR. Echo the build plan (sources, task counts, target, desc).
Rule 0 first (safety_policy.md; build writes: it creates a type-T request and copies object lists into it):
powershell -NoProfile -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_safety_gate.ps1" -Action assert -Skill sap-transport-copies —
SAFETY: ALLOW (0) proceed; TYPED_CONFIRM_REQUIRED (3) -> the operator types the shown
PROD <SID>/<CLIENT> token, re-run with -ConfirmationText '<their verbatim answer>', proceed only
on ALLOW_CONFIRMED; REFUSED class=<C> (1) / ERROR (2) -> STOP, end FAILED with
-ErrorClass <C>, relay the remediation lines — never bypass or work around it manually.
# create the type-T request
... sap_transport_copies_rfc.ps1 -Action create -Text "<desc>" -Target "<SID>" -SharedDir "..." # -> TOC:create toc=<TOC>
# copy each source's (and its tasks') object list in
... -Action include -Toc <TOC> -Sources "<TR1,TR2>"
# HARD GATE: E071 union == union of sources+tasks
... -Action verify -Toc <TOC> -Sources "<TR1,TR2>" -OutTsv "<dir>\toc_union_diff.tsv"
create uses TR_INSERT_REQUEST_WITH_TASKS (IV_TYPE='T') via the wrapper, parses the new TRKORR
from ES_REQUEST_HEADER, and re-reads E070 (TRFUNCTION='T') to confirm — else TOC_CREATE_FAILED.
include copies each source via TR_COPY_COMM (whole object list, scalar TRKORR→TRKORR) — run it
ONCE into a fresh ToC (TR_COPY_COMM appends, so re-including duplicates E071 rows). verify
set-diffs (PGMID,OBJECT,OBJ_NAME): MISSING>0 → report every missing object + TOC_UNION_MISMATCH
and STOP before release.
--release only, gated)Rule 0 first (safety_policy.md; --release only):
powershell -NoProfile -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_safety_gate.ps1" -Action assert -Skill sap-transport-copies —
SAFETY: ALLOW (0) proceed; TYPED_CONFIRM_REQUIRED (3) -> the operator types the shown
PROD <SID>/<CLIENT> token, re-run with -ConfirmationText '<their verbatim answer>', proceed only
on ALLOW_CONFIRMED; REFUSED class=<C> (1) / ERROR (2) -> STOP, end FAILED with
-ErrorClass <C>, relay the remediation lines — never bypass or work around it manually. The release confirm + E071 union gate below still apply after ALLOW/ALLOW_CONFIRMED.
Only when Step 3 verify = UNION_OK. Confirm gate:
I will release ToC
<TOC>targeting<SID>(source TRs stay open). This is a real transport release. Proceed? (yes/no)
Then -Action release -Toc <TOC> (TR_RELEASE_REQUEST via wrapper) → re-read E070 TRSTATUS='R'.
Verify not clean → TOC_RELEASE_BLOCKED. Skipped/failed verify blocks release (override:
--force + explicit yes). --import → delegate /sap-stms import <TOC> --to <SID> (its gates).
Write toc_manifest.tsv + toc_union_diff.tsv into the artifact dir
(Get-SapArtifactDir -ScopeKey TR_<TOC>); register (Register-SapArtifact -Kind toc_manifest /
toc_union_diff, coverage tri-state, verdict PASS/FAIL). Print
TOC: <TOC> target=<SID> sources=<k> union=<verdict> released=<y/n>.
-Action verify standalone on <TOC> + --sources.-Action list [-User <U>] [-IncludeReleased] → E070 TRFUNCTION='T' + E07T text +
live E071 object count per ToC.list the stale modifiable ToCs (older than --older-than, default 14d) →
per-request confirm → delegate /sap-se01 delete <TOC> (it re-confirms + verifies removal).
Refuses any request with TRFUNCTION≠'T'.Log end (SUCCESS/FAILED/SKIPPED + error_class): TOC_CREATE_FAILED / TOC_INCLUDE_FAILED /
TOC_UNION_MISMATCH / TOC_RELEASE_BLOCKED / TOC_TARGET_INVALID / RFC_LOGON_FAILED.
Z_GENERIC_RFC_WRAPPER_TBL is now a proven
write bridge, the ToC build runs entirely over RFC — no SE01 golden-screen recording, one code
path on ECC 6 + S/4HANA. Every CTS write FM (TR_INSERT_REQUEST_WITH_TASKS / TR_COPY_COMM /
TR_RELEASE_REQUEST) is FMODE-blank and reached through the wrapper (asXML PARAMETER-TABLE); the
RFC boundary's implicit COMMIT persists the write.create (made a real type-T request, E070-confirmed),
include (TR_COPY_COMM copied a 61-object list into the ToC), verify BOTH ways (empty ToC →
all-MISSING TOC_UNION_MISMATCH; populated ToC → union computed over source+tasks), and list
(with live per-ToC object counts). release is wired from its verified signature + the proven
wrapper write pattern but is not run autonomously (a transport release is irreversible) —
it executes under the Step 4 confirm gate. --import is fully delegated to /sap-stms.RDDM0001 on both but this skill needs no GUI. One code path.verify MISSING rather than a
silent pass. Source objects locked in another modifiable request cannot be copied (SAP
constraint) — prefer released sources, exactly the QA-drop use case.--force + explicit yes overrides). cleanup delete is delegated to
/sap-se01 (re-confirms), hard-refuses any TRFUNCTION≠'T' so a real workbench TR can never be
deleted from here. No SQL writes; mutations only via SAP CTS APIs. Read modes are unconfirmed
(house precedent).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub sapdev-ai/sap-dev --plugin sap-project40 skills in this plugin
/sap-auth-diagnoseDiagnoses "no authorization" failures deterministically over RFC and proposes the
exact PFCG fix — no more pasting an SU53 screenshot and hand-searching SUIM. Given
the failed authorization object (+ optional field values, read off SU53 / an ST22
dump / an application-log message), it evaluates the target user against the
AUTHORITATIVE runtime user buffer (`SUSR_USER_AUTH_FOR_OBJ_GET`, remote-enabled on
S/4HANA 1909 + ECC 6) with faithful AUTHORITY-CHECK semantics — one authorization
instance must satisfy every field, '*' matches anything, VON..BIS ranges honoured —
so the verdict can never disagree with the real kernel check the way a hand-rolled
AGR_1251/UST12 join can. It then classifies each failure (`MISSING_OBJECT` /
`MISSING_VALUE` / `BUFFER_STALE`) plus user-level `USER_LOCKED` / `USER_EXPIRED` /
`ROLE_EXPIRED`, names the closest role the user already has (with what it currently
grants), and writes a diagnosis TSV + fix-proposal + ready-to-send security request.
Read-only toward roles and users — the fix is always a proposal, never a write.
Prerequisites: SAP profile via /sap-login (RFC); SAP NCo 3.1 (32-bit). su53 (GUI
auto-scrape of the failed objects) and trace (STAUTHTRACE) modes are the documented
next phase — until then the operator supplies the failed object (Claude decodes a
pasted SU53 into the check input).
/sap-auth-requirementsDerives the SAP authorization requirements a custom development actually needs — the
deliverable Z-transactions never hand the security team. derive reads a program/FM source over
RFC, extracts the EXPLICIT AUTHORITY-CHECK surface plus the IMPLICIT one (CALL TRANSACTION ->
S_TCODE, SUBMIT -> S_PROGRAM, OPEN/DELETE DATASET/TRANSFER -> S_DATASET, CALL FUNCTION
DESTINATION -> S_RFC, DDIC table writes -> S_TABU_DIS incl. dynamic MODIFY (var)), traces each
value to its nearest literal, and validates every object/field/activity against the live
catalog (TOBJ / TACTZ) — emitting a required-auth matrix with per-row CONFIRMED / INFERRED
honesty plus an SU24 proposal draft. su24-audit lists Z/Y tcodes against USOBX_C / USOBT_C and
flags the real gap: NO_PROPOSAL / CHECK_DISABLED / ONLY_S_TCODE / PROPOSAL_PRESENT with a
staleness date. Pure RFC + offline extraction (no wrapper FM, no dev-init, runs on a bare
security profile); a static value that cannot be resolved is INFERRED, never silently
CONFIRMED. Class/interface source needs an SE24 GUI download (pass --source-files) or degrades
to COULD_NOT_CHECK. Owns the AUTHREQ_* finding namespace so it never double-reports with
/sap-review-abap's security dimension. v2: su24-maintain / su21-create (confirm-gated GUI).
Prerequisites: pinned /sap-login RFC profile; NCo 3.1 (32-bit).
/sap-bpManages SAP Business Partners via the BP transaction using SAP GUI Scripting.
Creates new partners (Organization type) or updates existing ones.
Existence check, partner creation with role/grouping selection, and
partner update with field values from a definition file.
Prerequisites: Active SAP GUI session (use /sap-login first).
/sap-change-historyAnswers "who changed this object / this data, and when" headlessly over RFC — no more
hand-joining CDHDR/CDPOS in SE16N and decoding cluster rows by eye. Resolves a business
token (PO, customer, vendor, material, sales order, G/L account, cost center …) to its
change-document class, scans CDHDR for the change headers, then pulls the fully DECODED
field-level rows (table · field · old → new, with DDIC field labels) via CHANGEDOCUMENT_READ
through the dev-init RFC wrapper — which sidesteps both the CDPOS 512-byte RFC_READ_TABLE
limit and ECC-6's CDPOS cluster storage in one call. Renders an auditable timeline + an
evidence-grade TSV, and (`--correlate`) time-orders the changes against transport imports
and /sap-diagnose evidence so "TR imported → field changed 5 min later" reads as one story.
Read-only; no writes, no SQL, no GUI. Also does `user <U>` / `window --from/--to` scans and
a `classes` map dump. Prerequisites: pinned RFC profile via /sap-login; the dev-init wrapper
Z_GENERIC_RFC_WRAPPER_TBL (via /sap-dev-init — never deployed by this skill); SAP NCo 3.1 (32-bit).
/sap-config-compareKeyed, row-level RFC diff of ONE customizing table or view across two saved
connection profiles (or two clients of one system) — the shareable answer to
"it works in QAS but not in DEV/PRD". Resolves the object on both sides, computes
the compared-field set (drops the technical client key for client-dependent tables,
excludes unreadable/too-wide columns honestly), guards against an unbounded read,
does a chunked offset-based read of each side, and runs the ONE shared keyed-diff
engine to classify every key LEFT_ONLY / RIGHT_ONLY / CHANGED. Claude then translates
the raw deltas into functional meaning using DDIC texts. Output is a diffable diff.tsv
+ summary, registered for /sap-evidence-pack. Read-only. Prerequisites: two profiles
via /sap-login (pinned LEFT + --against RIGHT); SAP NCo 3.1 (32-bit). No GUI, no
Z-object, no dev-init.
/sap-cutover-runbookTurn a 200-step cutover Excel into a crash-safe, evidence-stamped tracker — the cutover
lead stops doing 3am bookkeeping and answers "are we on the critical path?" instantly.
`init` parses the runbook into a draft ledger behind a mandatory human-curation gate;
`record` stamps start/done/fail events with machine-read RFC evidence (transport import
return code from TPALOG, job status from TBTCO, table row counts) — never a screenshot;
`report` renders the live board with per-phase progress, blockers, and the critical path
over the remaining dependency DAG; `checkpoint --health` composes an advisory go/no-go with
a tri-state system-health snapshot (dumps, update backlog, qRFC/tRFC queues, locks, running
imports). v1 is read-only toward SAP (reads only); `run` auto-execution is v2. Prerequisites:
/sap-login profiles (one per system named in the plan); SAP NCo 3.1 (32-bit). No Z-object,
no dev-init — safe to point at a PRD/QAS cutover target.
Other plugins' skills for the same job