offdataai
SAP · data model template

SAP CO-PA Profitability Analytics data model

Kimball warehouse for SAP CO-PA profitability: a transaction-grain operating-concern line-item fact (CE1xxx) with CO-PA value fields and a characteristic junk dimension for low-cardinality flags (record type, plan/actual, billing type). Billing documents (rbeln) are degenerate dimensions; conformed customer/product/profit-center dimensions are SCD2; SAP fiscal year/period drives period reporting for contribution-margin and segment profitability analysis.

SAP Controlling Profitability Analysis (CO-PA) analytics migrated from ECC / S/4HANA into Snowflake. Models the costing-based CO-PA operating-concern line item (tables CE1xxx through CE4xxx) at transaction grain, carrying characteristics and value fields (revenue, sales deductions, COGS, variable/fixed cost, contribution margin) over conformed customer (KNA1, SCD2), product (MARA, SCD2), sales organization, company code, and profit-center dimensions plus a CO-PA characteristic junk dimension, with SAP fiscal-period accounting. It is a Kimball dimensional model: fact tables at a declared grain surrounded by conformed dimensions, ready for BI tools and a semantic layer.

KimballSAPSOXGDPRIFRS
9
tables
88
columns
8
relationships
1
PII columns

Opening the template creates a project with the ERD, platform-native DDL, a dbt project and documentation already generated (recommended platform: Snowflake). Edit it in plain English or on the canvas, then ship it to any supported warehouse.

Subject areas

profitabilityconformed_dimensions

Design decisions

  • Transaction-grain operating-concern line-item fact

    Costing-based CO-PA stores actuals as individual operating-concern line items in CE1xxx; declaring the fact at that grain preserves the full characteristic combination and lets value fields aggregate to any profitability segment (CE4xxx).

  • Value fields modelled as additive measures with a margin ladder

    CO-PA's revenue, sales-deduction, COGS, and cost value fields are fully additive; carrying them plus the derived contribution-margin and operating-profit ladder on the fact supports drill-down profitability without re-deriving the margin scheme.

  • Characteristic junk dimension for low-cardinality flags

    CO-PA carries many low-cardinality characteristics (record type, plan/actual indicator, billing/sales-document type, derived WWxxx groups); collapsing them into a single junk dimension keeps the fact narrow per Kimball rather than adding many tiny foreign keys.

  • SCD2 on customer, product, and profit center

    CO-PA characteristic derivations (customer/product hierarchy, profit-center segment) change over time; type-2 history preserves the as-was segment assignment required for comparable, SOX-auditable profitability trend reporting.

Tables in the SAP CO-PA Profitability Analytics model

Every table with its grain, columns, types and keys. PK marks a primary key, BK a business key and PII a column classified as personal data, which gets a masking strategy by default.

Fact tables (1)

fct_copa_line_item

Grain: one row per CO-PA operating-concern line item (CE1xxx, transaction grain)

Transaction-grain CO-PA fact — value fields by characteristic combination.

ColumnTypeKeys
copa_line_item_keybigintPK
date_keybigint
fiscal_period_keybigint
customer_keybigint
product_keybigint
sales_org_keybigint
company_code_keybigint
profit_center_keybigint
characteristic_keybigint
billing_documentvarchar
billing_itemvarchar
reference_document_numbervarchar
sales_quantitydecimal
sales_unitvarchar
revenuedecimal
sales_deductionsdecimal
net_revenuedecimal
cost_of_goods_solddecimal
variable_costdecimal
fixed_costdecimal
contribution_margindecimal
operating_profitdecimal
currencyvarchar

Dimension tables (8)

dim_date

Grain: one row per calendar day

ColumnTypeKeys
date_keybigintPK
full_datedateBK
day_of_monthsmallint
month_numbersmallint
month_namevarchar
quartersmallint
yearsmallint
is_business_dayboolean
is_period_endboolean

dim_fiscal_period

Grain: one row per SAP fiscal year/period (gjahr/perio)

ColumnTypeKeys
fiscal_period_keybigintPK
fiscal_period_codevarcharBK
fiscal_yearsmallint
fiscal_periodsmallint
fiscal_variantvarchar
period_start_datedate
period_end_datedate
is_special_periodboolean
period_statusvarchar

dim_customer

Grain: one row per customer per SCD2 version (CO-PA characteristic kndnr)

SCD type 2

ColumnTypeKeys
customer_keybigintPK
customer_numbervarcharBK
customer_namevarcharPII
cityvarchar
regionvarchar
countryvarchar
customer_groupvarchar
customer_hierarchy_nodevarchar
industryvarchar
is_activeboolean

dim_product

Grain: one row per product per SCD2 version (CO-PA characteristic artnr)

SCD type 2

ColumnTypeKeys
product_keybigintPK
product_numbervarcharBK
product_descriptionvarchar
material_groupvarchar
product_hierarchyvarchar
divisionvarchar
brandvarchar
is_activeboolean

dim_sales_org

Grain: one row per sales organization / distribution channel / division

ColumnTypeKeys
sales_org_keybigintPK
sales_orgvarcharBK
sales_org_namevarchar
distribution_channelvarchar
divisionvarchar
sales_districtvarchar
currencyvarchar

dim_company_code

Grain: one row per SAP company code

ColumnTypeKeys
company_code_keybigintPK
company_codevarcharBK
company_namevarchar
countryvarchar
local_currencyvarchar
controlling_areavarchar
operating_concernvarchar

dim_profit_center

Grain: one row per profit center per SCD2 version (CO-PA characteristic prctr)

SCD type 2

ColumnTypeKeys
profit_center_keybigintPK
profit_centervarcharBK
profit_center_namevarchar
controlling_areavarchar
segmentvarchar
hierarchy_nodevarchar
is_activeboolean

dim_characteristic

Grain: one row per CO-PA characteristic combination (junk dimension of low-cardinality flags)

ColumnTypeKeys
characteristic_keybigintPK
characteristic_combo_codevarcharBK
record_typevarchar
plan_actual_indicatorvarchar
sales_document_typevarchar
billing_typevarchar
customer_group_1varchar
product_group_1varchar

Relationships

Each relationship is a foreign key on the first table referencing the second.

  • fct_copa_line_item.date_key → dim_date (many-to-one)
  • fct_copa_line_item.fiscal_period_key → dim_fiscal_period (many-to-one)
  • fct_copa_line_item.customer_key → dim_customer (many-to-one)
  • fct_copa_line_item.product_key → dim_product (many-to-one)
  • fct_copa_line_item.sales_org_key → dim_sales_org (many-to-one)
  • fct_copa_line_item.company_code_key → dim_company_code (many-to-one)
  • fct_copa_line_item.profit_center_key → dim_profit_center (many-to-one)
  • fct_copa_line_item.characteristic_key → dim_characteristic (many-to-one)

Related templates

All templates →
Start for $1

From requirements to AI-ready context, in one platform.

Describe your business in a conversation, start from a template or connect your own database. Your first model is ready in minutes.

Get startedBook a demo

Plans from $1/month · cancel any time