/sap-dev-core:sap-version-history <mode> <OBJECT> ... list <OBJECT> [--type=program|include|fm] [--max=20] | diff <OBJECT> [<VERSNO_A> <VERSNO_B>] [--type=...] [--no-annotate] | blame <OBJECT> [--window=10] [--type=...]from sap-dev-core
Reads SAP ABAP version store over RFC to list, diff, and blame program/function module versions. Answers who changed what and when, without GUI.
Ships in sap-dev-core. 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 read the ABAP version store entirely over RFC (SAP NCo 3.1, 32-bit PowerShell). No GUI automation — if RFC is unavailable you fail loud, never half-drive SE38/SE37 version management. v1 is pure read-only (Rule 1); it deploys nothing and writes nothing to SAP.
Task: $ARGUMENTS
Version content is read only through the SVRS function modules
(SVRS_GET_VERSION_DIRECTORY_46, SVRS_GET_REPS_FROM_OBJECT) — never
RFC_READ_TABLE on VRSD / VRSX2 for source (VRSX2 stores compressed RAW
lines; the FM path is authoritative). The directory FM is more complete than a
capped raw VRSD read (verified: it surfaces the newest version a bounded VRSD
sample misses).
| File | Token | Purpose |
|---|---|---|
<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md | (rule) | Mandatory operating rules |
<SAP_DEV_CORE_SHARED_DIR>/rules/error_classes.md | (rule) | error_class taxonomy (this skill's VH_* classes live here) |
<SKILL_DIR>/references/sap_version_rfc.ps1 | %%RFC_LIB_PS1%% (only) | RFC backend: -Action list|fetch. %%SAP_*%% stay literal → Connect-SapRfc fills them from the pinned profile |
<SKILL_DIR>/references/sap_text_diff.ps1 | (offline) | Two-file LCS unified diff (context hunks); run directly, no tokens |
<SKILL_DIR>/references/sap_version_blame.ps1 | (offline) | Per-line blame (LCS-chained newest→oldest); run directly, no tokens |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_lib.ps1 | %%RFC_LIB_PS1%% | NCo connect/disconnect; fills %%SAP_*%% from the pinned profile |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_object_resolver.ps1 | (CLI) | Resolves the object token → {pgmid, object, obj_name, kind} (identity, no GET_R3TR FM) |
<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_artifact_lib.ps1 | %%ARTIFACT_LIB_PS1%% | Register list/diff/blame outputs for /sap-evidence-pack |
This skill drives no SAP GUI: no VBS, no golden-screen baseline, no session lock, no GUI-Security sidecar.
Resolve work_dir + artifact_dir via the env-aware helper — do NOT read
settings.json directly:
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)); Write-Output ('ARTIFACT_DIR=' + (Get-SapSettingValue 'artifact_dir' ((Get-SapWorkDir) + '\artifacts'))); Write-Output ('RUN_TEMP=' + (Get-SapRunTemp))"
Set {WORK_TEMP} = {work_dir}\temp (create if missing); {RUN_TEMP} = the
RUN_TEMP= value (all generated *_run.ps1 and fetched source files go here).
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_version_history_run.json" -Skill sap-version-history -ParamsJson "{\"mode\":\"<MODE>\",\"object\":\"<OBJ>\"}"
The first token is the mode; the second is the object.
| Mode | Meaning | Write? |
|---|---|---|
list | Version directory + TR-status join | read-only |
diff | Unified diff of two stored versions (default: newest pair) + AI annotation | read-only |
blame | Per-line attribution over a window | read-only |
restore | Phase 2 — not implemented; print "restore is planned for phase 2 (confirm-gated, delegates to /sap-se38//sap-se37); not available in v1" and stop. Never a partial write. |
Flags: --type=program|include|fm (optional; auto-resolved in Step 2 if absent),
--max=N (list, default 20), --window=N (blame, default 10, hard cap 25),
--no-annotate (diff). Unknown/missing mode → usage and stop.
Resolve the token to a repository object and map it to the VRSD key:
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_object_resolver.ps1" -Token "<user object token>"
Read the STATUS: line:
RESOLVED → take kind. Map to the SVRS OBJTYPE: program / include → REPS,
function module → FUNC. If the user passed --type, it overrides (still
program/include→REPS, fm→FUNC).NOT_FOUND / AMBIGUOUS → fail loud with the candidate list; register nothing.VH_TYPE_UNSUPPORTED (per-include class
versioning is v2); say so and stop.Carry {OBJ} (the technical name, upper-cased) and {OBJTYPE} (REPS/FUNC)
into the backend calls.
Substitute only %%RFC_LIB_PS1%%; leave every %%SAP_*%% token literal so
Connect-SapRfc fills them from the pinned profile:
$ps = [IO.File]::ReadAllText('<SKILL_DIR>\references\sap_version_rfc.ps1', [Text.Encoding]::UTF8)
$ps = $ps.Replace('%%RFC_LIB_PS1%%', '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_rfc_lib.ps1')
[IO.File]::WriteAllText('{RUN_TEMP}\vh_rfc_run.ps1', $ps, (New-Object Text.UTF8Encoding($false)))
Write-Host 'Done'
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "{RUN_TEMP}\vh_rfc_run.ps1" -Action list -ObjName "{OBJ}" -ObjType "{OBJTYPE}" -OutFile "{RUN_TEMP}\version_list.tsv"
VER: lines into a table: VERSNO · active · released · author ·
date · time · TR · TR-status · TR-func, and the STATUS: OK n=… numbered=… last_released=… via=… tail. via=vrsd means the SVRS FM fell back to a raw
VRSD read (still valid).STATUS: VH_NO_VERSIONS → report honestly ("no transported version history yet
— versions are written on release/generation") and stop (log SUCCESS). This is
a legitimate state for a freshly built object, never rendered as an error or
"no differences".STATUS: RFC_LOGON_FAILED / RFC_ERROR → surface + stop with the manual hint
(run /sap-login, or use SE38/SE37 → Utilities → Versions in the GUI).trstatus=UNKNOWN means the version's originating TR is
not in this system's E070 (e.g. objects imported from an upstream system —
common on QA/PRD/ECC); report it as UNKNOWN, never as released.For list mode, apply --max when rendering (show newest N numbered + the active
row), register (Step 6), and finish.
diff <OBJ> <A> <B> → those two VERSNOs.diff <OBJ> (no versnos) → the two newest numbered versions from Step 3.
If only one numbered version exists → VH_NO_VERSIONS-style "only one stored
version; nothing to diff" and stop.{RUN_TEMP}:
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "{RUN_TEMP}\vh_rfc_run.ps1" -Action fetch -ObjName "{OBJ}" -ObjType "{OBJTYPE}" -Versno <A> -OutFile "{RUN_TEMP}\v<A>.abap"
STATUS: VH_VERSION_NOT_FOUND for either side → stop with that class (the
version isn't in the store).C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_text_diff.ps1" -LeftFile "{RUN_TEMP}\v<A>.abap" -RightFile "{RUN_TEMP}\v<B>.abap" -OutFile "{ARTIFACT}\diff_<A>_vs_<B>.diff" -LeftLabel "v<A>" -RightLabel "v<B>"
Read the DIFF: added=… removed=… hunks=… (or DIFF: identical) line.
identical is a real, common answer (an object re-released across TRs
without a source change) — report it plainly, not as a failure.--no-annotate, Read the .diff file and write diff_summary.md
in the artifact dir: what changed (structural summary), the likely intent, and
risk flags (auth checks, DB writes, commit/rollback, hard-coded values). Ground
every claim in the diff; add nothing not visible in it.--window (default 10, cap 25) numbered versions.
Set HasOlder = there are more numbered versions than the window.{RUN_TEMP}\v<N>.abap (as in Step 4.2), newest first.C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_version_blame.ps1" -Files "<newest>=<path>,...,<oldest>=<path>" -MetaTsv "{RUN_TEMP}\version_list.tsv" -OutTsv "{ARTIFACT}\blame.tsv" -OutAnnotated "{ARTIFACT}\blame_annotated.txt" [-HasOlder]
Read BLAME: lines=… versions=… older_than_window=….OLDER_THAN_WINDOW (honestly: "attribution older than the N-version window;
raise --window to go deeper").Register each output produced (dot-source sap_artifact_lib.ps1 and call
Register-SapArtifact -Skill sap-version-history -ScopeKey (New-SapScopeKey …) -Kind <kind> -Format <fmt> -Path <p> -Coverage CHECKED -Rows <n>):
| File | Kind |
|---|---|
version_list.tsv | version-list |
diff_<A>_vs_<B>.diff + diff_summary.md | version-diff |
blame.tsv + blame_annotated.txt | version-blame |
Use -Coverage COULD_NOT_CHECK if any FM fetch degraded (never a fabricated
result). No gate verdict — these are analytical outputs.
powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action end -StateFile "{RUN_TEMP}\sap_version_history_run.json" -Status <SUCCESS|FAILED> -ExitCode <0|1> [-ErrorClass <CLASS> -ErrorMsg "<short>"]
error_class values (in shared/rules/error_classes.md): VH_NO_VERSIONS,
VH_VERSION_NOT_FOUND, VH_TYPE_UNSUPPORTED; plus infra RFC_LOGON_FAILED /
RFC_ERROR.
RFC_READ_TABLE
on the version tables.VH_NO_VERSIONS (empty store), VH_VERSION_NOT_FOUND
(out-of-range versno), VH_TYPE_UNSUPPORTED (class/interface), NOT_FOUND /
AMBIGUOUS object; a degraded FM fetch is COULD_NOT_CHECK, never an empty/false
diff. trstatus=UNKNOWN is disclosed, never shown as released.--active / --last-released (diff against the live source) are v1.1 —
they need the active source read via Read-SapAbapSource (RPY) wired in; v1
diffs stored-version-vs-stored-version only (explicit pair, or the newest two).VH_TYPE_UNSUPPORTED in v1.restore is phase 2 — confirm-gated, delegating the deploy to /sap-se38 //
sap-se37 (which own activation + TR resolution via /sap-transport-request).VH_NO_VERSIONS),
and consecutive versions are often byte-identical (re-released without change) →
diff reports identical honestly.sap_text_diff.ps1 as a shared unified-diff
engine (and upgrade /sap-compare's set-diff onto it); kept skill-local for now.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
61 skills in this plugin
/sap-activate-objectActivates an inactive SAP repository object via SAP GUI Scripting. Routes to
the correct transaction by object type: SE38 for reports/programs/function-
group main programs, SE37 for function modules, SE24 for classes/interfaces
/methods, SE11 for DDIC objects (table, view, dataelement, structure,
tabletype, typegroup, domain, searchhelp, lockobject). Handles the
"inactive objects worklist" popup that SAP shows when there are multiple
inactive objects of the same locality (transportable vs. local — SAP filters
the popup by package locality of the triggering object). Verifies activation
via PROGDIR (programs/FMs include) and DWINACTIV.
Prerequisites: Active SAP GUI session (use /sap-login first).
/sap-api-advisorNatural-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,
paste-ready shortlist of BAPIs / function modules / classes — with released
state (S/4), interface + documentation for the top candidates, the team's known
traps inlined, and a ready-to-paste CALL FUNCTION snippet. Reads the BAPI
catalog (BAPI_MONITOR_GETLIST), TFDIR/TFTIT name+text, SEOCLASS, ARS_W_API_STATE
(S/4 released state), FUPARAREF/FUNCT + DOCU_GET. HARD rule: it never test-calls
a candidate — snippets are text only. Read-only; deploys nothing.
Use for: "which BAPI/FM for X", find an API, is this BAPI released, API to
create/read/post <object>, discover function module, released API S/4.
`successor` (released→sanctioned replacement) is phase 2; `scan` is phase 3.
Prerequisites: an RFC-capable connection profile (/sap-login). No dev-init, no GUI.
/sap-atcRuns 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 that set, polls the ATC Run Monitor until the
run completes, then reads the Priority 1 / Priority 2 / Priority 3
finding counts from the Manage Results screen and (best-effort)
downloads the result text file. Applies the customer brief's
MAX_PRIORITY threshold to decide pass / fail.
Replaces the legacy SCI-results-tree implementation that lacked a
Priority column. Per-stage VBS references are recorded against the
S/4HANA 1909 ATC layout — re-record on first failure with
/sap-gui-probe --record if your release uses different tree node IDs / grid
column IDs.
Prerequisites: Active SAP GUI session (use /sap-login first).
/sap-call-bdcExecutes BDC (Batch Data Communication) sessions in SAP via RFC.
Reads SHDB recording files from the bdc/ folder, connects via
SAP NCo 3.1, calls ABAP4_CALL_TRANSACTION, and outputs
full BDCMSGCOLL messages to a result file.
Connection parameters resolved from the AI session's pinned profile in
connections.json (saved via /sap-login).
Prerequisites: SAP profile saved via /sap-login (RFC password required).
SAP NCo 3.1 (32-bit, .NET 4.0) in GAC.
/sap-change-packageChanges the package (TADIR-DEVCLASS) assignment of an SAP repository object
via the "Object Directory Entry" dialog (Goto > Object Directory Entry).
Routes by object type to SE38 / SE37 / SE24 / SE11 / SE91 / CMOD (the last
for enhancement projects — used by /sap-cmod). Handles three
flows automatically based on current vs new package locality:
(a) $TMP → transportable (Z*/Y*): resolves a modifiable TR via
/sap-transport-request, then enters the new package + TR.
(b) transportable A → transportable B: pre-checks E071/E070 to ensure
the object is NOT linked to a modifiable TR (would block the move).
(c) transportable → $TMP: confirms the move and presses "Local object".
Verifies via TADIR re-query.
Prerequisites: Active SAP GUI session (use /sap-login first).
/sap-check-abapValidates ABAP source (report / program / FM / class / include) before
deployment — one skill, dimension-dispatched: naming (variable conventions),
type (DDIC type validity), unused (dead variables), sql (SELECT/UPDATE/DELETE
fields vs table defs), contract (offline generation rules), spec (offline: code
covers every dependency / message / text / selection field in the design spec),
fm (CALL FUNCTION params / sections / types vs the live FM over RFC — absorbed
from the former sap-check-fm), syntax (compiler-level EDITOR_SYNTAX_CHECK via
RFC, catching real errors offline before any GUI upload). Writes tab-delimited
result files with fix advice; feed findings to /sap-fix-abap. SAP connection
optional — offline skips type/sql/fm/syntax; live dimensions that can't run
report COULD_NOT_CHECK, never a silent pass.
Prerequisites: SAP GUI (SAP.Functions COM); SAP NCo 3.1 (32-bit) + the dev-init
wrapper Z_GENERIC_RFC_WRAPPER_TBL for the syntax dimension.
npx claudepluginhub sapdev-ai/sap-dev --plugin sap-dev-coreOther plugins' skills for the same job