Skip to content
Development
Skill

/sap-version-history

Reads the SAP version store over RFC (no GUI) to answer "who changed this program/FM, when, and what exactly changed" — the same-system TIME axis that complements /sap-compare's cross-system axis. Three read-only modes: `list` (version directory via SVRS_GET_VERSION_DIRECTORY_46

From plugin
sap-dev
8123 skills3 agents
Install
$ npx -y skills add sapdev-ai/sap-dev --skill sap-version-history --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/sap-version-history

Context preview

The summary Claude sees to decide when to auto-load this skill.

Reads the SAP version store over RFC (no GUI) to answer "who changed this program/FM, when, and what exactly changed" — the same-system TIME axis that complements /sap-compare's cross-system axis. Three read-only modes: `list` (version directory via SVRS_GET_VERSION_DIRECTORY_46

SKILL.md

sap-version-history.SKILL.md
name: sap-version-history
description: |
  Reads the SAP version store over RFC (no GUI) to answer "who changed this
  program/FM, when, and what exactly changed" — the same-system TIME axis that
  complements /sap-compare's cross-system axis. Three read-only modes:
  `list` (version directory via SVRS_GET_VERSION_DIRECTORY_46 with a TR-status
  join — author, date, transport, released-flag, last-released), `diff` (unified
  line diff of any two stored versions, or the newest pair by default, with an AI
  change annotation), and `blame` (per-line attribution: which version / author /
  TR introduced each line, over a bounded window, honestly marking lines older
  than the window). Object kinds: programs, includes, function modules. Entirely
  RFC + local; nothing is written to SAP. Results register for /sap-evidence-pack.
  Use for: version history, "who changed Z...", program change history, diff two
  versions, version compare same system, blame ABAP lines, transport of a change.
  Prerequisites: an RFC-capable connection profile (/sap-login). No dev-init, no
  GUI session.
argument-hint: "<mode> <OBJECT> ...   list <OBJECT> [--type=program|include|fm] [--max=20]   |   diff <OBJECT> [<VERSNO_A> <VERSNO_B>] [--type=...] [--no-annotate]   |   blame <OBJECT> [--window=10] [--type=...]"

SAP Version History — list · diff · blame (RFC)

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).

---

Shared Resources

| 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.

---

Step 0 — Resolve Work Directory

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).

---

Step 0.5 — Start Logging

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>\"}"

---

Step 1 — Parse Arguments & Dispatch Mode

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.

---

Step 2 — Resolve Object Identity

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.
  • A **class / interface** token → `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.

---

Step 3 — Ma

Read more
Ships withsap-dev

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.

Get the whole plugin

Other skills on sap-dev.