CO Report Custom development ALV report

Material Quantity and Value Reconciliation Report (Opening, Receipts, Issues, Closing)

Short answer: A custom ALV report that shows, for each material and the selected periods, opening stock, receipts, issues and closing stock in quantity and value side by side and checks the equation "opening + receipts − issues = closing". Value differences that break the equation (price changes, invoice differences, revaluations) appear in a separate column.

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

Why is the standard not enough?

MB5B shows stock on a date and the movements in between, but it does not total receipts and issues by type (purchasing, production, consumption, sales, scrap) and does not check the quantity and value equation. MC.9 and CKM3 serve other purposes. At month-end close the reconciliation is usually built by combining several reports in Excel. The custom report gives the reconciliation and the difference on one line.

Who uses it? Cost accounting, financial control, inventory management and audit teams.

Closest standard alternatives

  • MB5B Stocks for Posting Date. Shows stock on a posting date and the movements in between; no movement type groups and no reconciliation difference.
  • MC.9 Material Analysis: Stock. Gives total receipts and issues in the stock analysis; does not show the value reconciliation or the source of the difference.
  • CKM3 Material Price Analysis. Gives the price history of one material where material ledger is used; it is not a multi-material reconciliation list.

Tables used

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

TableRoleJoinSystem
MBEWMaterial ValuationCurrent stock quantity and value, valuation class (driving table)—ECC + S/4
MBEWHMaterial Valuation: HistoryHistory of period-end stock quantity and valueMBEWH-MATNR = MBEW-MATNR AND MBEWH-BWKEY = MBEW-BWKEYECC + S/4
MSEGMaterial Document ItemGoods movements in the periods: quantity, value, movement typeMSEG-MATNR = MBEW-MATNR AND MSEG-WERKS = MBEW-BWKEYECC + S/4
MKPFMaterial Document HeaderPosting date of the material documentMKPF-MBLNR = MSEG-MBLNR AND MKPF-MJAHR = MSEG-MJAHRECC + S/4
T156Movement TypeMovement type attributes (for receipt/issue grouping)T156-BWART = MSEG-BWARTECC + S/4
MAKTMaterial DescriptionsMaterial descriptionMAKT-MATNR = MBEW-MATNRECC + S/4
MATDOCMaterial Documents (S/4HANA)Material documents on S/4HANA instead of MSEG/MKPFMATDOC-MATNR = MBEW-MATNRS/4HANA only
ACDOCAUniversal Journal Entry Line ItemsStock value changes without goods movements on S/4HANAACDOCA-MATNR = MBEW-MATNRS/4HANA only

S/4HANA notes

  • MBEW: In S/4HANA the Material Ledger is mandatory and valuation data is read through a compatibility view. Prices remain readable; validate value calculations against the currency and valuation view in use.
  • MBEWH: In S/4HANA MBEWH is read through the compatibility view MBVMBEWH; the history values are no longer persisted in a separate table. Reading code keeps working, but nothing should write to the table directly.
  • MSEG → MATDOC: In S/4HANA MATDOC replaces MSEG; reading MSEG works through a compatibility view but is slow at high volumes.
  • 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.

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
S_BWKEYValuation areaRange / multipleMBEW-BWKEYYes1000
S_MATNRMaterialRange / multipleMBEW-MATNRNoRM-*
S_BKLASValuation classRange / multipleMBEW-BKLASNo3000
P_GJAHRFiscal yearSingle valueMBEWH-LFGJAYes2026
P_PERFRFrom periodSingle valueMBEWH-LFMONYes10
P_PERTOTo periodSingle valueMBEWH-LFMONYes10
P_DIFFOnly materials with a differenceCheckbox—No—

Output columns

#ColumnSource
1Valuation areaMBEW-BWKEY
2MaterialMBEW-MATNR
3DescriptionMAKT-MAKTX
4Valuation classMBEW-BKLAS
5Opening quantityMBEWH-LBKUM
6Opening valueMBEWH-SALK3
7Receipt quantityCalculated Σ MSEG-MENGE, receipt movement types
8Receipt valueCalculated Σ MSEG-DMBTR, receipt movement types
9Issue quantityCalculated Σ MSEG-MENGE, issue movement types
10Issue valueCalculated Σ MSEG-DMBTR, issue movement types
11Closing quantityCalculated MBEWH-LBKUM for the end period; MBEW-LBKUM if there is no record
12Closing valueCalculated MBEWH-SALK3 for the end period; MBEW-SALK3 if there is no record
13Quantity differenceCalculated Opening + receipts − issues − closing (quantity)
14Value differenceCalculated Opening + receipts − issues − closing (value)

Sample output

Valuation areaMaterialDescriptionValuation classOpening quantityOpening valueReceipt quantityReceipt valueIssue quantityIssue valueClosing quantityClosing valueQuantity differenceValue difference
1000RM-1001Cotton yarn Ne 30/1300012,5001,125,00020,0001,840,00018,0001,638,00014,5001,327,00000
1000RM-2040Reactive dyestuff navy30304,200252,0003,000195,0003,600223,2003,600231,0000-7,200
1000KMS-24017Jacquard upholstery fabric 280 g/m²79208,4001,470,00012,6002,205,00014,1002,467,5006,9001,207,50000
2000PK-0101Carton 60x40x40305025,00075,00010,00031,00012,00036,60023,00069,40000
A view built with fictional sample data; not real system data.

How does the report work?

  1. Materials are selected by valuation area (MBEW-BWKEY, usually the plant), material and valuation class (BKLAS).
  2. Opening quantity and value are the values at the end of the period before the start period: the first MBEWH record for that period or later (LBKUM, SALK3) is taken; if there is none, the current value in MBEW is used. Closing values are found with the same rule for the end period.
  3. Movements in the periods are read from MSEG/MKPF by posting date (MKPF-BUDAT). Movement types are split by a settings list into receipts (purchasing 101, production receipt 101 with order, returns) and issues (consumption for production 261, sales 601, issue to cost center 201, scrap 551, plant-to-plant transfer); reversals fall into the same group with the opposite sign.
  4. Quantity comes from MSEG-MENGE and value from MSEG-DMBTR; the debit/credit indicator (SHKZG) decides receipt or issue. Storage location transfers within the same valuation area (311) are left out because they do not change value.
  5. Difference = opening + receipts − issues − closing. The quantity difference is normally zero; a value difference comes from postings that change stock value without a goods movement (price change, invoice difference posted to stock, material ledger closing).
  6. On S/4HANA movements can be read from MATDOC and values from the material ledger and ACDOCA; the report structure does not change.

Performance notes

Limit MSEG by valuation area and posting date; apply the date filter through MKPF or, on S/4HANA, directly on MATDOC. Do the movement type grouping with aggregation (GROUP BY) in the database. For large company codes run the report in the background.

Features

  • ALV list (sort, filter, subtotals)
  • User-specific layout variants
  • Double-click drill-down to the document Double-clicking a receipt or issue amount opens the related material documents in MB51.
  • Export to Excel
  • Runs as a background job It can run in the background at month-end close and send the result to the control team.

Authorization objects

  • M_MSEG_WMBMaterial document display authorization by plant
  • M_MATE_WRKAuthorization to display material and valuation data by plant

Frequently asked questions

Why does the quantity reconcile but the value does not?

A value difference comes from postings that change stock value without a goods movement: a material price change, a price difference posted to stock at invoice, or the material ledger period closing. The report shows this difference in a separate column; to find its source, accounting documents outside material documents can also be listed.

Can the movement type groups be changed?

Yes. Which movement type falls into which receipt or issue group is kept in a settings list. The company's own movement types are added during setup.

Does it work on S/4HANA?

Yes. MSEG, MKPF and MBEWH can be read as compatibility views on S/4HANA; for better performance movements are read directly from MATDOC. Value differences can be explained with the material lines in ACDOCA.

Related reports

CO Report Custom ALV report

Material Ledger Price Differences by Plant Report

A custom ALV report that shows the standard price, periodic unit price and price differences from the material ledger for all materials and plants in …

CKMLHD · CKMLPP · CKMLCR · MBEW

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

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

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 Quantity and Value Reconciliation Report (Opening, Receipts, Issues, Closing)