SAP MM — Materials Management Complete Guide
In this tutorial, you'll learn about SAP MM. We cover key concepts, practical examples, and best practices.
SAP MM (Materials Management) handles procurement, inventory, and invoice verification in SAP S/4HANA, from purchase requisition to vendor payment.
What You'll Learn
SAP MM controls how companies buy materials, manage stock, move goods between locations, and pay vendors — all integrated with finance and sales.
Why It Matters
Every physical product a company sells must first be purchased, stored, and tracked. Without MM, inventory goes missing, suppliers get paid wrong amounts, and production lines stop because parts aren't available.
Durga Antivirus Pro applies MM-style inventory tracking to manage virus definition versions and license key pools — each license is a "material" with quantity, location, and valuation data.
Real-World Use
A car manufacturer needs 500 tires today. Without MM: someone calls the warehouse, hopes they have stock, manually emails a purchase order if not, and accounting figures out the cost later. With MM: the system checks real-time stock, auto-creates a purchase requisition when stock is low, tracks the PO through delivery and invoice, and posts the cost to the correct GL account — all without a single phone call.
Learning Path
flowchart LR A[SAP Overview] --> B[SAP Modules] B --> C[SAP MM
You are here] C --> D[SAP SD] D --> E[SAP HR/HCM]
What Is SAP MM?
SAP MM manages everything related to materials — from raw ingredients for a factory to finished goods in a warehouse to the office supplies on your desk. It covers the complete procure-to-pay cycle.
Think of MM as the company's shopping and stockroom system. It answers three questions: What do we need? How much do we have? How much does it cost?
Core Submodules
| Submodule | Purpose |
|---|---|
| Procurement | Purchase requisitions, purchase orders, source determination |
| Inventory Management | Goods receipts, goods issues, stock transfers, physical inventory |
| Invoice Verification | Match PO, goods receipt, and invoice — three-way match |
| Material Valuation | Moving average price vs standard price for inventory costing |
| Master Data | Material master, vendor master, purchasing info records |
Procurement: The Procure-to-Pay Process
Procurement is the heart of MM. Here is the end-to-end flow:
flowchart LR A[Purchase
Requisition] --> B[Source
Determination] B --> C[Purchase
Order] C --> D[Goods
Receipt] D --> E[Invoice
Verification] E --> F[Payment]
Step 1: Purchase Requisition
A purchase requisition (PR) is an internal request to buy something. It can be created manually or automatically by the system when stock falls below the reorder point.
* ABAP: Create a purchase requisition using BAPI
DATA: ls_requisition TYPE bapirequis,
ls_requisition_item TYPE bapirequis_item,
lt_return TYPE TABLE OF bapiret2.
ls_requisition-pr_number = '0045000010'.
ls_requisition_item-material = 'MAT-100'.
ls_requisition_item-quantity = 500.
ls_requisition_item-plant = 'PL01'.
ls_requisition_item-delivery_date = '20261231'.
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
EXPORTING
requisition = ls_requisition
TABLES
return = lt_return.
* Output: PR 0045000010 created for material MAT-100
Step 2: Purchase Order (ME21N)
A buyer converts the PR into a purchase order (PO) sent to the vendor. The PO is a legally binding contract.
Key fields:
- Vendor: Who you're buying from
- Material: What you're buying
- Quantity: How many units
- Net Price: Agreed unit price
- Plant: Where the goods will be delivered
Step 3: Goods Receipt (MIGO)
When the vendor delivers, the warehouse posts a goods receipt (GR). This:
- Increases inventory quantity
- Updates inventory value in FI
- Creates a material document for audit trail
- Releases the PO for invoice verification
* ABAP: Post goods receipt using BAPI_GOODSMVT_CREATE
DATA: ls_goodsmvt TYPE bapi2017_gm_head_01,
lt_item TYPE TABLE OF bapi2017_gm_item_create,
lt_return TYPE TABLE OF bapiret2.
ls_goodsmvt-pstng_date = sy-datum.
ls_goodsmvt-doc_date = sy-datum.
lt_item = VALUE #( ( material = 'MAT-100'
plant = 'PL01'
entry_qnt = 500
move_type = '101'
stge_loc = 'WH01' ) ).
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = ls_goodsmvt
goodsmvt_code = '01'
TABLES
goodsmvt_item = lt_item
return = lt_return.
* Output: Material document 5000000010 posted
Step 4: Invoice Verification (MIRO)
The vendor sends an invoice. The AP clerk enters it. SAP performs a three-way match:
| Element | Source | Matches? |
|---|---|---|
| PO quantity | Purchase order | Yes |
| GR quantity | Goods receipt | Yes |
| Invoice quantity | Vendor invoice | Yes |
| PO price | Purchase order | Yes |
| Invoice price | Vendor invoice | Yes |
If everything matches, the invoice is released for payment. If not, it's blocked for review.
Step 5: Payment (F110)
FI runs automatic payment (F110) to pay the vendor. The material lifecycle is complete.
Inventory Management
MM tracks inventory in two dimensions: quantity (how many units) and value (how much money is tied up).
Movement Types
Every goods movement uses a movement type that determines the accounting impact:
| Movement Type | Description | FI Impact |
|---|---|---|
| 101 | Goods receipt for PO | Inventory increase, GR/IR clearing |
| 102 | Goods receipt reversal | Inventory decrease, GR/IR reversal |
| 201 | Goods issue for cost center | Expense increase, inventory decrease |
| 202 | Goods issue reversal | Expense reversal, inventory increase |
| 311 | Stock transfer (storage to storage) | No FI impact (same plant) |
| 601 | Goods issue for delivery | COGS increase, inventory decrease |
Physical Inventory
Companies must periodically count actual stock and compare it to the system quantity. SAP supports:
- Cycle counting: Count different materials on different days
- Annual inventory: Count everything at year-end
- Continuous inventory: Count on every movement
* ABAP: Create physical inventory document
DATA: ls_physinv TYPE bapi_physinv_create,
lt_items TYPE TABLE OF bapi_physinv_item,
lt_return TYPE TABLE TABLE OF bapiret2.
ls_physinv-plant = 'PL01'.
ls_physinv-stge_loc = 'WH01'.
lt_items = VALUE #( ( material = 'MAT-100'
count_quantity = 492
unit_of_entry = 'EA' ) ).
CALL FUNCTION 'BAPI_MAT_PHYSINV_CREATE'
EXPORTING
head = ls_physinv
TABLES
items = lt_items
return = lt_return.
* Output: Physical inventory document 1000000001 created
* Difference: 8 units (system showed 500, count shows 492)
Material Valuation
SAP supports two valuation methods:
| Method | Best For | How It Works |
|---|---|---|
| Moving Average Price (MAP) | Volatile prices | Updates automatically with each goods receipt |
| Standard Price (STD) | Stable prices + manufacturing | Fixed price; variances go to price difference accounts |
Valuation Classes
Valuation classes link materials to GL accounts. When you post a goods movement, MM knows which account to debit and credit based on the valuation class + movement type combination.
Security Angle
SAP MM has critical authorization controls:
- Document release strategy: Large POs require manager approval
- Invoice blocking: Price variances beyond a tolerance percent are automatically blocked
- Segregation of duties: A buyer cannot also be an AP clerk
Doda Browser uses MM-style release strategies for extension publishing — an extension submission requires separate approval from a reviewer, preventing unauthorized code from reaching users.
Common Errors
1. Three-Way Match Failure
Invoice quantity or price doesn't match the PO or GR. The invoice gets blocked. Solution: check tolerance limits in OMR2 configuration.
2. Movement Type 101 with No PO Reference
You cannot post a goods receipt without a purchase order for stock materials. Create a PO first, or use a different movement type (561 for initial stock upload).
3. Valuation Class Missing from Material Master
If the valuation class is blank in material master view (accounting view 1), MM cannot determine which GL account to post to. Maintain it in MM01.
4. Stock Transfer Across Company Codes
A simple 311 movement type only works within one plant. For inter-company transfers, you need stock transport orders (ME21N with special procurement type).
5. Invoice Receipt Before Goods Receipt
MIRO allows invoice-before-goods-receipt if configured, but it creates a "goods receipt not yet posted" indicator. This must be resolved before payment runs.
6. Negative Stock Allowed
If "negative stock" is enabled in the material master, you can issue goods you don't physically have. This hides real shortages unless monitored.
Practice Questions
What is the three-way match in SAP MM? The matching of purchase order quantity, goods receipt quantity, and invoice quantity/price. All three must align for automatic payment release.
What transaction code creates a purchase order? ME21N. The buyer selects a vendor, material, quantity, price, and plant.
What is the difference between moving average price and standard price? MAP recalculates the unit price after every goods receipt. Standard price is fixed; purchase price variances go to separate GL accounts.
What movement type is used for goods receipt against a PO? 101. It increases inventory and credits the GR/IR clearing account.
What is a purchase requisition? An internal document requesting the purchase of materials or services. It triggers the procurement process but is not legally binding.
Challenge: A vendor delivers 100 units at $12/unit, but the PO was for 100 units at $10/unit. The GR has already posted. Walk through the invoice verification steps. Will the invoice be blocked? What tolerances apply?
Real-World Task: You are setting up MM for a bike manufacturer. Create a material master for a bicycle frame (valuation class 7900), create a PO for 200 frames from vendor VENDOR-001, post the goods receipt, and enter the invoice for $15,000.
What's Next
| Tutorial | What You'll Learn |
|---|---|
| SAP Overview — Complete Guide | Foundational SAP ERP concepts |
| SAP SD — Sales and Distribution Guide | How SD integrates with MM for order fulfillment |
| SAP ABAP Programming | Write ABAP programs to extend MM functionality |
Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. Updated 2026-06-21.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro