# WM vs IM Stock Comparison Report

> 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.

- Type: Report, Custom development, ALV report
- Module: WM
- Estimated effort: M (3–5 working days)
- Last updated: 2026-11-17
- URL: https://nekuhub.com/en/reports/wm-vs-im-stock-comparison-report/


## 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.

### Closest standard alternatives

- LX23: Shows and clears WM-IM differences; does not relate the difference to interim stock or open transfer orders on the same line.
- LX02: Lists WM stock per quant; does not compare it with IM stock.

## Tables used

| Table | Role | Access | Join | System |
|---|---|---|---|---|
| T320 | Assignment of storage location to warehouse number | Read | - | ECC + S/4 |
| MARD | IM stock per storage location: unrestricted, quality inspection, blocked (driving table) | Read | MARD-WERKS = T320-WERKS AND MARD-LGORT = T320-LGORT | ECC + S/4 |
| LQUA | WM quants; summed by material and storage location | Read | LQUA-LGNUM = T320-LGNUM AND LQUA-MATNR = MARD-MATNR AND LQUA-WERKS = MARD-WERKS AND LQUA-LGORT = MARD-LGORT | ECC + S/4 |
| LTAP | Unconfirmed transfer order items; used to explain the difference | Read | LTAP-LGNUM = T320-LGNUM AND LTAP-MATNR = MARD-MATNR AND LTAP-WERKS = MARD-WERKS | ECC + S/4 |
| MAKT | Material description | Read | MAKT-MATNR = MARD-MATNR AND MAKT-SPRAS = SY-LANGU | ECC + S/4 |

## Selection screen parameters

| Parameter | Description | Type | Reference field | Required |
|---|---|---|---|---|
| S_WERKS | Plant | Range / multiple | MARD-WERKS | Yes |
| S_LGORT | Storage location | Range / multiple | MARD-LGORT | No |
| S_LGNUM | Warehouse number | Range / multiple | T320-LGNUM | No |
| S_MATNR | Material | Range / multiple | MARD-MATNR | No |
| P_DIFF | Differences only | Checkbox | - | No |
| P_NOINT | Exclude interim stock from WM total | Checkbox | - | No |

## Output columns

| Column | Source |
|---|---|
| Plant | MARD-WERKS |
| Stor. location | MARD-LGORT |
| Warehouse | T320-LGNUM |
| Material | MARD-MATNR |
| Description | MAKT-MAKTX |
| Unrestricted | MARD-LABST |
| In QI | MARD-INSME |
| Blocked | MARD-SPEME |
| IM total | Calculated: MARD-LABST + MARD-INSME + MARD-SPEME |
| WM total | Calculated: Σ LQUA-GESME (material, plant, storage location) |
| In interim | Calculated: Σ LQUA-GESME, storage type 9xx |
| Open TO qty | Calculated: Σ LTAP-VSOLM, LTAP-PQUIT blank |
| Difference | Calculated: WM total − IM total |
| Unit | LQUA-MEINS |
| Explanation | Calculated: "Movement in progress" if the difference is covered by interim stock or an open TO, otherwise "To be checked" |

## How does the report work?

1. For the selected plant and storage locations, the linked warehouse number is determined from T320; storage locations not linked to WM are skipped.
2. Unrestricted (LABST), quality inspection (INSME) and blocked (SPEME) stock are read from MARD; IM total = LABST + INSME + SPEME.
3. 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.
4. The target quantity of unconfirmed LTAP items is summed as the open transfer order quantity.
5. 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.

## Authorization objects

- L_LGNUM: Display authorization by warehouse number and storage type
- M_MSEG_LGO: Stock 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.

---
Let us build this report for your system: https://nekuhub.com/en/request-a-quote/?report=wm-im-stock-comparison
