SAP tableObjectAFIHModulePM_EAM

AFIH table — AFIH Maintenance Order Header Data (PM/CS)

AFIH stores the PM/CS-specific header data for a maintenance order: one row per order number, keyed by AUFNR, holding the technical object reference (equipment or functional location), work center, planner group, priority, malfunction start/end dates, breakdown duration and flag, and links to the originating notification and maintenance plan. The order's status, type and costs live elsewhere, mainly in AUFK.

AFIH carries the maintenance-specific attributes attached to a PM or CS order header, separate from the generic order master data in AUFK. This page covers which fields are reliably populated, how the table joins to equipment, functional location, notification and plan data, and the recurring mistakes made when using it for downtime and breakdown analysis.

Published 16 Sept 2026· 990 words

What it stores

Each row in AFIH represents the PM/CS extension of a single maintenance order header, keyed by order number (AUFNR). Where AUFK holds the order's generic attributes (type, status, company code, cost object), AFIH holds the fields specific to plant maintenance and customer service: which equipment or functional location the order was raised against, the responsible work center and planner group, priority, and the malfunction data used for breakdown analysis (start, end, duration, breakdown indicator). It also carries the link back to the notification the order was created from, if any, and to the maintenance plan that generated it, if the order is plan-driven. There is normally exactly one AFIH row per PM/CS order; the table does not exist for orders created outside plant maintenance.

Key fields

  • MANDT - client
  • AUFNR - order number, key field, one-to-one with the order header in AUFK
  • EQUNR - equipment number the order refers to, blank if the order is against a functional location instead
  • TPLNR - functional location the order refers to, blank if the order is against equipment instead
  • ILOAN - generic technical object number covering either equipment or functional location, resolved via ILOA
  • GEWRK - main work center responsible for the order
  • INGRP - planner group
  • PRIOK - priority key
  • AUSVN - malfunction start date
  • AUSBS - malfunction end date
  • AUSZT - breakdown duration
  • MSAUS - breakdown indicator
  • WARPL - maintenance plan number, populated only for plan-generated orders
  • QMNUM - notification number, populated only when the order was created from a notification

How it joins the data model

  • AFIH-AUFNR = AUFK-AUFNR (order master header)
  • AFIH-EQUNR = EQUI-EQUNR (equipment master)
  • AFIH-TPLNR = IFLOT-TPLNR (functional location master)
  • AFIH-ILOAN = ILOA-ILOAN (generic technical object link)
  • AFIH-QMNUM = VIQMEL-QMNUM (notification header)
  • AFIH-WARPL = MPLA-WARPL (maintenance plan)

How to read it safely

AFIH is client-dependent and keyed on AUFNR, so a lookup by order number returns a single row and is always cheap. It stops being cheap the moment the selection runs the other direction, from equipment or date range back to orders, because there is no guarantee of an efficient secondary index on EQUNR or on the malfunction date fields in every system. For breakdown or downtime reporting, restrict first by plant and by a realistic date window on AUSVN before adding EQUNR, and expect to join through AUFK if order type or status also needs to be checked, since neither lives in AFIH itself.

How to prove it in the data

To confirm reported downtime for a piece of equipment: select AFIH where EQUNR equals the equipment number and AUSVN falls in the reporting period, then sum AUSZT across the returned rows. If the sum does not match what the business expects, check whether MSAUS was actually set on those orders and whether AUSVN/AUSBS were filled in at all, since both are manually entered by the planner or technician and are not derived automatically by the system.

ECC vs S/4HANA

AFIH is retained in S/4HANA as a transparent table; the PM/CS order header data model was not restructured the way the finance and material document tables were. Reporting on top of it increasingly goes through CDS views rather than direct table access, but the underlying table and its field layout are essentially unchanged from ECC. Custom reports and interfaces built directly against AFIH generally continue to work without remapping.

Common pitfalls

  • Assuming every AFIH row has EQUNR or TPLNR filled. Orders raised generically against the maintenance object without a direct equipment or location assignment leave both blank; ILOAN and a join to ILOA are needed to resolve the object.
  • Treating a blank AUSVN/AUSBS/AUSZT as proof there was no breakdown. These fields are user-entered, not system-calculated, and are routinely skipped when the technician does not log malfunction times.
  • Treating MSAUS as an automatic breakdown flag. It reflects what was set on the order, which depends on configuration and on someone actually checking the box; its absence does not mean the failure was not a breakdown.
  • Looking for order type, order status, or cost figures in AFIH. None of that lives here; order type and status sit in AUFK and its status tables, costs sit in the controlling tables, and pulling from AFIH alone gives an incomplete picture.
  • Assuming WARPL being blank means the order has no relationship to a maintenance plan. It only means the order was not generated by that plan directly; plan-to-order history for manually linked cases can exist elsewhere.
  • Assuming QMNUM being blank means no notification exists for the order. It only records the notification the order was created from; notifications linked to an order afterwards are not always reflected by this field alone.

Whose problem this is

Data questions on AFIH sit with the PM or CS functional consultant, since the fields reflect process decisions (how the order was created, whether breakdown data was logged) rather than a technical fault in the table. Missing or wrong malfunction dates are a planner or technician data-entry problem to raise with the maintenance team, not a table structure issue for the basis or ABAP team to fix.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-tables/afihERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.