Skip to content
SAP Reference

CO15

Create S/4HANA status: Active

Enter Confirmation (Order)

What the badges mean
S/4HANA status: Active
Active and unchanged in S/4HANA.
S/4HANA status: Deprecated
Still readable today, but no longer SAP's strategic path — plan around it.
S/4HANA status: Replaced
Replaced by a new persistence in S/4HANA; the classic name may still answer reads (see read mechanism).
S/4HANA status: Migrating to IBP
Planning scope is moving from APO toward IBP.
S/4HANA status: Active (StRM) · Replaced (EWM)
Path-dependent: active with SAP Stock Room Management, replaced where EWM is the warehouse path.
S/4HANA status: Replaced · Compat View
Compatibility view: the classic table name is redirected to a view over the new persistence — see how the physical model moved.
S/4HANA status: Active · Proxy View
Proxy view: reads route through NSDM proxy/CDS views — see how the physical model moved.
master
Data class: what the table holds — master data, transaction documents, org structure, config, or texts (one row per language — see the quirks guide).
In field listings, K marks a primary-key field, and linked type codes in the Type column jump to the matching quirks-guide section.

Boilerplate SQL

Databricks SQL

Starting point for querying the tables behind this transaction. Set your Unity Catalog location and filter values below — they’re substituted into the SQL and the copy button.

Query parameters

4 parameters not filled: <catalog>, <schema>, <MANDT>, <AUFNR>

-- ============================================================
-- T-Code : CO15 Enter Confirmation (Order)
-- Purpose: Confirm final GR on a production order; may backflush components and post material documents
-- Grain  : One row per confirmation with optional material-document enrichment
-- Tables : AFRU, MSEG, MKPF, MAKT, T001W
-- Notes  : CO15 writes AFRU + (on backflush) MKPF/MSEG. AFRU carries WABLNR (material-document number) + MYEAR (material-document year), a purpose-built 1:1 link to the specific goods movement created by that confirmation — do not bridge on AUFNR + posting date alone, which fans out across every movement for the order.
-- ============================================================
SELECT
  -- Keys
  a.MANDT   AS "Client",
  a.RUECK   AS "Confirmation Number",
  a.AUFNR   AS "Order Number",
  a.VORNR   AS "Operation Number",
  l.MBLNR   AS "Material Document",
  l.MJAHR   AS "Material Doc Year",
  l.ZEILE   AS "Material Doc Item",

  -- Descriptive text
  mt.MAKTX  AS "Material Description",

  -- Quantities + UOM (paired)
  a.LMNGA   AS "Yield",
  a.XMNGA   AS "Scrap",
  a.MEINH   AS "Confirmation UoM",
  l.MENGE   AS "Movement Quantity",
  l.MEINS   AS "Movement UoM",

  -- Dates
  a.BUDAT   AS "Confirmation Posting Date",
  h.BUDAT   AS "Material Doc Posting Date",
  a.ISDD    AS "Actual Start",
  a.IEDD    AS "Actual Finish",

  -- Status / indicators
  a.STOKZ   AS "Reversal Indicator",
  l.BWART   AS "Movement Type",
  l.SHKZG   AS "Debit/Credit Indicator",

  -- Org fields
  a.WERKS   AS "Plant",
  pt.NAME1  AS "Plant Name",
  l.LGORT   AS "Storage Location",

  -- Master data enrichment
  l.MATNR   AS "Material Number",
  a.AUFPL   AS "Routing Number",
  a.APLZL   AS "Operation General Counter",
  a.ERNAM   AS "Entered By"
FROM <catalog>.<schema>.afru a
LEFT JOIN <catalog>.<schema>.mseg l
  ON  l.MANDT = a.MANDT
  AND l.MBLNR = a.WABLNR
  AND l.MJAHR = a.MYEAR
LEFT JOIN <catalog>.<schema>.mkpf h
  ON  h.MANDT = l.MANDT
  AND h.MBLNR = l.MBLNR
  AND h.MJAHR = l.MJAHR
LEFT JOIN <catalog>.<schema>.makt mt
  ON  mt.MANDT = l.MANDT
  AND mt.MATNR = l.MATNR
  AND mt.SPRAS = 'E'
LEFT JOIN <catalog>.<schema>.t001w pt
  ON  pt.MANDT = a.MANDT
  AND pt.WERKS = a.WERKS
WHERE
  a.MANDT = '<MANDT>'
  AND a.AUFNR = '<AUFNR>'
  AND a.STOKZ = ''
ORDER BY a.BUDAT DESC, a.RUECK, l.ZEILE;

Tables Used by This Transaction

How these tables connect — join details in the list below.

Join details

  • MKPFMSEGheader item · 1:N
    ON mkpf.MBLNR = mseg.MBLNR

More Production Planning t-codes