sap-migo-debug

A diagnostic command for MIGO, SAP’s screen for posting material receipts and other inventory movements. It checks possible causes in a set order, including stock, movement types, accounting, periods, and material costs.

In plain words
What is it for?
Use it to investigate MIGO error messages, movement types such as 101 or 103, missing G/L account settings, closed periods, and material price issues.
Why use it?
It organizes the investigation when an SAP inventory posting fails, so common configuration and data problems are checked systematically.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/boxlogodev/sapstack/sap-migo-debug
Clone the repo
git clone --depth 1 https://github.com/BoxLogoDev/sapstack
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 965 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00061 $0.00965
Opus 5 $0.00030 $0.00483
Sonnet 5 $0.00012 $0.00193
Haiku 4.5 $0.00006 $0.00097

Measured 2d ago against content hash 91b91e96763e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sap-migo-debug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/sap-migo-debug.md · 96 lines

What it actually says

MIGO 디버그 파이프라인

입력: $ARGUMENTS

🎯 목표

MIGO 포스팅 실패 시 체계적으로 원인을 추적합니다. 한국 현장에서 흔한 패턴을 우선 점검합니다.

진단 순서

Step 1. 에러 메시지 파싱

  • 사용자에게 전체 에러 메시지 (클래스.번호 형태) 요청
  • 예: M7 003 — "Document XXX cannot be posted in period YYY"
  • 클래스별 해석 가이드:
    • M7: MM 포스팅 일반
    • F5: FI 계정 결정 / 기간
    • ME: PO/계약 관련
    • MEPO: PO 생성 관련

Step 2. 재고/가용성

  1. MMBE: 전체 재고 상황
  2. MB5B: 전기간 재고 이력 (음수 재고 탐지)
  3. MB52: 창고별 재고
  4. 체크:
    • Negative stock 허용 여부 (OMJ1)
    • Batch 관리 자재의 Batch 선택
    • Serial Number 자재의 일련번호

Step 3. 이동 유형 설정

  • OMJJ: 이동 유형 설정 확인
  • OMWB: 계정 결정
  • 체크:
    • 이동 유형 101(GR) vs 103(GR Blocked Stock) vs 105(GR Release) 구분
    • Special Stock indicator (E, K, Q 등)
    • Reversal (102, 122) 시 원본 문서 추적

Step 4. 계정 결정 (OBYC)

  • OBYC: Transaction Key 별 G/L 계정
  • 흔한 원인:
    • GBB-VBR 계정 누락
    • WRX (GR/IR Clearing) 계정 누락
    • BSX (Stock) 계정 누락
  • 체크: MM 계정 그룹이 FI 회사코드와 매핑되었는지

Step 5. 기간 제어

  • OMSY: MM 기간 (현 기간 + 전기간 2개월만 허용)
  • OB52: FI 기간 vs MM 기간 일치 여부
  • 한국 현장 이슈: MM 기간이 닫혔는데 FI만 열려 있는 경우 흔함

Step 6. 원가 / 가격

  • MBEW: 자재 가격 레코드
  • CKMLCP (S/4HANA): Actual Costing 실행 여부
  • 체크:
    • Moving Average Price (V) vs Standard Price (S)
    • 가격 절대값이 0인 자재 — 포스팅 차단
    • CO-PC 활성화 시 Costing Variant

Step 7. 한국 특화

  • CVI KR 관련:
    • 부가세 자동 분리 설정 (J_1BNFE)
    • 전자세금계산서 발행 대상 플래그
  • 부가세 코드 매핑 (MWSKZ) 유효성

Step 8. 감사 흔적

  • SE38 → RM07MDOC: 자재 문서 조회
  • MB51: 자재 문서 리스트
  • CDHDR/CDPOS: 변경 로그
  • 한국 K-SOX — 이동 유형별 Dual Authorization 확인

📤 출력 형식

## 🔍 진단 결과
- 에러: (클래스.번호)
- 확률 높은 원인: (Top 3)

## 🛠 수정 단계
1. ...
2. ...

## 🛡 재발 방지
- ...

## 📖 관련 SAP Note
- (알려진 경우)

참조

  • plugins/sap-mm/skills/sap-mm/SKILL.md
  • plugins/sap-fi/skills/sap-fi/SKILL.md (계정 결정 이슈)
  • agents/sap-fi-consultant.md (FI 측 깊은 분석 필요 시)
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 96 lines · 0 tokens per session scan A 91b91e96763e

Subscribe to this mod's changes

sap-migo-debug is a command published in the GitHub repository BoxLogoDev/sapstack (18 stars, last pushed 2d ago), licensed MIT. It adds 61 tokens to every session and 965 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other commands, from other repositories

eval-author

Draft a new eval case (eval/cases/ .json) + scaffold its golden folder, goldenpending until captured on the VM.

dynamics365ninja/d365fo-mcp-server · 28 tokens

eval-improve

Work the eval-loop corpus — rank failure clusters, fix the top actionable defect, validate against held-out, open a PR.

dynamics365ninja/d365fo-mcp-server · 25 tokens

eval-run

Run an eval case end-to-end on the VM (implement → build → score → record → roll back). VM/full-mode only.

dynamics365ninja/d365fo-mcp-server · 27 tokens

research-l2

Executes Phases 1-3 of the L2 process of the abapwiki knowledge base on a slice: launches the abap-functional-researcher sub-agent (gap discovery + multi-source auto-research: wiki -> raw/docs -> MCP abap-fs on the system read-only -> standard knowledge), ingests gaps and evidence, and generates questionnaires for…

Gixsy95/abap_wiki · 111 tokens

ingest-l0

L0 bootstrap of the abapwiki knowledge base: creates stubs for all custom objects from the TADIR. Use this skill to initialize the repo from scratch or to ingest a new TADIR export. Deterministic operations (no LLM sub-agent), idempotent.

Gixsy95/abap_wiki · 59 tokens

ingest-l1

L1 analysis loop for the abapwiki knowledge base: for each batch it launches the abap-analyzer sub-agent in parallel, then the adversarial judge abap-deepcheck (separate session), applies only the analyses that pass the fail-closed gate, and commits. Resumes exactly after an interruption. Use this skill to document…

Gixsy95/abap_wiki · 86 tokens