sap-activate-object
Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for reports/programs/function- group…
Finds WHERE in SPRO/IMG a setting lives, semantically — the thing SAP's literal IMG search can't do. A one-time RFC harvest dumps the IMG activity index (TNODEIMGT node labels, TNODEIMG hierarchy, TNODEIMGR node->activity refs, CUS_IMGACH activity->tcode, CUS_ACTOBJ->maintenance
$ npx -y skills add sapdev-ai/sap-dev --skill sap-img-find --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sap-img-findContext preview
The summary Claude sees to decide when to auto-load this skill.
Finds WHERE in SPRO/IMG a setting lives, semantically — the thing SAP's literal IMG search can't do. A one-time RFC harvest dumps the IMG activity index (TNODEIMGT node labels, TNODEIMG hierarchy, TNODEIMGR node->activity refs, CUS_IMGACH activity->tcode, CUS_ACTOBJ->maintenance
name: sap-img-find
description: |
Finds WHERE in SPRO/IMG a setting lives, semantically — the thing SAP's literal IMG search
can't do. A one-time RFC harvest dumps the IMG activity index (TNODEIMGT node labels, TNODEIMG
hierarchy, TNODEIMGR node->activity refs, CUS_IMGACH activity->tcode, CUS_ACTOBJ->maintenance
objects) into a per-system local cache, reconstructing each node's full SPRO path locally from
the parent chain. find expands a natural-language question ("where do I set the tolerance for
invoice price differences?") into SAP-vocabulary keywords, runs a cheap lexical prefilter over
the cache (the full index never enters context — only a <=200-row shortlist), then Claude
semantically ranks it into top-N hits, each showing the full SPRO path + generated tcode +
maintenance objects so a wrong hit costs one glance, not an hour. show prints one activity's
dossier; launch navigates the live GUI session to the activity (generated tcode, else SM30/SM34
Display on its maintenance object, else prints the manual path) behind a confirm gate — it only
NAVIGATES, never Saves. Pure RFC_READ_TABLE (all TRANSP, FMODE=R), local path reconstruction ->
zero SAP writes, no wrapper FM, no dev-init, single code path ECC6 + S/4 (24/24 objects
identical). Prerequisites: pinned /sap-login RFC profile; NCo 3.1 (32-bit); a GUI session only
for launch.
argument-hint: "\"<natural-language question>\" [--top N] [--launch] [--refresh] | harvest [--refresh] | show <ACTIVITY> | launch <ACTIVITY>"You answer "where in SPRO do I configure X?" semantically: harvest the IMG index once, then prefilter + rank against the question, always showing the full path + tcode so a wrong hit is cheap. `launch` only navigates (never saves) behind a confirm gate.
Task: $ARGUMENTS
---
| File | Token / call | Purpose | |---|---|---| | `<SKILL_DIR>/references/sap_img_harvest.ps1` | `-CacheDir -Profile` | One-time RFC harvest -> per-system cache (`img_index.tsv` + `meta.json`) | | `<SKILL_DIR>/references/sap_img_query.ps1` | `-CacheDir -Keywords -OutFile` | Lexical prefilter -> shortlist (full index never enters context) | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_lib.ps1` · `sap_connection_lib.ps1` · `sap_settings_lib.ps1` | dot-source | RFC connect + `img_cache_dir` setting | | `/sap-login` · `/sap-config-compare` | sub-skills | Session/profile / (v2) compare an activity's tables cross-system |
---
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). Resolve `img_cache_dir` (default `{work_dir}\cache\img_index`) via `sap_settings_lib.ps1`; the per-system cache is `{img_cache_dir}\<SID>_<client>\`. Start logging (`sap_log_helper.ps1`).
`"<question>"` (find, default) | `harvest` | `show <ACTIVITY>` | `launch <ACTIVITY>`. Pinned RFC profile via `/sap-login`.
Cache missing -> auto-run harvest (tell the user: one-time, a couple minutes). `meta.json` older than the TTL (30 days) -> WARN `IMG_CACHE_STALE`, proceed, suggest `--refresh`. `--refresh` -> harvest first.
... sap_img_harvest.ps1 -CacheDir "<cache>" -Profile <hint>
`IMGH:` per-table row counts + `IMGH: INDEX activities=.. index_rows=..`. A core table reading 0 rows -> `IMG_HARVEST_INCOMPLETE` (never a silently thin index). Writes `img_index.tsv` (activity / tcode / node_text / spro_path / objects) + `meta.json`.
1. **You** expand the question into 5-15 SAP-vocabulary keywords/synonyms (e.g. "plant" -> plant, WERKS, site, factory) BEFORE touching the cache. 2. `sap_img_query.ps1 -Keywords "<list>" -OutFile "{RUN_TEMP}\img_shortlist.tsv"` -> the shortlist. 3. **You** semantically rank the shortlist against the ORIGINAL question -> top-N (default 5, cap 20), each with the full SPRO path + tcode + objects + a one-line rationale. Never emit a hit without its path. A nonsense query -> say low-confidence honestly, never fabricate hits.
Print one activity's dossier from the cache (all SPRO paths, tcode, maintenance objects). `IMG_ACTIVITY_NOT_FOUND` if absent.
Resolve target: generated `TCODE` from the index (priority 1) -> `/n<tcode>`; else a maintenance object -> SM30/SM34 in **Display**; else print the manual SPRO path (`IMG_LAUNCH_NO_TARGET`, INFO). **CONFIRM gate:** "Open IMG activity `<ID>` (`<text>`) via `<tcode|SM30 obj>` on `<SID>/<client>`? The skill only NAVIGATES, never saves. (yes/no)". The tcode path drives `/n<tcode>` and verifies arrival via `session.Info.Transaction`; the SM30/SM34 fallback VBS is not yet shipped (to-be-recorded): emit `NEEDS_RECORDING` and capture it once via `/sap-gui-probe --record`. On no -> `SKIPPED`.
`Register-SapArtifact` (scope `SYSTEM_<SID>_<client>`; kind `img_find_result` for a find, `img_index` for a harvest; coverage CHECKED, or COULD_NOT_CHECK when the cache is stale/incomplete and the user proceeded) for `/sap-evidence-pack`.
Log end (`SUCCESS`/`FAILED`/`SKIPPED` + error_class). Error classes: `IMG_LAYOUT_UNKNOWN`, `IMG_HARVEST_INCOMPLETE`, `IMG_CACHE_STALE` (WARN), `IMG_ACTIVITY_NOT_FOUND`, `IMG_LAUNCH_NO_TARGET` (INFO), `IMG_LAUNCH_FAILED`; reused `RFC_LOGON_FAILED` / `GUI_TIMEOUT`.
---
local SPRO-path reconstruction from the TNODEIMG parent chain + node->activity->tcode/object join) and the find pipeline (lexical prefilter -> scored shortlist) were verified on a bounded harvest — e.g. find "tax/tolerance/pa
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.
Repo: sapdev-ai/sap-dev
Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for reports/programs/function- group…
Natural-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,…
Runs 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…
Executes BDC (Batch Data Communication) sessions in SAP via RFC. Reads SHDB recording files from the bdc/ folder, connects via SAP NCo 3.1, calls…
Changes the package (TADIR-DEVCLASS) assignment of an SAP repository object via the "Object Directory Entry" dialog (Goto > Object Directory Entry). Routes by…
Validates ABAP source (report / program / FM / class / include) before deployment — one skill, dimension-dispatched: naming (variable conventions), type (DDIC…