Skip to content
Development
Skill

/sap-mass-load

Loads CSV/XLSX mass data into SAP through ONE explicit backend per run — a named BAPI called directly over RFC, or (v1) an SHDB recording looped through ABAP4_CALL_TRANSACTION — with the orchestration/UX layer that MASS/XD99/LSMW lack and LTMC (Fiori-only, unreachable from this

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

Context preview

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

Loads CSV/XLSX mass data into SAP through ONE explicit backend per run — a named BAPI called directly over RFC, or (v1) an SHDB recording looped through ABAP4_CALL_TRANSACTION — with the orchestration/UX layer that MASS/XD99/LSMW lack and LTMC (Fiori-only, unreachable from this

SKILL.md

sap-mass-load.SKILL.md
name: sap-mass-load
description: |
  Loads CSV/XLSX mass data into SAP through ONE explicit backend per run — a named BAPI called
  directly over RFC, or (v1) an SHDB recording looped through ABAP4_CALL_TRANSACTION — with the
  orchestration/UX layer that MASS/XD99/LSMW lack and LTMC (Fiori-only, unreachable from this stack)
  can't give a consultant: an AI-proposed column->field mapping from live DDIC texts that REQUIRES
  operator approval, RFC pre-validation of key lookups (T001W/T052/KNA1/MARA...) before anything is
  written, a mandatory dry-run report, a typed row-count/client confirm gate, a NON-OVERRIDABLE
  production-client refusal (T000 CCCATEGORY='P'), and a per-row ledger that makes a 2,000-row load
  safely re-runnable (resume retries only FAILED/PENDING rows; OK rows SKIPPED). Every write goes
  through a BAPI + BAPI_TRANSACTION_COMMIT (or CALL TRANSACTION) with a per-row commit/rollback and an
  authoritative re-read of a sample of created keys — never raw SQL. Entirely RFC in v1 (no GUI, no Z
  artefacts); FMODE-blank FM targets refuse with a v1.5 pointer. Prerequisites: pinned RFC profile via
  /sap-login (its SID/client IS the load target); NCo 3.1 (32-bit). A production client ends the skill.
argument-hint: "plan <file.csv|.xlsx> (--target-bapi <FM> | --target-bdc <rec>) [--key-cols C1,C2] [--sheet N] | validate <run-dir> | execute <run-dir> [--max-rows N] | resume <run-dir> | status <run-dir>"

SAP Mass-Load Skill

You load mass data safely: propose a mapping (operator-approved), pre-validate keys over RFC, force a dry-run, gate the write behind a typed confirm, refuse production clients, and keep a resumable per-row ledger. Every write is a BAPI/CALL-TRANSACTION with per-row commit — never raw SQL.

Task: $ARGUMENTS

The client guard, interface introspection, validation, and the BAPI row loop are scripts; **you** propose the mapping and run the confirm gates.

---

Shared Resources

| File | Token / call | Purpose | |---|---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/safety_policy.md` + `<SAP_DEV_CORE_SHARED_DIR>/scripts/sap_safety_gate.ps1` | Rule 0 | Environment guard — Step 4 runs `-Action assert` before the write | | `<SKILL_DIR>/references/sap_mass_load_rfc.ps1` | `-Action clientguard\|interface\|validate` | Read-only core (guard + target introspection + dry-run) | | `<SKILL_DIR>/references/sap_mass_load_execute.ps1` | `-DryRun` / live | BAPI row-loop executor (gated write) + ledger | | `<SKILL_DIR>/references/mass_load_checktables.tsv` | read | Key-existence check tables (field -> table,keyfield) | | `<SKILL_DIR>/references/mass_load_target_advisories.tsv` | read | Per-target release advisories (shown in the gate) | | `/sap-call-bdc` | sub-skill | the `--target-bdc` recording format + BDCMSGCOLL vocabulary | | `/sap-login` | sub-skill | Pinned RFC profile (= the load target SID/client) |

---

Step 0 — Resolve Work Directory

Resolve `work_dir` + `{RUN_TEMP}`; run folder = `{work_dir}\mass_load\<run_id>\` (survives the plan->validate->execute turns).

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 ('RUN_TEMP=' + (Get-SapRunTemp))"

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_mass_load_run.json" -Skill sap-mass-load -ParamsJson "{}"

Step 1 — Parse Args + Client Guard

Mode dispatch: `plan` | `validate` | `execute` | `resume` | `status`. Every mode except `status` runs the client guard FIRST:

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_mass_load_rfc.ps1" -Action clientguard -SharedDir "<SAP_DEV_CORE_SHARED_DIR>"

`STATUS: MASS_LOAD_CLIENT_REFUSED` (production client OR unreadable T000) -> STOP, non-overridable.

Step 2 — plan

Flatten/parse the input (CSV/TSV native; `.xlsx` via the /sap-docs-extract reader, `--sheet`), snapshot to the run folder + record its SHA256. Introspect the ONE target:

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_mass_load_rfc.ps1" -Action interface -TargetBapi <FM> -OutFile "{RUN}\interface.tsv" -SharedDir "<SAP_DEV_CORE_SHARED_DIR>"

`MASS_LOAD_TARGET_UNSUPPORTED` (blank FMODE) -> STOP, point at v1.5. Then **you** propose the mapping (`input_col -> target(param or STRUCT-FIELD), DDIC text, length, CONVEXIT, rule MOVE|CONST|SKIP, key_flag`) in chat, showing the matching `mass_load_target_advisories.tsv` warnings. An unmapped column needs an explicit map/ignore decision — never silently dropped. On explicit operator approval, write `mapping.tsv` + the approval hash into `run.json`.

Step 3 — validate (mandatory before execute)

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "<SKILL_DIR>\references\sap_mass_load_rfc.ps1" -Action validate -InputFile "{RUN}\input_snapshot.csv" -KeyCols "<biz-key-cols>" -KeyChecks "<COL=FIELD,...>" -CheckTablesFile "<SKILL_DIR>\references\mass_load_checktables.tsv" -OutFile "{RUN}\dryrun_report.tsv" -SharedDir "<SAP_DEV_CORE_SHARED_DIR>"

`VERDICT: BLOCKED` (missing keys, duplicate business keys, or a key lookup that COULD_NOT_CHECK) -> execute refuses. Derive `-KeyChecks` from the approved mapping (each key column -> its DDIC field).

Step 4 — execute (typed gate; the only write)

**Rule 0 first** (`safety_policy.md`; `execute`/`resume` only — `plan`/`validate`/`status` skip it): `powershell -NoProfile -ExecutionPolicy Bypass -File "<SAP_DEV_CORE_SHARED_DIR>\scripts\sap_safety_gate.ps1" -Action assert -Skill sap-mass-load` — `SAFETY: ALLOW` (0) proceed; `TYPED_CONFIRM_REQUIRED` (3) -> the operator types the shown `PROD <SID>/<CLIENT>

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.