Building a CO-PA Profitability Report, Part 1 — From Operating Concern to KE30 Execution

This series walks through designing and running a SAP CO-PA (Profitability Analysis) report end to end. Part 1 covers how the operating concern relates to the line item table, the build sequence through KEBC → KE31 → KE34 → KE30, and a Report Painter form that includes a calculated row.

※ Screens, menus, and settings may differ depending on your SAP release and system configuration.

The goal

Against operating concern JNC2, build a report showing sales quantity, revenue, COGS, and gross margin — where gross margin is a calculated row (revenue minus COGS).

Line item tables are separated per operating concern

CO-PA actual line items are stored in tables named CE1<ERKRS>. Follow the chain company code → controlling area → operating concern to find yours; a custom program can build the table name dynamically from that assignment.

Also important: PALEDGER 01 and 02 can both be stored, so without a ledger filter every query doubles up.

Start in KEBC, finish with KE30

Set the operating concern in KEBC, create a Basic Report in KE31. When you need calculated rows, build a form in KE34, create a form-based report in KE31, and execute it in KE30.

KEBC and KE31 — the basic structure

Choosing JNC2 with costing-based CO-PA in KEBC makes that operating concern's characteristics and value fields appear in KE31/KE34. Basic Report ZJNCPA01 selects characteristics and value fields and displays results as an ALV object list.

Note: CO-PA report names cannot contain special characters like underscores — decide a naming convention up front.

Calculated rows live in the KE34 Report Painter form

The rows hold sales quantity, revenue, COGS, and gross margin; gross margin is defined with the formula Y002 − Y003. The single column is set to Plan/Actual Indicator 0 (actual data). Element type is "Value field with characteristics" — "Key figure scheme element" is only usable when a predefined scheme exists.

Attach the form and run KE30

Back in KE31, create ZJNCPA02 with form ZJNCPAF1 attached — the form now owns the value field layout, so the Key figures tab disappears. Running it in KE30 with period, actual indicator, and record type F shows quantity, revenue, COGS, and gross margin together.

Deliverables and operational notes

The key deliverables are Basic Report ZJNCPA01, Report Painter form ZJNCPAF1, and form-based report ZJNCPA02. Our custom ABAP report ZCO0030 applies the same two lessons in code: dynamic table names per operating concern and the PALEDGER filter.

Korean original (with screenshots): SAP CO-PA 리포트 구축 ① Operating Concern부터 KE30 실행까지

Where these documents come from
Everything on this blog comes from one small dumpling factory built end-to-end in an S/4HANA sandbox — one plant, one product, one month, every document number real. The whole build is written up in two books.
· Free 16-page sample — the opening chapters, no email required
· How Sarah Joined a K-Dumpling Company and Became an SAP Genius — the business novel, 53 pages, $25
· The Dumpling Factory: Building a Complete SAP S/4HANA Company from Scratch — the build manual, 85 pages, $50

Comments

Popular posts from this blog

Modern ABAP Syntax Notes — Patterns and Pitfalls from Real Development

SAP S/4HANA Table Reference — Tables I Actually Query, by Topic

A 36% margin became 6% at month-end, and every posting was correct