How-toSAP ECC / S/4HANAMM Purchasing / PO Reporting

SAP open purchase orders report: ME2N, ME2M, ME2L and the underlying tables

Question
SAP open purchase orders report ME2N, how to list open PO quantity by vendor and material

Also searched as

  • SAP ME2N open purchase orders still to be delivered
  • SAP EKKO EKPO EKET EKBE open quantity query
  • SAP ME2M ME2L open PO report

Short answer

Use ME2N for a flexible open PO list, ME2M by material and ME2L by vendor, with the selection parameter Still to be delivered. The open quantity is the scheduled quantity in EKET minus goods received in EKBE, excluding deleted and delivery-completed items. For custom reports, read EKKO, EKPO, EKET and EKBE.

Applies to: SAP ECC 6.0 and S/4HANA (ME2N, ME2M, ME2L; ME80FN in newer releases)

List open POs and compute open quantity

  1. 1Run ME2N (Purchase Orders by PO Number). In the selection parameters tab, set Selection Parameter to WE101 (Still to be delivered) to restrict to items with open goods receipt quantity.
  2. 2Restrict by purchasing organization, plant, vendor, material or document date. Set the scope of list to a layout showing scheduled quantity, quantity delivered and still to be delivered.
  3. 3Use ME2M for a list by material and ME2L by vendor if you prefer those grouping views. ME2N is the most flexible since it takes any combination.
  4. 4Check Status of the item: deleted items (EKPO-LOEKZ) and items with the delivery completed flag (ELIKZ) should not count as open, and the report parameters normally exclude them.
  5. 5For a custom report, join EKKO and EKPO on EBELN, then EKET for the delivery schedule and EKBE for the history. Open quantity per schedule line is EKET-MENGE minus EKET-WEMNG.
  6. 6For items without schedule lines, use EKPO-MENGE minus the sum of goods receipt quantities from EKBE where VGABE is 1.
  7. 7Save the layout and variant in ME2N, and schedule a spool or export if buyers need a regular open-order list.

Which tables hold what

EKKO is the PO header: vendor (LIFNR), document type (BSART), purchasing organization (EKORG), group (EKGRP), currency and release fields. EKPO holds the items: material (MATNR), plant (WERKS), ordered quantity (MENGE), net price, deletion flag (LOEKZ), delivery completed (ELIKZ), final invoice (EREKZ) and account assignment category (KNTTP).

EKET holds the schedule lines with delivery date (EINDT), scheduled quantity (MENGE) and goods receipt quantity (WEMNG). EKBE is the PO history: one row per goods receipt, invoice receipt or other follow-on document, with the movement type, quantity and amount. In S/4HANA the tables still exist, and CDS views such as the purchase order item API sit on top.

Remember that ME2N derives its numbers from the same sources, so a custom query that agrees with ME2N is the best test of your logic.

-- Open quantity per schedule line (HANA / ABAP SQL style)
SELECT h.EBELN, i.EBELP, h.LIFNR, i.MATNR, i.WERKS,
       s.EINDT, s.MENGE, s.WEMNG,
       (s.MENGE - s.WEMNG) AS open_qty
FROM EKKO h
JOIN EKPO i ON i.EBELN = h.EBELN
JOIN EKET s ON s.EBELN = i.EBELN AND s.EBELP = i.EBELP
WHERE i.LOEKZ = ' ' AND i.ELIKZ = ' '
  AND s.MENGE > s.WEMNG;

Subtleties that change the answer

Returns and reversals: a goods receipt reversal appears in EKBE with the shkzg indicator S or H flipping the sign. If you sum quantities without respecting the debit/credit indicator, returns inflate your delivered quantity. Use the sign field or the signed quantity in the history rather than raw MENGE.

Overdelivery and underdelivery tolerances (EKPO-UEBTO, UNTTO) mean a line can be treated as complete with less than the ordered quantity. The delivery completed flag is the system's final word on whether more is expected.

Subcontracting, stock transport orders and scheduling agreements follow similar tables but with their own document types and, for scheduling agreements, the EKET lines with agreed cumulative quantities. Report them separately unless you know the combined view is meant.

Reporting for buyers and planners

For expediting, add the confirmation data from vendor confirmations (EKES) and the requested delivery date. Open lines with a delivery date before today, and no confirmation, are the real overdue list. Open lines with an overdue date but a confirmed new date are tracked differently.

For finance, the open PO commitment is value-based: open quantity multiplied by the net price per unit, with the price unit (PEINH) taken into account. Do not multiply by the price without the unit divisor or values will be wrong by a factor of 100 or 1,000.

Common pitfalls

  • !Summing EKBE quantities without respecting debit/credit, so reversals count as deliveries.
  • !Ignoring the delivery completed flag and showing lines as open that the buyer has closed.
  • !Multiplying open quantity by net price without dividing by the price unit.
  • !Including deleted items or blocked POs in an open commitment report.
  • !Comparing a custom query with ME2N without matching selection settings such as release status.

How an ERP-grounded AI assistant handles this

A grounded assistant lets a buyer ask for open lines by vendor, plant or due date in plain language, and answers from EKKO, EKPO, EKET and EKBE with the query visible. The same logic handles the signed quantities and delivery completed flag consistently each time, which is where custom reports usually go wrong. It is read-only, and expediting emails or changes still need a person.

Frequently asked questions

Which transaction shows open purchase orders in SAP?

ME2N is the most flexible: set the selection parameter to WE101 to show items still to be delivered. ME2M lists by material and ME2L by vendor. In newer releases ME80FN provides an ALV-based analysis of purchasing documents with similar selections and more layout options.

How do I calculate open quantity in SQL?

For items with schedule lines, use EKET-MENGE minus EKET-WEMNG for lines where the item is not deleted (LOEKZ) and not delivery completed (ELIKZ). For items without schedule lines, subtract the net goods receipts in EKBE from the ordered quantity in EKPO, using the debit/credit indicator for reversals.

Why does my custom report differ from ME2N?

Common reasons are reversals counted as deliveries, deleted or delivery-completed items included, different release status handling, and unit conversions. Align the selection parameters with ME2N first, then compare a single PO item to find the line where the numbers diverge.

Can I get open PO value as well as quantity?

Yes, multiply open quantity by the net price and divide by the price unit (EKPO-PEINH), then apply the conversion between order price unit and order unit if they differ. Convert to a single currency using the exchange rate if the PO currencies vary and finance wants a total.

Related

How-to

SAP GR/IR clearing account balance: reconcile with MB5S and clear with MR11

The GR/IR clearing account holds the value of goods received but not yet invoiced, and invoices not yet matched with receipts. It should trend to zero per PO item. Reconcile it with MB5S, find the PO items that are stuck, and clear true differences with MR11 or automatic clearing in F.13, after correcting the cause.

How-to

SAP SE16N vs SQVI: Table Browser vs Ad Hoc Query

SE16N is a single-table browser: fast filtering, formatted display, and export from one table at a time, with an optional edit function for authorized users. SQVI (Quick Viewer) builds ad hoc queries that join multiple tables without writing ABAP, and can be saved as a reusable report. Use SE16N for a quick look at one table; use SQVI when you need data joined across two or more tables.

How-to

How to Read MD04 Exception Messages in SAP

The exception indicator in MD04 flags procurement elements whose date or quantity no longer matches the current demand situation - it is SAP's built-in change signal, read element by element in the detail screen, not just the header icon. Triage by exception group first, then decide to reschedule, cancel, or accept each one.

Error fix

SAP M7 021: Deficit of SL Stock Quantity

M7 021 fires during a goods issue, delivery, or confirmation when SAP checks the unrestricted-use (SL) stock for the exact plant, storage location and batch combination and finds less than what you are trying to post out. Fix the entry (batch, storage location, quantity) first; only enable negative stock or downgrade the message to a warning if the business genuinely needs to post ahead of a receipt.

Error fix

SAP IDoc Status 51: Application Document Not Posted

Status 51 tells you the IDoc reached the application layer and failed to post, but the status text itself is not the error - the real cause sits in the status record's long text or the linked application log. Fix the underlying data or configuration, then reprocess the IDoc through BD87 rather than editing the status.

Error fix

SAP Short Dump TIME_OUT: Maximum Runtime Exceeded

A TIME_OUT runtime error means a dialog (or RFC) work process ran longer than the maximum allowed runtime, controlled by profile parameter rdisp/max_wprun_time (600 seconds by default). The fix is almost always to move the long-running work to background processing or tune the underlying program, not to raise the timeout.

AI for ERP

AI for SAP S/4HANA, Running On-Prem or in Your Private Cloud

Run AI on SAP S/4HANA without sending ERP data to a public API. On-prem and private-cloud architecture, CDS views, OData, and honest deployment trade-offs.

AI for ERP

AI Agents for SAP Production Planning, MRP, and Exception Triage

AI agents that triage SAP MD04 exceptions, explain predictive MRP shortages, and draft planned-order actions, grounded on your own SAP data, deployed on-prem.

Stuck on SAP ECC / S/4HANA?

Talk to engineers who work inside SAP ECC / S/4HANA every week, and who build private AI that answers these questions from your own ERP data.