WM vs IM Stock Comparison Report
Short answer: A custom ALV report that compares inventory management stock per storage location (MARD) with the total of warehouse management quants (LQUA) by material, and explains the difference with stock in interim storage types and open transfer orders. Inventory control teams can tell whether a difference is real or just a movement still in progress.
- Estimated effort
- M · 3–5 working days
- System
- ECC and S/4HANA
- Tables
- 5
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
LX23 shows the differences between WM and IM and is used to clear them, but it does not show on the same line which interim storage type or open transfer order a difference comes from, and does not produce a daily comparison list suitable for Excel. At month-end close, the cause is usually searched manually across LX02, LT22 and MMBE.
Who uses it? Inventory controllers, warehouse managers and cost accounting teams.
Closest standard alternatives
Tables used
The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.
| Table | Role | Join | System |
|---|---|---|---|
| T320Assignment of IM Storage Location to WM Warehouse Number | Assignment of storage location to warehouse number | — | ECC + S/4 |
| MARDStorage Location Data for Material | IM stock per storage location: unrestricted, quality inspection, blocked (driving table) | MARD-WERKS = T320-WERKS AND MARD-LGORT = T320-LGORT | ECC + S/4 |
| LQUAQuants | WM quants; summed by material and storage location | LQUA-LGNUM = T320-LGNUM AND LQUA-MATNR = MARD-MATNR AND LQUA-WERKS = MARD-WERKS AND LQUA-LGORT = MARD-LGORT | ECC + S/4 |
| LTAPTransfer Order Item | Unconfirmed transfer order items; used to explain the difference | LTAP-LGNUM = T320-LGNUM AND LTAP-MATNR = MARD-MATNR AND LTAP-WERKS = MARD-WERKS | ECC + S/4 |
| MAKTMaterial Descriptions | Material description | MAKT-MATNR = MARD-MATNR AND MAKT-SPRAS = SY-LANGU | ECC + S/4 |
S/4HANA notes
- MARD → MATDOC: In S/4HANA stock quantities are no longer stored physically; reading MARD returns values calculated on the fly from MATDOC through a compatibility view. Reads still work, but test performance on very large selections.
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | MARD-WERKS | Yes | 1000 |
| S_LGORT | Storage location | Range / multiple | MARD-LGORT | No | 0001 |
| S_LGNUM | Warehouse number | Range / multiple | T320-LGNUM | No | 100 |
| S_MATNR | Material | Range / multiple | MARD-MATNR | No | FG-5003 |
| P_DIFF | Differences only | Checkbox | — | No | X |
| P_NOINT | Exclude interim stock from WM total | Checkbox | — | No | — |
Output columns
| # | Column | Source |
|---|---|---|
| 1 | Plant | MARD-WERKS |
| 2 | Stor. location | MARD-LGORT |
| 3 | Warehouse | T320-LGNUM |
| 4 | Material | MARD-MATNR |
| 5 | Description | MAKT-MAKTX |
| 6 | Unrestricted | MARD-LABST |
| 7 | In QI | MARD-INSME |
| 8 | Blocked | MARD-SPEME |
| 9 | IM total | Calculated MARD-LABST + MARD-INSME + MARD-SPEME |
| 10 | WM total | Calculated Σ LQUA-GESME (material, plant, storage location) |
| 11 | In interim | Calculated Σ LQUA-GESME, storage type 9xx |
| 12 | Open TO qty | Calculated Σ LTAP-VSOLM, LTAP-PQUIT blank |
| 13 | Difference | Calculated WM total − IM total |
| 14 | Unit | LQUA-MEINS |
| 15 | Explanation | Calculated "Movement in progress" if the difference is covered by interim stock or an open TO, otherwise "To be checked" |
Sample output
| Plant | Stor. location | Warehouse | Material | Description | Unrestricted | In QI | Blocked | IM total | WM total | In interim | Open TO qty | Difference | Unit | Explanation |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1000 | 0001 | 100 | FG-5003 | Packed product C | 1,240 | 0 | 0 | 1,240 | 1,264 | 24 | 24 | 24 | PC | Movement in progress |
| 1000 | 0001 | 100 | RM-1002 | Stretch film 50 cm | 3,850 | 300 | 0 | 4,150 | 4,150 | 300 | 0 | 0 | KG | Matched |
| 1000 | 0002 | 100 | FG-6200 | Detergent 5 kg | 612 | 0 | 20 | 632 | 620 | 0 | 0 | -12 | CAR | To be checked |
How does the report work?
- For the selected plant and storage locations, the linked warehouse number is determined from T320; storage locations not linked to WM are skipped.
- Unrestricted (LABST), quality inspection (INSME) and blocked (SPEME) stock are read from MARD; IM total = LABST + INSME + SPEME.
- LQUA quants are summed by material, plant and storage location (GESME). Quants in storage types starting with 9 are also written to the “in interim” column.
- The target quantity of unconfirmed LTAP items is summed as the open transfer order quantity.
- Difference = WM total − IM total. With “Differences only”, rows with zero difference are dropped; the explanation column states whether the difference is covered by interim stock or an open transfer order.
Performance notes
Get the LQUA totals in the database with SUM and GROUP BY; do not bring quant rows to the application server. Restrict MARD by plant and storage location. For large warehouses, run the report overnight in the background before closing.
Features
- ALV list (sort, filter, subtotals)
- User-specific layout variants
- Double-click drill-down to the document Double-clicking a material opens the quant list in LX02.
- Export to Excel
- Runs as a background job
- Send the result by email Differences can be sent to the inventory control team before closing.
Authorization objects
- L_LGNUMDisplay authorization by warehouse number and storage type
- M_MSEG_LGOStock display authorization by plant and storage location
Frequently asked questions
Why is stock in interim storage types shown separately?
Quants in goods receipt, shipping and difference interim types (such as 902, 916, 999) are already posted in IM but not yet moved to a physical bin. The separate column helps tell a real stock error from an unfinished movement.
Are special stocks (consignment, sales order) included?
The default comparison covers company-owned stock. If consignment or project stock is used, the scope can be extended with LQUA-SOBKZ and the related special stock tables (such as MKOL, MSKA).
Does the report clear differences automatically?
No, the report only reads. Real differences are cleared through the standard process with LI20 and LX23; the report shows which rows need that step.
Packages that include this solution
Physical Inventory Count and Difference Pack
A four-component pack that runs a count campaign from start to finish: storage bins due for counting, bulk entry of count results from handheld …
Warehouse Operations Control Pack
A five-report pack that shows daily warehouse health per warehouse number: unconfirmed transfer orders, stock stuck in interim storage and negative …
Related reports
MB52 – List of Warehouse Stocks on Hand
MB52 is the standard SAP report (program RM07MLBS) that lists current material stocks per plant and storage location by stock type, together with …
Interim Storage Stuck and Negative Stock Report
A custom ALV report that lists quants in goods receipt, shipping, posting change and difference interim storage types that have been waiting longer …
Let us build this report for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.