/sap-project:sap-config-compare <TABLE|VIEW> --against <profile-hint> [--where "F=V,F=A..B"] [--fields F1,F2] [--keys-only] [--max-rows N]from sap-project
Keyed row-level RFC diff of one SAP customizing table/view across two connection profiles — answers why config works in one system but not another.
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 answer "why does this work there but not here?" with a keyed, row-level diff of one customizing table/view between two systems (or two clients), read-only over RFC. SCU0/SCMP are GUI-bound and unshareable; two SE16 windows miss rows. This does the join deterministically and narrates the deltas in functional language.
Task: $ARGUMENTS
You are read-only against BOTH systems. No confirm gates, no TR, no GUI. All
output stays local under {work_dir}.
| File | Token / call | Purpose |
|---|---|---|
<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md | (rule) | Mandatory operating rules — read-only here |
<SKILL_DIR>/references/sap_config_compare_read.ps1 | -Object -Against [-Where -Options -Fields -KeysOnly -MaxRows] -OutDir | Dual-connect, object resolution, metadata, unbounded guard, chunked offset read |
<SKILL_DIR>/references/sap_config_compare_diff.ps1 | -LeftTsv -RightTsv -MetaJson -OutDir | Offline keyed diff (dot-sources the shared engine) |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_keyed_diff_lib.ps1 | %%KEYED_DIFF_LIB_PS1%% | The ONE keyed row-diff engine (shared with /sap-se16n snapshot diff, /sap-compare) |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_connection_lib.ps1 / sap_rfc_lib.ps1 / sap_dpapi.ps1 | dot-sourced / subprocess | Profile resolution, RFC connect, RIGHT-password decrypt |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_artifact_lib.ps1 | Step 9 | Artifact index for /sap-evidence-pack |
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. {OUT} = Get-SapArtifactDir -ScopeKey CFG_<OBJECT> -Skill sap-config-compare (manual scope key — the compared object is
a TABL/VIEW).
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_config_compare_run.json" -Skill sap-config-compare -ParamsJson "{}"
Positional <OBJECT> (table or view, uppercased). Required --against <hint> (a
/sap-login profile hint — <SID>, <SID>/<CLIENT>, description substring). Flags:
--where "F=V,F2=A..B" (F=V → EQ, F=A..B → BETWEEN, comma = AND), --options "<raw OPTIONS>" (escape hatch; read-only predicate only — the engine refuses write
keywords), --fields F1,F2 (restrict compared columns; keys always included),
--keys-only (diff key existence only; cap ×5), --max-rows N (default 10000,
ceiling 100000). --client NNN (cross-client sugar — resolves <LEFT_SID>/NNN) and
preset <name> are v1.5/v2 (not implemented) → say so and STOP.
LEFT = pinned profile; RIGHT = --against. The engine self-connects LEFT and
resolves+connects RIGHT (DPAPI decrypt in-process). Identity per side is read LIVE
(RFC_SYSTEM_INFO → SID, USR02 MANDT → logon client) — the profile store can be stale.
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_config_compare_read.ps1" -Object "<OBJECT>" -Against "<hint>" -SharedDir "<SAP_DEV_CORE_SHARED_DIR>" -OutDir "{OUT}"
Add -Where, -Options, -Fields, -KeysOnly, -MaxRows as parsed. Parse:
IDENT: side=<L|R> sid=.. client=.. release=..
OBJECT: kind=<TABLE|VIEW_DB|VIEW_MAINT_BASE> read_target=<tbl> note="<..>"
FIELDS: keys=.. compared=.. excluded=.. only_left=.. only_right=..
READ: side=<L|R> rows=.. capped=<Y|N> groups=..
STATUS: OK | CFG_OBJECT_NOT_FOUND | CFG_NO_COMMON_KEY | CFG_UNBOUNDED_READ | CFG_SAME_IDENTITY | RFC_LOGON_FAILED | RFC_ERROR
Refusals (fail loud, STOP, log the class):
CFG_SAME_IDENTITY — LEFT and RIGHT are the same SID+client. Nothing to compare.CFG_OBJECT_NOT_FOUND object=.. side=<left|right|both> — name which side(s) miss it.CFG_NO_COMMON_KEY — no shared key column (or a single-client-key table → v1.5).CFG_UNBOUNDED_READ .. suggest_filter=<field> — over --max-rows with no filter;
re-run with --where <field>=.. (echo the suggestion). Never a partial read.RFC_LOGON_FAILED (ambiguous/unknown --against, RIGHT unreachable, DPAPI) — STOP.The engine writes left.tsv, right.tsv, meta.json, texts.tsv into {OUT}.
kind=VIEW_MAINT_BASE means a maintenance view was decomposed to its primary base
table (RFC_READ_TABLE cannot read a maintenance view) — the note/scope_notes
list the base tables NOT diffed; carry that caveat into the summary.
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_config_compare_diff.ps1" -LeftTsv "{OUT}\left.tsv" -RightTsv "{OUT}\right.tsv" -MetaJson "{OUT}\meta.json" -OutDir "{OUT}"
Parse KEYED_DIFF:, DIFF: left_only=.. right_only=.. changed=.. identical=.. gaps=..,
VERDICT: IDENTICAL | DIFFERENT | IDENTICAL_WITH_GAPS | DIFFERENT_WITH_GAPS. The
_WITH_GAPS verdict is set whenever a column was excluded (STRG/RSTR/too-wide),
present on one side only (release skew), a maintenance-view base table was not diffed,
or a row cap was hit — never rendered as a clean IDENTICAL.
Write summary.md into {OUT} from diff.tsv + texts.tsv + meta.json. Grounding
rule: every stated delta traces to a diff.tsv row. Sections:
SID/client (release) vs RIGHT, the filter._WITH_GAPS), with counts.only_left/right_columns.diff.tsv row_class is LEFT_ONLY = pinned side, RIGHT_ONLY =
--against side, CHANGED = same key, differing value.Register diff.tsv (kind config-diff, -Rows, Coverage from gaps, Verdict from
Step 3), summary.md (kind summary), meta.json (kind config-meta) via
Register-SapArtifact under scope CFG_<OBJECT>. Echo:
CONFIG_COMPARE: object=<o> left=<sid/cl> right=<sid/cl> left_only=<n> right_only=<n> changed=<n> verdict=<..>
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action end -StateFile "{RUN_TEMP}\sap_config_compare_run.json" -Status SUCCESS -ExitCode 0
A refusal ends -Status SKIPPED -ErrorClass <CFG_...>; an infra failure FAILED
with RFC_LOGON_FAILED / RFC_ERROR.
--where, --options, --fields,
--keys-only, --max-rows. Chunked offset-based read (robust against in-data
delimiters), numeric normalization by DDIC DECIMALS (so 1.234,56 == 1,234.56),
MANDT dropped for client-dependent tables and kept for client-independent ones.meta.json + summary and force
a *_WITH_GAPS verdict — never a false IDENTICAL. An unbounded read is refused, never
silently capped.sap_keyed_diff_lib.ps1 (shared with
/sap-se16n snapshot diff and /sap-compare --table-content); this skill only re-labels
its ADDED/REMOVED as RIGHT_ONLY/LEFT_ONLY for cross-system clarity.--client NNN cross-client sugar and multi-base maintenance-view diff
(v1.5); preset <name> functional-area bundles and --both-ways-summary (v2).
Full DD28S maintenance-view selection-condition application (v1.5).--where KAPPL=V (client-dependent 3-key,
DIFFERENT_WITH_GAPS), V_T685A (maintenance view → base table + scope note), unbounded
refusal, same-identity refusal, object-not-found.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).
Other plugins' skills for the same job