Skip to content
Development
Skill

/sap-cc-inventory

Enumerates and classifies the custom (Z/Y / customer-namespace) repository objects in scope for an S/4HANA migration campaign. Reads TADIR + TRDIR over read-only RFC against the campaign's SOURCE system, writes inventory.tsv, and upserts every object into the state ledger as

From plugin
sap-dev
10123 skills3 agents

Claude Code

$ npx -y skills add sapdev-ai/sap-dev --skill sap-cc-inventory --agent claude-code

SKILL.md

sap-cc-inventory.SKILL.md
name: sap-cc-inventory
description: |
  Enumerates and classifies the custom (Z/Y / customer-namespace) repository
  objects in scope for an S/4HANA migration campaign. Reads TADIR + TRDIR over
  read-only RFC against the campaign's SOURCE system, writes inventory.tsv, and
  upserts every object into the state ledger as INVENTORIED (never touching
  objects further along, so it is safe to re-run as new custom code appears). No
  SAP GUI, no writes, no TR — pure read-only. First SAP-touching step of the
  sap-migrate pipeline; run after /sap-cc-campaign init, before /sap-cc-usage.
  When RFC is blocked, --source-mode GUI ingests /sap-se16n exports of TADIR
  (+ TRDIR) instead (identical output, no NCo). Scope defaults to the brief's
  in_scope_packages; override with --namespace / --packages / --types / --exclude.
  Prerequisites (RFC): SAP NCo 3.1 (32-bit) + a saved source_profile (or pinned
  /sap-login). GUI mode needs only a SAP GUI session for the /sap-se16n export.
argument-hint: "--campaign <id> [--source <profile>] [--source-mode RFC|GUI] [--tadir-file <path>] [--trdir-file <path>] [--namespace Z,Y] [--packages <pat,...>] [--types PROG,CLAS,...] [--exclude <pat,...>]"

SAP Custom-Code Migration — Inventory

You build the custom-code inventory for a migration campaign: list every in-scope Z/Y repository object on the SOURCE system, write it to the campaign's `inventory.tsv`, and seed the `state.tsv` ledger with one INVENTORIED row per object. Everything is **read-only** — `RFC_READ_TABLE` on TADIR/TRDIR only.

Task: $ARGUMENTS

---

Shared Resources

| File | Token | Purpose | |---|---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md` | *(rule)* | Mandatory operating rules. Reads are always allowed; this skill performs none of the forbidden writes. | | `<SAP_DEV_CORE_SHARED_DIR>/rules/settings_lookup.md` | *(rule)* | Settings / `work_dir` resolution contract. | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_settings_lib.ps1` | *(dot-source)* | `Get-SapWorkDir` / `Get-SapSettingValue`. | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_connection_lib.ps1` | *(dot-source)* | `Get-SapWorkDir`, `Resolve-SapProfileHint` (resolves the named `source_profile`). | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_rfc_lib.ps1` | *(dot-source)* | NCo 3.1 connect + `New-RfcReadTable` / `Add-RfcField` / `Add-RfcOption`. | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_dpapi.ps1` | *(invoke)* | Decrypt the source profile's stored password. Invoked as a subprocess — never dot-sourced (it has a `$Action` param that would clobber the caller's). | | `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_log_helper.ps1` | *(invoke)* | Start/step/end JSONL logging. | | `<SKILL_DIR>/references/sap_cc_inventory.ps1` | *(invoke)* | The enumerator. **RFC mode** resolves the source profile and reads TADIR/TRDIR; **GUI mode** (`-SourceMode GUI`) ingests `/sap-se16n` TADIR (+ TRDIR) exports instead. Both write `inventory.tsv`, upsert `state.tsv`, and emit `INVENTORY:` / `TYPE:` / `STATUS:` lines. | | `/sap-se16n` | *(skill, GUI fallback)* | Drives SE16N to export TADIR/TRDIR as TSV when RFC is unavailable; the GUI-mode helper ingests those exports. |

The campaign workspace contract (`inventory.tsv` + `state.tsv` columns, the INVENTORIED state, the upsert rule) is defined by `/sap-cc-campaign`.

> Read-only RFC skill: no SAP GUI, so it does NOT use the session broker, the > attach library, language-independence VBS rules, or `/sap-transport-request`.

---

Step 0 — Resolve Work Directory and Settings

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 `{WORK_TEMP}` = `{work_dir}\temp`; ensure it exists:

cmd /c if not exist "{WORK_TEMP}" mkdir "{WORK_TEMP}"

Set `{CAMPAIGN_DIR}` = `{work_dir}\migrations\{campaign-id}`.

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 per-run scratch (the log state file below) under `{RUN_TEMP}`, never at a fixed name under the `{WORK_TEMP}` root.

---

Step 0.5 — Start Logging

State file: `{RUN_TEMP}\sap_cc_inventory_run.json`. Best-effort.

powershell -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_log_helper.ps1" -Action start -StateFile "{RUN_TEMP}\sap_cc_inventory_run.json" -Skill sap-cc-inventory -ParamsJson "{}"

---

Step 1 — Parse Arguments & Pre-flight

Parse `$ARGUMENTS`:

  • `--campaign <id>` — **required.** If `{CAMPAIGN_DIR}\campaign.json` is missing,

print `ERROR: campaign '<id>' not found — run /sap-cc-campaign init` and exit `1`.

  • `--source <profile>` — override the campaign's `systems.source_profile`.
  • `--namespace <list>` — object-name prefixes (e.g. `Z,Y`). Defaults to the

brief's `scope.in_scope_packages`, then `Z,Y`.

  • `--packages <list>` — DEVCLASS patterns (e.g. `ZHK*,ZFI*`); when given, scope

is by package instead of object-name prefix.

  • `--types <list>` — restrict to these TADIR OBJECT values (e.g. `PROG,FUGR,CLAS,TABL`).
  • `--exclude <list>` — drop objects whose name matches any pattern (e.g. `ZLEGACY_*,ZTEST_*`).

This skill **reads** the SAP system; per `skill_operating_rules.md` reads need no confirmation. It writes only to the campaign workspace on disk.

---

Step 2 — Run the Inventory Enumerator (32-bit PowerShell)

NCo 3.1 lives in `GAC_32`, so run via 32-bit PowerShell:

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_cc_inventory.ps1" -CampaignDir "{CAMPAIGN_DIR}" -WorkDir "{work_dir}" -SharedDir "<SAP_DEV_CORE_SHARED_DIR>\scripts"
Read more
@sapdev-ai
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.

10123 skills3 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
10
Star history of sapdev-ai/sap-dev on GitHub, a chart by star-history.com

Other skills on sap-dev.

sap-activate-object

sap-activate-object

Activates an inactive SAP repository object via SAP GUI Scripting. Routes to the correct transaction by object type: SE38 for…

@sapdev-ai@sapdev-aiInstall Skill
sap-api-advisor

sap-api-advisor

Natural-language SAP API discovery over RFC (no GUI): turn a goal like "create a sales order" or "post a goods movement" into a…

@sapdev-ai@sapdev-aiInstall Skill
sap-atc

sap-atc

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),…

@sapdev-ai@sapdev-aiInstall Skill
sap-call-bdc

sap-call-bdc

Executes BDC (Batch Data Communication) sessions in SAP via RFC. Reads SHDB recording files from the bdc/ folder, connects via…

@sapdev-ai@sapdev-aiInstall Skill
sap-change-package

sap-change-package

Changes the package (TADIR-DEVCLASS) assignment of an SAP repository object via the "Object Directory Entry" dialog (Goto >…

@sapdev-ai@sapdev-aiInstall Skill
sap-check-abap

sap-check-abap

Validates ABAP source (report / program / FM / class / include) before deployment — one skill, dimension-dispatched: naming…

@sapdev-ai@sapdev-aiInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about sap-cc-inventory.

Which coding agents can use sap-cc-inventory?
sap-cc-inventory installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.