COSPD table — CO Object Cost Totals Extended Length Table
COSPD is the extended-field-length counterpart of the classic CO totals table COSP. One row holds the periodic plan or actual primary cost postings (external postings from FI, MM, HR and similar feeder components) for a single controlling object, cost element, fiscal year and value type, with sixteen period columns carrying the cumulated amounts and quantities. On a project it is the underlying data source behind WBS element and network cost reporting.
This page covers what a COSPD row actually represents on a Project System object, the key fields a consultant will actually select on, and how the table joins into PRPS, PROJ and the budget tables. It focuses on the diagnostic traps: object number decoding, value type and version confusion, and the S/4HANA compatibility-view layer sitting on top of this data.
Reviewed by an ERPClimb SAP consultant on 15 Sept 2026· 1,132 words
What it stores
A row in COSPD represents the periodic total of primary cost postings for one controlling object (a WBS element, a network or network activity, an internal order, or a cost center) for one fiscal year, one value type, one version and one cost element. Primary here means costs that originated outside Controlling: invoices, goods movements, payroll postings, depreciation run results, and similar external postings. The row does not hold a single document; it holds the running sum for up to sixteone periods, so the same combination of object, year, cost element and value type appears once per year, not once per posting. Plan data and actual data live in the same table structure, distinguished by the value type field, so a query that forgets to filter on value type mixes budgeted numbers with real spend and produces cost variance figures that look wrong but are actually just unfiltered.
Key fields
- MANDT - client
- OBJNR - CO object number, a generic key encoding the object type and its internal number; for Project System this points at a WBS element or network activity object
- GJAHR - fiscal year the totals belong to
- WRTTP - value type, distinguishes actual, plan, commitment and other totals categories held in the same table
- VERSN - version, relevant mainly for plan data where multiple planning versions coexist
- KSTAR - cost element, the primary cost element the posting was made against
- VRGNG - business transaction type that generated the posting category
- period value fields (typically named with a WKG/WKF/WOG prefix and a two digit period suffix) - the sixteen columns holding the cumulated period amounts and quantities in object currency
How it joins the data model
- COSPD-OBJNR = PRPS-OBJNR (WBS element cost totals to the WBS element master)
- PRPS-PSPHI = PROJ-PSPNR (WBS element to its project definition)
- PRPS-OBJNR joined through PRHI for the WBS hierarchy path
- COSPD-OBJNR and COSPD-GJAHR = BPJA-OBJNR and BPJA-GJAHR (comparing actual/plan totals against annual budget)
- COSPD-OBJNR and COSPD-GJAHR = BPGE-OBJNR and BPGE-GJAHR (comparing totals against overall/cumulative budget)
How to read it safely
Always restrict on MANDT implicitly through the connection, then on OBJNR or a range of OBJNR values derived from PRPS, never on cost element or fiscal year alone, since the table is large and cost element is not selective across a whole controlling area. Restrict on WRTTP before running anything, otherwise plan, actual and commitment rows all land in the same result set and get summed together. Restrict on VERSN for plan queries; a query with no version filter on plan data returns every planning version stacked on top of each other. The object number is not the WBS element number directly, it has to be resolved through PRPS or a conversion function, so joining on the raw text of the WBS element key will silently return zero rows.
How to prove it in the data
To confirm that a WBS element shows no actual costs despite invoices posted against it, first resolve the object number for the WBS element from PRPS, then select COSPD for that OBJNR with WRTTP restricted to the actual value type and the relevant fiscal year and version. An empty result with a non-empty result in the commitment value type confirms the spend is sitting as a commitment (purchase order or reservation) and has not yet posted as an actual primary cost, which points at the invoice or goods receipt step rather than at a Controlling data problem.
ECC vs S/4HANA
In S/4HANA, cost totals for actual postings are sourced from the Universal Journal, and the classic COSP/COSS style tables are exposed through compatibility views so older reports and custom code keep working. COSPD sits in this same family as the technical, extended-field-length structure used where the cost element or related key fields needed more characters than the original design allowed. Plan data behaviour is less affected by this change than actual data, since plan totals were never fully absorbed into the Universal Journal in the same way. Consultants should confirm on the specific system release whether the object being queried is a genuine transparent table or a compatibility layer before relying on direct SQL access for performance-sensitive reporting.
Common pitfalls
- Treating a zero result as proof that no cost was ever posted, without checking the value type filter; the posting may sit under commitment or statistical value types instead of the actual value type being queried
- Forgetting the version filter on plan data and summing multiple planning versions into one inflated figure
- Assuming OBJNR can be string-matched against the WBS element or network number directly; it cannot, it must be resolved through the relevant master data table first
- Reading period columns as calendar months when the controlling area uses a non-calendar fiscal year variant, leading to a monthly report that is offset from the real posting period
- Using this table to trace back to the originating FI or MM document; it only holds aggregated totals, the line-item detail lives in the corresponding CO line item table, not here
- Assuming secondary costs (internal allocations, settlements) are visible here; primary and secondary costs are held in separate totals tables and mixing them up produces a cost total that is missing the allocation side entirely
- Comparing COSPD totals directly against budget tables without matching fiscal year and object number precisely, which produces a variance that looks real but is actually a join mismatch
Whose problem this is
A discrepancy surfaced in this table is jointly owned by the FI-CO controlling team, who understand value types, versions and cost element derivation, and the Project System team, who understand how the WBS element or network object number was generated and settled. Neither side should assume the other has already checked the object number resolution before escalating.
Related SAP objects
Reviewed pages this object connects to in the ERPClimb knowledge graph.
Source: ERPClimb — https://erpclimb.com/sap-tables/cospdERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.