COSP
transaction S/4HANA status: ActiveCO Object: Cost Totals for External Postings
Actual external CO postings flow to ACDOCA on S/4HANA; COSP retains target/plan/statistical totals. Prefer ACDOCA or released CDS views for analytics.
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).
- Linked type codes
CLNT — the client key; filter it explicitly and carry it through every join.
NUMC — fixed-width numeric text; keep it a string and keep the leading zeros.
DATS, TIMS — character date (YYYYMMDD) and time (HHMMSS), zero-filled when initial.
CURR, CUKY, QUAN, UNIT — amounts and quantities, meaningful only beside the currency key or unit that qualifies them.
LANG — a language key in a text table — one row per language.
Fields
14 fields · 14 key
The join key is all 14 key fields together — matching on any single one fans out. See composite keys in the quirks guide.
14 fields.
| Key | Field | Description | Type | Length | References |
|---|---|---|---|---|---|
| Primary key | MANDT | Client | CLNT | 3 | |
| Primary key | LEDNR | Ledger for Controlling objects | CHAR | 2 | |
| Primary key | OBJNR | Object Number | CHAR | 22 | |
| Primary key | GJAHR | Fiscal Year | NUMC | 4 | |
| Primary key | WRTTP | Value Type | CHAR | 2 | |
| Primary key | VERSN | Version | CHAR | 3 | |
| Primary key | KSTAR | Cost Element | CHAR | 10 | |
| Primary key | HRKFT | CO key subnumber | CHAR | 14 | |
| Primary key | VRGNG | CO Business Transaction | CHAR | 4 | |
| Primary key | VBUND | Company ID of trading partner | CHAR | 6 | |
| Primary key | PARGB | Trading partner's business area | CHAR | 4 | |
| Primary key | BEKNZ | Debit/credit indicator | CHAR | 1 | |
| Primary key | TWAER | Transaction Currency | CUKY | 5 | |
| Primary key | PERBL | Period block | NUMC | 3 |
Linked type codes in the Type column jump to the matching section of the SAP data quirks guide.
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading COSP on Databricks. Set your Unity Catalog location and filter values below — they’re substituted into the SQL and the copy button.
4 parameters not filled: <catalog>, <schema>, <MANDT>, <GJAHR>
-- ============================================================
-- Table : COSP CO Object: Cost Totals for External Postings
-- Purpose: Column-selected read of COSP — auto-generated from field metadata
-- Grain : One row per LEDNR + OBJNR + GJAHR + WRTTP + VERSN + KSTAR + HRKFT + VRGNG + VBUND + PARGB + BEKNZ + TWAER + PERBL
-- Notes : Auto-generated skeleton. For multi-table transaction query patterns, see the linked t-codes on this page. Set catalog/schema to your Unity Catalog location; fill remaining placeholders (<...>) for your tenant.
-- ============================================================
SELECT
c.MANDT AS "Client",
c.LEDNR AS "Ledger for Controlling objects",
c.OBJNR AS "Object Number",
c.GJAHR AS "Fiscal Year",
c.WRTTP AS "Value Type",
c.VERSN AS "Version",
c.KSTAR AS "Cost Element",
c.HRKFT AS "CO key subnumber",
c.VRGNG AS "CO Business Transaction",
c.VBUND AS "Company ID of trading partner",
c.PARGB AS "Trading partner's business area",
c.BEKNZ AS "Debit/credit indicator",
c.TWAER AS "Transaction Currency",
c.PERBL AS "Period block"
FROM <catalog>.<schema>.cosp c
WHERE
c.MANDT = '<MANDT>'
-- AND c.GJAHR = <GJAHR>
ORDER BY c.LEDNR;Verified August 2026
Relationships
Diagram of 1-hop neighbors — join details below.
Transaction Codes That Use This Table
No t-code mappings populated for this table yet.