MM Report Custom development ALV report

Material Document and Stock Movement Analysis Report by Movement Type, Storage Location and User

Short answer: A custom ALV report that lists material documents with movement type, storage location, user and account assignment (cost center, order), matches reversed movements with their reversal documents to give the net quantity, shows the value and the reason for movement and flags back-dated postings. Warehouse, cost accounting and internal audit teams summarize stock movements in one list and find unusual postings quickly.

Estimated effort
M · 5–7 working days
System
ECC and S/4HANA
Tables
6
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

MB51 lists material document items, but it does not match a reversed movement with its reversal document to show the net movement, does not flag the gap between posting date and entry date (back-dated postings) and gives no ready summary by movement type, user and day. MB5B gives opening and closing stock balances but does not analyze movements by user and account assignment. The custom report brings these checks together on one screen.

Who uses it? Warehouse supervisors, inventory control, cost accounting and internal audit teams.

Closest standard alternatives

  • MB51 Material Document List. Lists material documents; no reversal matching, no back-dated posting flag and no user/day summary.
  • MB5B Stocks for Posting Date. Gives opening and closing stock with movements; does not analyze by user or account assignment.

Tables used

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

TableRoleJoinSystem
MKPFMaterial Document HeaderDocument header: posting and entry date, user (driving table)—ECC only
MSEGMaterial Document ItemDocument items: movement type, quantity, value, account assignment, reversal referenceMSEG-MBLNR = MKPF-MBLNR AND MSEG-MJAHR = MKPF-MJAHRECC only
MATDOCMaterial Documents (S/4HANA)In S/4HANA gives header and item fields in a single table—S/4HANA only
T156Movement TypeMovement type attributes and reversal movement typeT156-BWART = MSEG-BWARTECC + S/4
MAKTMaterial DescriptionsMaterial descriptionMAKT-MATNR = MSEG-MATNR AND MAKT-SPRAS = SY-LANGUECC + S/4
T001LStorage LocationsStorage location nameT001L-WERKS = MSEG-WERKS AND T001L-LGORT = MSEG-LGORTECC + S/4

S/4HANA notes

  • MKPF → MATDOC: In S/4HANA new material documents are written to MATDOC; reading MKPF works through a compatibility view. Use MATDOC or I_MaterialDocumentItem_2 directly in new reports.
  • MSEG → MATDOC: In S/4HANA MATDOC replaces MSEG; reading MSEG works through a compatibility view but is slow at high volumes.

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_BUDATPosting dateRange / multipleMKPF-BUDATYes01.11.2026 – 16.11.2026
S_WERKSPlantRange / multipleMSEG-WERKSYes1000
S_LGORTStorage locationRange / multipleMSEG-LGORTNo0001
S_BWARTMovement typeRange / multipleMSEG-BWARTNo201, 261, 551, 701
S_MATNRMaterialRange / multipleMSEG-MATNRNoHM-1001
S_USNAMUserRange / multipleMKPF-USNAMNoDEPO01
P_BACKDBack-dated posting threshold (days)Single value—No3
P_NOREVHide reversed movement pairsCheckbox—No—
R_SUMMSummary view (movement type, user, day)Radio button—No—

Output columns

#ColumnSource
1Material documentMSEG-MBLNR
2ItemMSEG-ZEILE
3Posting dateMKPF-BUDAT
4Entry dateMKPF-CPUDT
5UserMKPF-USNAM
6Movement typeMSEG-BWART
7MaterialMSEG-MATNR
8Material descriptionMAKT-MAKTX
9Storage locationMSEG-LGORT
10Quantity (signed)Calculated MSEG-MENGE; negative if SHKZG = H
11UnitMSEG-MEINS
12ValueMSEG-DMBTR
13Cost centerMSEG-KOSTL
14Reason for movementMSEG-GRUND
15Reversal statusCalculated Reversed (with reversal document), reversal document or blank
16Back-datedCalculated CPUDT − BUDAT > threshold days

Sample output

Material documentItemPosting dateEntry dateUserMovement typeMaterialMaterial descriptionStorage locationQuantity (signed)UnitValueCost centerReason for movementReversal statusBack-dated
4900031177111/12/202611/12/2026DEPO02311SC-3300Sac levha 2 mm0003350KG28,350No
4900031190110/31/202611/04/2026MALIYET1201SP-0045Rulman 62040001-12ST1,8604110Yes (4 days)
4900031201111/13/202611/13/2026DEPO01551HM-1001Polipropilen granül0001-40KG3,4800002Reversed (4900031215)No
4900031215111/13/202611/13/2026DEPO01552HM-1001Polipropilen granül000140KG3,480Reversal documentNo
A view built with fictional sample data; not real system data.

How does the report work?

  1. MKPF and MSEG are read by posting date, plant, storage location, movement type, material and user; in S/4HANA the same fields are read directly from MATDOC.
  2. Movement type attributes and text come from T156 and its text table, the material description from MAKT and the storage location name from T001L.
  3. Reversal matching: items with SMBLN, SJAHR and SMBLP filled are reversal documents; the reversed original item is found and both lines are flagged. The net quantity is the debit/credit-signed (SHKZG) quantity total of movements that were not reversed.
  4. The value comes from MSEG-DMBTR; the account assignment (cost center, order) and the reason for movement (GRUND) are shown on the same line.
  5. Back-dated posting: if the number of days between entry date (CPUDT) and posting date (BUDAT) exceeds the threshold parameter, the line is flagged; postings made to a previous period after closing become visible this way.
  6. The report opens with a detail and a summary view: the summary totals document count, quantity and value by movement type, user and day.

Performance notes

Start the selection with posting date and plant; the MKPF-BUDAT index and the MBLNR/MJAHR key of MSEG are used. For selection by material, check that an MATNR/WERKS index exists on MSEG. In S/4HANA MATDOC is a single table, so no join is needed and the summary view can be aggregated in the database.

Features

  • ALV list (sort, filter, subtotals)
  • User-specific layout variants
  • Double-click drill-down to the document Double-clicking the document number displays the material document in MIGO.
  • Export to Excel
  • Runs as a background job

Authorization objects

  • M_MSEG_WMBMaterial document display authorization by plant
  • M_MSEG_BWAAuthorization by movement type
  • M_MSEG_LGOAuthorization by storage location

Frequently asked questions

How are reversed movements matched?

The reversal document item holds the number, year and item of the original document (SMBLN, SJAHR, SMBLP). The report uses this link to find the original item, flags both lines and can leave them out of the net calculation and the list.

Why do back-dated postings matter?

A stock movement posted to an earlier date after month-end closing changes the stock and cost figures of a closed period. Since postings above the threshold are flagged, the audit team can review them per user.

Does it work on S/4HANA?

Yes. In S/4HANA the report reads directly from MATDOC and aggregates the summary view in the database. If clean core is preferred, I_MaterialDocumentItem_2 can be used.

Related reports

MM Report Custom ALV report

Stock Aging Report

A custom ALV report that shows how many days each material has been in stock since its last goods receipt and which age bucket (0–30, 31–90, 91–180, …

MARD · MARA · MAKT · MBEW

MM Report Custom ALV report

Stock in Transit Between Plants Aging Report

A custom ALV report that lists quantities issued from the supplying plant with stock transport orders but not yet received in the receiving plant, …

EKKO · EKPO · EKBE · MSEG

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: Material Document and Stock Movement Analysis Report by Movement Type, Storage Location and User