Process goods receipts (MIGO) with movement types 101, 103, 105
✓Works with OpenClaudeYou are an SAP MM (Materials Management) specialist. The user wants to process goods receipts using transaction MIGO with specific movement types (101, 103, 105) and automate or validate the posting workflow.
What to check first
- Verify the material master (MM01) exists with active purchasing view for the material
- Check purchase order (PO) in ME23N — confirm goods receipt not yet fully posted and item status allows GR
- Run
SE16Non table EKPO to verify PO line item and MENGE_EINGEGANGEN (qty received) vs. MENGE (ordered qty) - Confirm warehouse bin/storage location (LGORT) is configured in MM01 for the receiving plant
Steps
- Open transaction MIGO in SAP (or use BAPI_GOODSRECEIPT_CREATE for automation) — this is the standard goods receipt transaction
- Select movement type: enter 101 (GR for PO), 103 (GR for PO – return to vendor), or 105 (GR without PO/stock transfer) in the initial screen
- For movement type 101: enter purchase order number (EBELN) and PO line item (EBELP); SAP auto-populates material, qty ordered, and storage location
- For movement type 103: enter PO data but reverse the quantity (post negative) to return goods to supplier — verify credit memo linkage
- For movement type 105: enter material number directly, reference document (optional), plant, storage location, and quantity — no PO reference required
- Inspect the Batch field — if material is batch-managed (STKME batch checkbox in MM01), batch number is mandatory; create new batch in MSC1N if needed
- Verify serial number field if material requires serial tracking (SERME flag in MM01) — scan or manually enter serial numbers matching the physical goods
- Post the goods receipt (CTRL+S or click Post button) — SAP creates MIGO document and updates MSEG (material document), stock in warehouse is incremented, GR/IR clearing account is updated
Code
*& Goods Receipt BAPI Processing - Movement Types 101, 103, 105
*& Called from SE37 or custom program
REPORT zgr_goods_receipt.
DATA: lt_goodsreceipt_item TYPE TABLE OF bapigr_item,
lt_goodsreceipt_seritem TYPE TABLE OF bapigr_seritem,
ls_goodsreceipt_header TYPE bapigr_header,
ls_return TYPE bapiret2,
lt_return TYPE TABLE OF bapiret2,
lv_materialdocument TYPE mkpf-mblnr,
lv_matdocumentyear TYPE mkpf-mjahr.
PARAMETERS: p_movement TYPE bapigr_item-move_type DEFAULT '101',
p_ebeln TYPE ekko-ebeln,
p_e
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related SAP Skills
Other Claude Code skills in the same category — free to download.
ABAP Developer
Write clean ABAP code with modern syntax, CDS views, and best practices
SAP Fiori App
Build SAP Fiori applications with SAPUI5 and Fiori Elements
SAP BTP Setup
Set up and deploy applications on SAP Business Technology Platform
SAP HANA Query
Write and optimize SAP HANA SQL queries and calculation views
SAP OData Service
Create and consume OData services in SAP (V2 and V4)
SAP RFC Connector
Connect to SAP via RFC/BAPI from external applications
SAP CDS Model
Create Core Data Services models and annotations for SAP
SAP CAP App
Build full-stack applications with SAP Cloud Application Programming Model
Want a SAP skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.