/sap-project:sap-sm30 show <VIEW|TABLE> [--where "F=V,..."] | add <VIEW> --data rows.tsv | update <VIEW> (--data rows.tsv | --key K=V --set F=V)from sap-project
Maintains SAP standard customizing views/tables via SM30. Offers show/add/update with DDIC resolution, preview diff, and customizing transport request integration. Useful for functional consultants.
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 maintain a standard customizing view: show resolves + pre-reads (read-only); add/update
drive SM30's generated dialog behind a preview diff + confirm gate + Customizing TR, verified by
an RFC re-read. v1 is one-step views only; delete is refused.
Task: $ARGUMENTS
| File | Token / call | Purpose |
|---|---|---|
<SKILL_DIR>/references/sap_sm30_read.ps1 | -Action resolve|preread | RFC resolve + pre-read + verify |
<SKILL_DIR>/references/sap_sm30_maintain.vbs | GUI (%%SESSION_PATH%%·%%ATTACH_LIB_VBS%%·%%SESSION_LOCK_VBS%%·%%PARAMS_FILE%%·%%OUTPUT_FILE%%) | Generic table-control driver (add / update) — recorded + live-verified on S4D (S/4HANA 1909) 2026-07-12 |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_lib.ps1 · sap_attach_lib.vbs · sap_session_lock.vbs | libs | RFC + Tier-3 attach + write lock |
<SAP_DEV_CORE_SHARED_DIR>/rules/safety_policy.md + <SAP_DEV_CORE_SHARED_DIR>/scripts/sap_safety_gate.ps1 | Rule 0 | Environment guard — Step 4 runs -Action assert before the confirm gate on add/update |
/sap-transport-request (--type customizing) · /sap-doctor · /sap-se16n | sub-skills | Customizing TR / srv+auth preflight / wide-view export |
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_sm30_run.json). Pinned RFC profile; GUI session for add/update.
show (read) | add | update (write). delete -> refuse SM30_DELETE_UNSUPPORTED (pointer to
manual SM30). Validate the --data TSV header against the DD27S field list early.
... sap_sm30_read.ps1 -Action resolve -Object <V> -OutDir "{RUN_TEMP}\sm30"
SM30INFO: lines (kind / maint_type / function_group / primary_table / fields / keys / auth_group
/ client_category) + SM30: VERDICT. Refuse loud on: no TVDIR entry (SM30_NO_MAINT_DIALOG),
maint_type=2 (SM30_TWO_STEP_UNSUPPORTED, v1), client not modifiable (SM30_CLIENT_NOT_MODIFIABLE
from T000). show -> also preread (below) then STOP.
sap_sm30_read.ps1 -Action preread snapshots the current rows (projected to the view's base
fields, --where-filtered). Build the change set from the --data TSV / --set; render the
preview diff (ADD n / CHANGE m, old->new per field). Reject an add whose key exists or an update
whose key is absent — no silent upsert.
Rule 0 first (safety_policy.md; write modes only — show skips it):
powershell -NoProfile -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_safety_gate.ps1" -Action assert -Skill sap-sm30 —
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 drive SM30 manually instead. The
skill-level confirm below still applies after an ALLOW/ALLOW_CONFIRMED (Rule 0 adds to, never
replaces, the owning skill's gate).
CONFIRM (yes/no on dev/QA; typed MAINTAIN <VIEW> ON <SID>/<CLIENT> when T000 marks the client
production-grade). On no -> SKIPPED. Resolve the Customizing TR via /sap-transport-request --type customizing (never prompt, never a Workbench TR; a blank TR at the KO008 popup aborts).
The generic table-control driver sap_sm30_maintain.vbs is recorded + live-verified on S4D
(S/4HANA 1909) 2026-07-12 (no longer NEEDS_RECORDING). Its per-run parameters ride a PARAMS_FILE
(KEY=VALUE: VIEW / MODE=add|update / DATA_FILE / TRKORR), so the run-time VBS carries only the
Tier-3 + IO tokens. DATA_FILE = the TSV whose header row = DD27S FIELDNAMEs (key fields first, in
key order) and each later row = one entry; MANDT/CLIENT are auto and skipped. Substitute the attach +
lock + IO tokens, bake the resolved session path (parallel-safe attach contract), write UTF-16 LE,
and run via 32-bit cscript:
$shared = '<SAP_DEV_CORE_SHARED_DIR>\scripts'
. "$shared\sap_connection_lib.ps1"
# BAKE the path into %%SESSION_PATH%% (attach Strategy 1) rather than exporting
# $env:SAPDEV_SESSION_PATH here: this generator is a SEPARATE process from the one
# that runs cscript, so the env var would already be gone and the attach lib would
# silently fall through to its sole-connection default (2026-08-06).
$sessionPath = Get-SapCurrentSessionPath -WorkTemp '{WORK_TEMP}' # or the --session value
# PARAMS_FILE lines: VIEW=<name> MODE=add|update DATA_FILE=<abs tsv> TRKORR=<customizing-TR-or-empty>
$vbs = [IO.File]::ReadAllText('<SKILL_DIR>\references\sap_sm30_maintain.vbs', [Text.Encoding]::UTF8)
$vbs = $vbs.Replace('%%ATTACH_LIB_VBS%%', "$shared\sap_attach_lib.vbs")
$vbs = $vbs.Replace('%%SESSION_LOCK_VBS%%', "$shared\sap_session_lock.vbs")
$vbs = $vbs.Replace('%%SESSION_PATH%%', $sessionPath)
$vbs = $vbs.Replace('%%PARAMS_FILE%%', '{RUN_TEMP}\sm30_params.txt')
$vbs = $vbs.Replace('%%OUTPUT_FILE%%', '{RUN_TEMP}\sm30_result.json')
[IO.File]::WriteAllText('{RUN_TEMP}\sm30_maintain_run.vbs', $vbs, [System.Text.UnicodeEncoding]::new($false, $true))
Declare the GUI target in the SAME block as cscript — the attach lib reads
SAPDEV_EXPECT_SYSTEM/_CLIENT from the process environment, so customizing rows
can never be written to a system other than the one the RFC leg resolved:
. '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_connection_lib.ps1'
Set-SapGuiTargetExpectation -WorkTemp '{WORK_TEMP}' | Out-Null
& 'C:\Windows\SysWOW64\cscript.exe' //NoLogo "{RUN_TEMP}\sm30_maintain_run.vbs"
Generic table-control driver: the overview belongs to the generated program SAPL, so it
discovers the sole GuiTableControl by type (TryLockSession around the write) and maps columns by
the DD27S field names embedded in cell IDs (txt/ctxt<VIEW>-<FIELD>[col,row]) — never hardcoded; it
pages the vertical scrollbar past VisibleRowCount. add = New Entries (tbar[1]/btn[5]) + fill +
Save; update = Position (btnVIM_POSI_PUSH -> SAPLSPO4 0300) per row, fill the key cell(s) in key
order, Continue, overwrite the non-key cells, Save. The Customizing-TR (KO008-TRKORR) popup is
guarded after Save (filled from TRKORR, or SM30_TR_REQUIRED on empty — never blind-Enter'd). Parse
stdout SM30: view=<v> mode=<m> rows=<n> + STATUS: <status> and read {RUN_TEMP}\sm30_result.json
(status, rows_written, messages[]): STATUS: NEEDS_RECORDING (with SM30: NEEDS_RECORDING step=<label>) = the live screen diverged from the captured contract -> re-record via /sap-gui-probe --record; SM30_TR_REQUIRED -> resolve a Customizing TR and retry; SM30_KEY_NOT_FOUND -> the update
key is absent (no upsert); SM30_SAVE_FAILED -> the save sbar returned E/A. Then verify via a
sap_sm30_read.ps1 -Action preread re-read filtered (-Where) to the written keys — verdict from the
re-read ONLY; any delta -> SM30_VERIFY_MISMATCH.
Register-SapArtifact (kind preview_diff / verify_read, scope R3TR VIEW <name>, verdict) so
/sap-evidence-pack proves who changed what with approval.
Log end. Error classes: SM30_NO_MAINT_DIALOG, SM30_TWO_STEP_UNSUPPORTED, SM30_CLUSTER_UNSUPPORTED,
SM30_CLIENT_NOT_MODIFIABLE, SM30_DELETE_UNSUPPORTED, SM30_VERIFY_MISMATCH, SM30_TR_REQUIRED,
SM30_KEY_NOT_FOUND, SM30_SAVE_FAILED, NEEDS_RECORDING,
PREREAD_UNFILTERED; reused RFC_LOGON_FAILED / GUI_TIMEOUT / TR_NOT_MODIFIABLE.
resolve V_T001W returned
the full DDIC shape (maint_type=2, function_group=0ORG, maint_tcode=OX10, primary_table=T001W,
22 fields, keys MANDT/WERKS, auth_group MCOR, client_category T) and correctly verdicted
SM30_TWO_STEP_UNSUPPORTED; preread V_T001W --where WERKS=1710 read plant 1710 ("JIT Plant")
projected to the view's base fields; a table with no TVDIR entry -> SM30_NO_MAINT_DIALOG. EC2
(ECC 6) was probed in-plan (all 15 objects + SAPMSVMA identical; TDDAT is POOL there, read narrow)
but unreachable at build time; one RFC code path./sap-gui-probe — now recorded + live-verified on S4D
(S/4HANA 1909) 2026-07-12 (capture bullet below), never a guessed dynpro. Depends on the shipped
/sap-transport-request --type customizing extension (verified present).sap_sm30_maintain.vbs
was captured end-to-end against the purpose-built one-step scratch view ZSAPDEV_SM30 (function
group ZSMDEVAI, overview dynpro 0010): New Entries (tbar[1]/btn[5]) and Position+edit
(btnVIM_POSI_PUSH -> SAPLSPO4 0300) both drove the write and were RFC-verified (row REC001
created, then its text updated); the assembled driver was then smoke-tested end-to-end on the same
view (add + update of a second key REC002, both RFC-confirmed). Position-verdict finding: SM30
does not reliably emit an S sbar after Position (One entry chosen shows only when narrowing to a
single row; a scroll-to-key on a multi-row view leaves the sbar empty), so the driver confirms a
position by the popup dismissing AND row 0's key matching the requested key — never by the sbar
message. The generic driver discovers the sole GuiTableControl and maps
columns by the DD27S FIELDNAMEs in the cell IDs (never a hardcoded column), and pages the vertical
scrollbar past VisibleRowCount. The Customizing-TR (KO008-TRKORR) popup did NOT fire on S4D/100
(standard recording routine; the client did not prompt) so it is guarded-but-not-exercised — the
driver fills it from the resolved TR or reports SM30_TR_REQUIRED on an empty TR, and never
blind-Enters it. Golden-screen baseline sap_sm30_maintain.screens.json (sm30_initial /
sm30_overview / sm30_position_popup).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sap-sm30, sap-customizing, view-maintenance, sap-abap, sap-functional
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