What problem does it solve?
Enumerates and classifies the custom (Z/Y / customer-namespace) repository objects in scope for an S/4HANA migration campaign. Reads TADIR (object directory) and TRDIR (program sub-type) over read-only RFC against the campaign's SOURCE system, writes inventory.tsv, and upserts every object into the campaign state ledger (state.tsv) as INVENTORIED — never altering objects already further along, so it is safe to re-run as new custom code appears. No SAP GUI, no writes, no transport request: pure read-only analysis. This is the first SAP-touching step of the sap-migrate pipeline; run it after /sap-cc-campaign init and before /sap-cc-usage. When RFC to the source is blocked, a GUI fallback (--source-mode GUI) ingests /sap-se16n exports of TADIR (+ optional TRDIR) instead -- identical output, no NCo. Scope defaults to the campaign brief's in_scope_packages (object-name prefixes such as Z*, Y*); override with --namespace, --packages (DEVCLASS patterns), --types, and --exclude. Prerequisites (RFC mode): SAP NCo 3.1 (32-bit, .NET 4.0) in GAC; a saved campaign's source connection profile (the campaign's source_profile) or a pinned /sap-login connection. GUI mode needs no NCo -- only a SAP GUI session for the /sap-se16n export step.
Core Features & Use Cases
- Read-only RFC access to SAP TADIR/TRDIR data for inventory generation.
- Writes inventory.tsv and upserts state.tsv with INVENTORIED entries, safe for re-runs.
- GUI fallback using /sap-se16n exports when RFC is blocked, preserving filters and scope.
- Integrates into the sap-migrate campaign workflow, producing a stable audit trail.
Quick Start
Run the inventory workflow for a campaign using RFC or GUI mode, filtered by your namespace or DEVCLASS patterns.