Skip to content
Development
Skill

/sap-st22

/sap-diagnose reader: ABAP runtime-error (short dump) evidence from ST22 in GUI mode (ADT not used; SNAP is a cluster table, so dumps are read by driving ST22 via SAP GUI Scripting). Read-only: sets the date/user selection, displays the dump list, and scrapes it into the shared

From plugin
sap-dev
8123 skills3 agents
Install
$ npx -y skills add sapdev-ai/sap-dev --skill sap-st22 --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-st22

Context preview

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

/sap-diagnose reader: ABAP runtime-error (short dump) evidence from ST22 in GUI mode (ADT not used; SNAP is a cluster table, so dumps are read by driving ST22 via SAP GUI Scripting). Read-only: sets the date/user selection, displays the dump list, and scrapes it into the shared

SKILL.md

sap-st22.SKILL.md
name: sap-st22
description: |
  /sap-diagnose reader: ABAP runtime-error (short dump) evidence from ST22 in GUI
  mode (ADT not used; SNAP is a cluster table, so dumps are read by driving ST22
  via SAP GUI Scripting). Read-only: sets the date/user selection, displays the
  dump list, and scrapes it into the shared diagnose evidence contract. With --deep
  it also opens each in-scope dump and scrapes the failing source line + snippet
  into the event's include/line + a dump_detail object (what /sap-fix-incident
  consumes to root-cause a dump); deep is strictly additive — a deep failure
  degrades to partial/skipped and never loses the list-level evidence. Component
  IDs vary by release: the reader tries candidates and degrades to a clean
  skipped/partial with a /sap-gui-probe --record hint. After scraping, it
  fingerprints each dump (SHA1 of exception|program[|include|line]) into a
  team-shareable recurrence ledger and prints a NEW / KNOWN_RECURRING / GONE
  delta (--no-fingerprint opts out; best-effort, never changes the verdict).
  Usually invoked by /sap-diagnose; runs standalone.
  Prerequisites: active SAP GUI session (/sap-login first); RZ11
  sapgui/user_scripting = TRUE.
argument-hint: "[--anchor PATH] [--user U] [--date today|YYYYMMDD] [--window MIN] [--session PATH] [--out PATH] [--top-n N] [--deep] [--dump-key KEY] [--max-deep N] [--no-fingerprint]"

SAP ST22 Dump Reader (Diagnose, GUI)

You drive ST22 read-only, display the dump list for the incident window, and emit one evidence event per dump. GUI mode — no ADT.

Task: $ARGUMENTS

---

Shared Resources

| File | Token | Purpose | |---|---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/language_independence_rules.md` | *(rule)* | Address controls by ID; status via MessageType; VKey navigation; no text branching. | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_attach_lib.vbs` | `%%ATTACH_LIB_VBS%%` | Parallel-safe session attach (`AttachSapSession`). | | `<SKILL_DIR>/references/sap_st22_read.vbs` | *(reader)* | ST22 navigation + dump-list scrape → evidence JSON. | | `<SKILL_DIR>/references/sap_st22_fingerprint.ps1` | *(local)* | Dump fingerprint + recurrence ledger (`{custom_url}\ops_kb\dump_fingerprints.tsv`); NEW/KNOWN_RECURRING/GONE delta. Pure-local, best-effort. | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_log_helper.ps1` | *(lib)* | start/end logging. |

---

Step 0 — Resolve Work Directory

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 ('CUSTOM_URL=' + (Get-SapSettingValue 'custom_url' ((Get-SapWorkDir) + '\custom')))"

Set `{WORK_TEMP}` = `{work_dir}\temp`; `{RUN_DIR}` = a fresh `{WORK_TEMP}\diagnose\<run>` (or the orchestrator's run dir when `--anchor` points into it). Parse `{custom_url}` from the `CUSTOM_URL=` line — the fingerprint ledger (Step 2.5) lives at `{custom_url}\ops_kb\dump_fingerprints.tsv`.

Set `{RUN_TEMP}` = the per-run scratch dir (`Get-SapRunTemp` mints + creates `{work_dir}\temp\run_<id>`):

powershell -NoProfile -ExecutionPolicy Bypass -Command ". '<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_connection_lib.ps1'; Write-Output ('RUN_TEMP=' + (Get-SapRunTemp))"

Per the CLAUDE.md "Two-bucket temp model" write this skill's `_run.json` log state under `{RUN_TEMP}` (the reader scratch already lives in the per-run `{RUN_DIR}`); keep `{WORK_TEMP}` (base) only for `Get-SapCurrentSessionPath -WorkTemp`.

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_st22_run.json" -Skill sap-st22 -ParamsJson "{}"

Step 1 — Resolve the Anchor + Build the Params File

`--anchor <path>` (orchestrator) or build `{RUN_DIR}\anchor.json` from flags. Parse the deep flags from `$ARGUMENTS`: `--deep` → `$deep=$true`; `--dump-key <KEY>` → `$dumpKey`; `--max-deep <N>` → `$maxDeep` (default 5). Derive the ST22 params file from the anchor:

$a = Get-Content '{RUN_DIR}\anchor.json' -Raw -Encoding UTF8 | ConvertFrom-Json
$from = "$($a.window.from_ts)"; $to = "$($a.window.to_ts)"
$lines = @(
  "FROMDATE=" + $from.Substring(0,8),
  "TODATE="   + $to.Substring(0,8),
  "USER="     + "$($a.user)",
  "TOPN=200"
)
# Deep mode (only when the caller passed --deep): open each in-scope dump and
# scrape the failing line + snippet. --dump-key scopes to one dump (the
# synthetic key = yyyymmdd + hhmmss + program); --max-deep bounds the crawl.
if ($deep)    { $lines += "DEEP=1" }
if ($dumpKey) { $lines += "DUMPKEY=$dumpKey" }
if ($maxDeep) { $lines += "MAXDEEP=$maxDeep" }
$lines | Set-Content '{RUN_DIR}\st22_params.txt' -Encoding Default

> **Empty `USER` means all users.** The reader always assigns the user field — > clearing SAP's pre-filled current user on newer RSSHOWRABAX selection screens > (required for the ALV to render there) — so an anchor without `--user` > returns dumps for **all** users in the window, uniformly across releases.

> **Deep mode is read-only too.** Opening a dump and pressing Back changes > nothing in SAP. But it is slower (one GUI round-trip per dump), so it is > opt-in and bounded by `--max-deep`. `/sap-diagnose` only requests `--deep` > when a hypothesis needs the failing line (i.e. the custom-code-defect path > that feeds `/sap-fix-incident`).

Step 2 — Run the Reader (32-bit cscript)

Substitute the attach tokens + IO paths, **baking** this AI session's pinned session path into `%%SESSION_PATH%%` so the attach helper targets the pinned connection (per the parallel-safe attach contract).

$shared = '<SAP_DEV_CORE_SHARED_DIR>\scripts'
. "$shared\sap_connection_lib.ps1"
# BAKE the path (attach Strategy 1) rather than exporting $env:SAPDEV_SESSION_PATH:
# this generator is a SEPARATE process from the one that runs cscript, so the env
# var would al
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.