WM Report Custom development ALV report

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

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

Tables used

The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.

TableRoleJoinSystem
T320Assignment of IM Storage Location to WM Warehouse NumberAssignment of storage location to warehouse number—ECC + S/4
MARDStorage Location Data for MaterialIM stock per storage location: unrestricted, quality inspection, blocked (driving table)MARD-WERKS = T320-WERKS AND MARD-LGORT = T320-LGORTECC + S/4
LQUAQuantsWM quants; summed by material and storage locationLQUA-LGNUM = T320-LGNUM AND LQUA-MATNR = MARD-MATNR AND LQUA-WERKS = MARD-WERKS AND LQUA-LGORT = MARD-LGORTECC + S/4
LTAPTransfer Order ItemUnconfirmed transfer order items; used to explain the differenceLTAP-LGNUM = T320-LGNUM AND LTAP-MATNR = MARD-MATNR AND LTAP-WERKS = MARD-WERKSECC + S/4
MAKTMaterial DescriptionsMaterial descriptionMAKT-MATNR = MARD-MATNR AND MAKT-SPRAS = SY-LANGUECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
S_WERKSPlantRange / multipleMARD-WERKSYes1000
S_LGORTStorage locationRange / multipleMARD-LGORTNo0001
S_LGNUMWarehouse numberRange / multipleT320-LGNUMNo100
S_MATNRMaterialRange / multipleMARD-MATNRNoFG-5003
P_DIFFDifferences onlyCheckbox—NoX
P_NOINTExclude interim stock from WM totalCheckbox—No—

Output columns

#ColumnSource
1PlantMARD-WERKS
2Stor. locationMARD-LGORT
3WarehouseT320-LGNUM
4MaterialMARD-MATNR
5DescriptionMAKT-MAKTX
6UnrestrictedMARD-LABST
7In QIMARD-INSME
8BlockedMARD-SPEME
9IM totalCalculated MARD-LABST + MARD-INSME + MARD-SPEME
10WM totalCalculated Σ LQUA-GESME (material, plant, storage location)
11In interimCalculated Σ LQUA-GESME, storage type 9xx
12Open TO qtyCalculated Σ LTAP-VSOLM, LTAP-PQUIT blank
13DifferenceCalculated WM total − IM total
14UnitLQUA-MEINS
15ExplanationCalculated "Movement in progress" if the difference is covered by interim stock or an open TO, otherwise "To be checked"

Sample output

PlantStor. locationWarehouseMaterialDescriptionUnrestrictedIn QIBlockedIM totalWM totalIn interimOpen TO qtyDifferenceUnitExplanation
10000001100FG-5003Packed product C1,240001,2401,264242424PCMovement in progress
10000001100RM-1002Stretch film 50 cm3,85030004,1504,15030000KGMatched
10000002100FG-6200Detergent 5 kg61202063262000-12CARTo be checked
A view built with fictional sample data; not real system data.

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.

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

WM Package Custom

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 …

4 components · v1.0

WM Package Custom

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 …

5 components · v1.0

Related reports

MM Report Standard ALV report

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 …

MARD · MARA · MAKT · MBEW

WM Report Custom ALV report

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 …

LQUA · LTBP · LTBK · LTAP

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.

Related report: WM vs IM Stock Comparison Report