PM Report Custom development ALV report

Spare Parts Consumption and Cost by Equipment Report

Short answer: A custom ALV report that totals goods issues to maintenance orders by equipment and functional location, showing which equipment consumes which spare part, how often and at what cost. Returns are netted off; the last issue date and the average interval between issues per part are calculated as well.

Estimated effort
M · 3–5 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 goods issues to maintenance orders with the order number, but it does not show the equipment or functional location the order belongs to; for part consumption by equipment the list is merged with the IW39 output in Excel. IW39 and order cost reports give total cost, not frequency or last issue date per part. This information is needed for minimum stock levels, critical spare decisions and repeat failure analysis.

Who uses it? Maintenance managers, spare parts and MRO storeroom owners, reliability engineers and controllers who follow the maintenance budget.

Closest standard alternatives

  • MB51 Material Document List. Lists issues to orders; the equipment and functional location link, frequency and average interval are missing.
  • IW39 Display PM Orders (List). Lists maintenance orders with costs, but does not give consumption per part.

Tables used

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

TableRoleJoinSystem
MSEGMaterial Document ItemGoods issues and returns to maintenance orders (driving table)—ECC + S/4
AUFKOrder Master DataOrder type and maintenance order checkAUFK-AUFNR = MSEG-AUFNRECC + S/4
AFIHMaintenance Order HeaderEquipment, location and maintenance activity type of the orderAFIH-AUFNR = MSEG-AUFNRECC + S/4
ILOAPM Object Location and Account AssignmentFunctional locationILOA-ILOAN = AFIH-ILOANECC + S/4
EQKTEquipment Short TextsEquipment descriptionEQKT-EQUNR = AFIH-EQUNR AND EQKT-SPRAS = SY-LANGUECC + S/4
MAKTMaterial DescriptionsSpare part descriptionMAKT-MATNR = MSEG-MATNR AND MAKT-SPRAS = SY-LANGUECC + S/4

S/4HANA notes

  • 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_WERKSPlantRange / multipleMSEG-WERKSYes1000
S_BUDATPosting date rangeRange / multipleMSEG-BUDAT_MKPFYes01.01.2026 – 31.10.2026
S_EQUNREquipmentRange / multipleAFIH-EQUNRNo10004512
S_TPLNRFunctional locationRange / multipleILOA-TPLNRNoTR01-URT-*
S_AUARTOrder typeRange / multipleAUFK-AUARTNoPM01
S_ILARTMaintenance activity typeRange / multipleAFIH-ILARTNo002
S_MATNRSpare partRange / multipleMSEG-MATNRNoSP-1020
P_TOPNTop N parts per equipment (0 = all)Single value—No10

Output columns

#ColumnSource
1EquipmentAFIH-EQUNR
2Equipment descriptionEQKT-EQKTX
3Functional locationILOA-TPLNR
4Spare partMSEG-MATNR
5Part descriptionMAKT-MAKTX
6IssuesCalculated Number of MSEG lines with movement type 261
7Net quantityCalculated Σ MSEG-MENGE (261 positive, 262 negative)
8UnitMSEG-MEINS
9Net valueCalculated Σ MSEG-DMBTR (261 positive, 262 negative)
10CurrencyMSEG-WAERS
11OrdersCalculated Number of distinct MSEG-AUFNR values
12Last issueCalculated MAX(MSEG-BUDAT_MKPF)
13Average interval (days)Calculated (Last issue − first issue) ÷ (issues − 1)
14Share of equipment %Calculated Part net value ÷ total part value of the equipment × 100

Sample output

EquipmentEquipment descriptionFunctional locationSpare partPart descriptionIssuesNet quantityUnitNet valueCurrencyOrdersLast issueAverage interval (days)Share of equipment %
10004512Compressor K-12TR01-URT-HAT1SP-1020Compressor valve kit55SET42,500TRY510/28/20265946.20
10004512Compressor K-12TR01-URT-HAT1SP-1188Oil filter916PC7,360TRY811/04/2026348
10004718Hydraulic press P-3TR01-PRS-01SP-2210Hydraulic seal kit43SET18,900TRY411/07/20267261.50
10004630Conveyor belt B2TR01-URT-HAT2SP-3305Drive bearing 6208612PC9,840TRY510/19/20264837.80
A view built with fictional sample data; not real system data.

How does the report work?

  1. Goods issues to maintenance orders (BWART 261) and their returns (262) are read from MSEG for the plant and posting date range on the selection screen; lines without an order number (AUFNR) are skipped.
  2. The order type is checked through AUFK and only maintenance orders are taken; equipment (EQUNR), location (ILOAN) and maintenance activity type (ILART) are added from AFIH, the functional location comes from ILOA.
  3. Quantity and value are netted using SHKZG: 261 issues count positive, 262 returns negative.
  4. Per equipment + material the number of issues, net quantity, net value (MSEG-DMBTR), number of distinct orders and the last issue date (BUDAT_MKPF) are summed. Average issue interval = (last issue − first issue) ÷ (number of issues − 1).
  5. Share within the equipment = part net value ÷ total part value of the equipment × 100. With ’top N parts’ selected, only the N highest-value parts are shown per equipment.

Performance notes

Read MSEG by movement type, plant and BUDAT_MKPF; make sure a suitable index exists for these fields. Read AFIH with FOR ALL ENTRIES only for the order numbers found. For a one-year analysis run the report in the background.

Features

  • ALV list (sort, filter, subtotals)
  • User-specific layout variants
  • Double-click drill-down to the document The equipment opens IE03, the part line opens the MB51 list of the related material documents.
  • Export to Excel
  • Runs as a background job

Authorization objects

  • M_MSEG_WWADisplay material documents by plant
  • I_SWERKTechnical object authorization by maintenance plant

Frequently asked questions

Are issues to a cost center without an order included?

The base version evaluates only issues to maintenance orders, because the equipment link comes from the order. Issues to cost centers (201) can be shown in a separate 'consumption without equipment' section.

Does it suggest stock levels?

The report gives consumption history; it does not suggest a minimum stock. Optionally the reorder point from MARC and the current stock can be shown side by side to flag parts that are low compared with consumption.

Does it work on S/4HANA?

Yes. In S/4HANA reading MSEG is served from the material document table through a compatibility view; for a clean core approach the material document CDS views can be used.

Related reports

PM Report Custom ALV report

Maintenance Cost and Downtime by Equipment Report

A custom ALV report that splits the actual cost of maintenance orders per equipment in a period into labor, material, external services and other, and …

AFIH · AUFK · COEP · QMIH

PM Report Custom ALV report

Repeat Breakdowns by Equipment Report

A custom ALV report that shows breakdown notifications repeating on the same equipment within a selected window of days, with the previous …

QMEL · QMIH · QMFE · QMUR

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: Spare Parts Consumption and Cost by Equipment Report