Margin Analysis (Profitability Analysis)
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
A cost center answers "where did the money go?" and a profit center answers "did this part of the company earn a profit?". A sales or product manager asks a third question: "which products, customers or regions make money, and how much is left after the cost of the goods?". Profitability Analysis answers it. It splits the revenues and the costs of the company by market segments, for example by product group, customer or sales organization, and shows the margin of each segment. This page explains the form of Profitability Analysis that SAP S/4HANA recommends, called margin analysis: where its data lives, what a characteristic and a profitability segment are, how a posting receives its characteristics (true and attributed assignment), how it differs from the older costing-based form, and how a contribution margin is read. It is written against SAP S/4HANA 2025 FPS02 (on premise and Private Edition) and SAP S/4HANA Cloud Public Edition 2608, and says where the two editions differ.
Before you read
-
The Universal Journal: the single table of line items, ACDOCA, in which margin analysis stores its characteristics.
-
Controlling Overview and Cost Elements: the controlling area, cost elements, and true and statistical account assignment objects.
-
Profit Center Accounting: the other management view of the same postings, by responsibility area rather than by market.
-
Allocations: the sender and receiver rules used by the allocation and top-down distribution functions that margin analysis relies on.
Key terms
-
Margin analysis: the form of Profitability Analysis that stores costs and revenues in accounts and is permanently reconciled with Financial Accounting.
-
Profitability segment: one combination of values of the characteristics of an operating concern; it corresponds to a market segment.
-
Operating concern: the organizational unit for which the sales market has a uniform structure; it defines the characteristics that profitability analysis can use.
-
Characteristic: a level at which you analyze profitability, such as sales organization, region, product or customer.
-
True account assignment: a line item whose profitability segment was determined by the sending application or entered by hand; it is available to follow-on processes.
-
Attributed account assignment: a profitability segment worked out for a line item from its other account assignment when the journal entry is created; it appears only in reports.
-
CO-PA derivation: the tool that fills further characteristics from the data already available.
-
Costing-based profitability analysis: the older form that stores values in value fields and needs reconciliation with Financial Accounting.
-
Contribution margin: what remains of revenue after the costs you subtract at a given level of the margin structure.
What margin analysis is
SAP’s help defines Profitability Analysis (CO-PA) as the analysis of profit or contribution margins by market segment or by strategic business unit, such as a sales organization or business area. Market segments can be classified by products, customers, orders, or any combination of them. Two forms exist, and the difference between them is where the values are kept.
| Question | Margin analysis | Costing-based profitability analysis |
|---|---|---|
Where are values stored? |
In accounts, using cost and revenue elements. |
In value fields and costing-based valuation approaches that you define yourself. |
Is it reconciled with Financial Accounting? |
Permanently: SAP’s help says the profitability report is always reconciled with the income statement. |
Not automatically. SAP says the cost elements must be converted into value fields, so reconciliation takes more effort. |
What does SAP recommend in SAP S/4HANA? |
It is the recommended and default method. |
It can run in parallel with margin analysis on premise, but SAP calls margin analysis the preferred solution. |
A naming detail saves confusion. SAP states that the term "margin analysis" replaced "account-based profitability analysis". The older name can still appear on screens and in documentation, and what it says is valid for margin analysis. Sometimes you will read "CO-PA" for Profitability Analysis as a whole: the abbreviation names the application component, and margin analysis is the way it works in SAP S/4HANA.
The central idea of the redesign is that margin analysis has no store of its own. The Universal Journal is the single source of truth for the financial data, so profitability reporting reads the income statement items and can drill down on any characteristic, for example the product group. Because the characteristics are part of the journal entry, the numbers of margin analysis and of the income statement cannot drift apart. The Universal Journal page explains why one table can carry all of these views at once.
SAP also states a boundary that follows from this design. The Universal Journal is integrated only with margin analysis; costing-based profitability analysis can still run on premise, but as a separate set of data. In the Public Edition only margin analysis exists (see Differences between the editions).
The operating concern, characteristics and profitability segments
Three structures carry margin analysis.
-
The operating concern is, in SAP’s words, an organizational unit for which the sales market has a uniform structure, and it is the valuation level for profitability analysis. It is structured into characteristics and value fields. Value fields are used only in costing-based profitability analysis, not in margin analysis. SAP recommends defining and working with only one operating concern.
-
Characteristics are the levels you want to analyze, such as sales organization, region, product or customer. The possible reporting levels depend on which characteristics exist and on how they are created and derived.
-
A profitability segment is a combination of characteristic values, for example the combination of customer, product, plant and distribution channel. Each segment is an analysis object, and the margin can be displayed per segment.
The system finds the operating concern through the organization structure: SAP’s help says that when data is
transferred to Profitability Analysis, the operating concern is derived from the controlling area, and the controlling
area from the company code. In the running example, a posting in company code EX01 leads to controlling area EX00,
and from there to the operating concern assigned to EX00. Because the operating concern should reflect the structure
of the sales market, SAP says one operating concern is normally enough for the whole organization, and that several
controlling areas are normally assigned to it.
Two more rules matter in practice.
-
Not every characteristic is part of the profitability segment. SAP notes that characteristics which are almost always filled and nearly always different would make the volume of profitability segments too large, so you can deactivate them when a profitability segment is created. The sales order in repetitive manufacturing is the example SAP gives of a characteristic that should not be used.
-
SAP states that the G/L account and the functional area also determine the margin structure. Both are required for multilevel contribution margin accounting, which is why a revenue account and a cost of goods sold account matter as much as the product does.
Which characteristics does a posting carry? In the Public Edition, the screen that assigns a profitability segment shows only the characteristics contained in the operating concern, in four sections: Enterprise Structure, Product and Customer, Account Assignment and Other. Custom characteristics created with the key user tool for the business context Market Segment appear in the section Other. SAP’s pages mention, as examples of characteristics, the customer, the customer group, the sales office, the product, the product group, the plant, the sales organization, the distribution channel, the division, the region and the billing type.
Creating or changing an operating concern, and assigning controlling areas to it, are Customizing activities (on premise: in Customizing for Profitability Analysis, Structures, Define Operating Concern; the assignment in Customizing for the company structure, under Assignment, Controlling). They need an SAP system and are not described step by step here (requires an SAP system; not run here). When you work in the application, SAP’s help describes a dialog (SAP menu: Accounting, Controlling, Profitability Analysis, Environment, Set Operating Concern) in which you set the operating concern and the type of profitability analysis, costing-based or account-based. If you work with one operating concern only, you can store it and the type in your user master data, so the dialog no longer appears at logon.
Sources: Operating Concern (SAP Help Portal, on premise), Structures and Master Data (SAP Help Portal, on premise), Assigning the Operating Concern (SAP Help Portal, on premise), Setting the Operating Concern (SAP Help Portal, on premise), Assign Profitability Segment (SAP Help Portal, Public Edition)
How a posting receives its characteristics
Every line of a journal entry that is relevant to margin analysis can carry the characteristics of a profitability segment. SAP distinguishes two cases, and the distinction decides what you can do with the line afterwards.
| Question | True account assignment | Attributed account assignment |
|---|---|---|
Who determines the segment? |
Normally the sending application, for example the sales order or the billing document. Also a manual assignment on the account assignment screen, or an automatic assignment defined for the G/L account in Customizing. |
The system, when the journal entry is created, from the object the line is posted to (cost center, internal order, project, sales order, production order, maintenance order or service transaction). The function must be activated in Customizing. |
Where does it appear? |
In reports and in follow-on processes such as allocations, settlement and top-down distribution. |
In reports only. Most follow-on processes do not see it. |
Examples |
A goods issue or billing document item in a sell-from-stock scenario; a manual FI posting to a profitability segment. |
Labor cost posted to a cost center that serves one product group; a cost on a project that has a sales order. |
The reason for the second column is practical. Many costs, such as the wages of a packing team, are posted to a cost center and not to a product. If the system waited for a period-end allocation, a product report would show those costs only after closing. With attributed assignment a best guess is made at the moment of posting, using the information available then, and the line appears in the product reports at once. SAP says a refinement at period end is still possible with the closing transactions: settlement, allocation and top-down distribution.
CO-PA derivation
Characteristics are filled by a tool called CO-PA derivation. It holds a fixed set of rules that derive further characteristics from the data already on the line. SAP gives two examples. The product group of the product sold is derived from the material master when a revenue line is created by a billing document. And a derivation step can assign a product group to a cost center: if cost center C100 works only for product group P1, every posting to C100, such as labor costs, receives P1 and is read in product group reporting. Deriving market segments early in the process, SAP adds, generally removes the need for some period-end closing activities.
The logic for attributed assignment depends on the object. SAP’s page describes these chains, among others:
-
Cost center: CO-PA derivation is called with the available data, and the enriched data is written back to the line.
-
Internal order: if the order has a settlement rule to a profitability segment, that segment is used. Otherwise the system looks for a sales order item, then for a unique sales order, then for a billing document being posted, and derives from what it finds.
-
Sales order item: the settlement rule of the item first, then a profitability segment the item carries, then the customer and product of the sales order with CO-PA derivation.
determined by the
sending application?} B -- yes --> C[True account assignment:
characteristics copied to the line] B -- no --> D{Attributed assignment
active and object is cost center,
order, project, sales order
or service transaction?} D -- yes --> E[Look for settlement rule,
sales order item or sales order] E --> F[CO-PA derivation fills
further characteristics] F --> G[Attributed segment written to the line:
reports only] D -- no --> H[No profitability segment] C --> I[Available in reports and
in allocations and settlement]
Two mapping rules keep the line consistent. Fields of the organization structure that are relevant to the general ledger, such as company code, controlling area, profit center, partner profit center, segment, business area and functional area, are never overwritten by the profitability data. Account assignment and organization fields such as cost center, order, plant or customer are filled from the segment only when they are empty, with one exception: for a true assignment, fields such as plant, sales organization, distribution channel, division, customer and billing type are always copied from the segment into the line, to avoid inconsistent data. SAP also notes that data of a sales order is used only when the billing company code of the order equals the company code of the line being attributed.
In the Universal Journal, the segment itself is represented on the line by a profitability segment number; SAP’s page on
deferred summarization names the field PAOBJNR in ACDOCA. When the operating concern is generated, SAP says, all
characteristics not yet available, including customer-specific ones, are appended to the journal entry and filled when
the posting is made.
Where the data comes from
SAP’s help lists the application components whose primary, profit-related postings margin analysis can assign to profitability segments: Financial Accounting (G/L account postings), Materials Management (goods issues, invoice receipts, purchase orders), Sales and Distribution (sales orders and billing documents) and period-end closing. In period-end closing you can assign internal activities to segments, assess cost center costs and business process costs to segments, and settle orders, projects and cost objects to segments. The page adds that the period-end processes of cost center assessment and settlement are essentially a top-down distribution function for specific cost objects.
Top-down distribution is the function for an amount that was posted at an aggregated level, for example a freight
invoice booked on a product group. It spreads the amount to a finer level, such as the product, using a reference like
sales revenue. The sender rule is Posted Amounts and the receiver rule is Variable Portions, as the
Allocations page explains. Allocation cycles created for the Margin Analysis
context can be scheduled with the job Universal Allocation Run - Margin Analysis, which supports test runs, live runs
and reversals, single or recurring, by cycle or by cycle group. On premise, SAP’s page for deferred summarization names
the transaction KE28 for top-down distribution (requires an SAP system; not run here).
Contribution margins
A contribution margin is what is left of revenue after you subtract costs at one step of a cost structure. SAP does not fix one list of steps: the structure is built from the G/L accounts and functional areas of the income statement, and what you call a first or a second level is a choice of your reporting. This page uses two steps for the example, because two are enough to show the idea. The margin of a segment is then
where is the revenue of profitability segment and is the cost of kind , for example cost of goods sold or freight, that is assigned to it. The margin rate is .
Worked example for company code EX01
Example Trading Co. sells two product groups, PG-A and PG-B, from company code EX01 (EUR, group currency GBP,
ledger 0L, controlling area EX00). All numbers are illustrative values for this site, not delivered content, and
tax is left out. The made-up rate is 0.85 GBP for 1 EUR. Four events happen in the month:
-
Billing documents of 12,000.00 EUR: 8,000.00 EUR for
PG-Aand 4,000.00 EUR forPG-B. The billing documents carry the segment, so this is true account assignment. -
Cost of goods sold posted at delivery: 4,800.00 EUR for
PG-Aand 2,200.00 EUR forPG-B, also true assignment. -
Packing costs of 600.00 EUR on the cost center
EX-PACK, which works only forPG-A. A derivation step gives every posting to the cost center the product groupPG-A, so the line has an attributed segment. -
A freight invoice of 900.00 EUR, posted at an aggregated level without a product group, is spread by revenue with top-down distribution.
The freight distribution uses the same arithmetic as the allocation page. With the amount to spread and the revenue of receiver ,
and 600 plus 300 equals the 900 that was posted. The result per product group, in EUR, follows.
| Step | PG-A |
PG-B |
Total |
|---|---|---|---|
Revenue |
8,000.00 |
4,000.00 |
12,000.00 |
Cost of goods sold |
-4,800.00 |
-2,200.00 |
-7,000.00 |
Margin after cost of goods sold |
3,200.00 |
1,800.00 |
5,000.00 |
Margin rate |
40.0% |
45.0% |
41.7% |
Packing cost (attributed) |
-600.00 |
0.00 |
-600.00 |
Freight (distributed) |
-600.00 |
-300.00 |
-900.00 |
Margin after packing and freight |
2,000.00 |
1,500.00 |
3,500.00 |
Margin rate |
25.0% |
37.5% |
29.2% |
Same margin in GBP at 0.85 |
1,700.00 |
1,275.00 |
2,975.00 |
The checks are simple. Revenue minus cost of goods sold is 12,000 - 7,000 = 5,000, and 5,000 - 600 - 900 = 3,500. In
GBP, 3,500 x 0.85 = 2,975.00, and the two segments give 1,700.00 + 1,275.00 = 2,975.00. The result of the example is the
point of the exercise: on the first step PG-B looks better (45.0% against 40.0%), and after the costs that belong to
the products it is still better (37.5% against 25.0%) but the gap is wider, which only the attributed packing cost
explains. Without the derivation step the 600.00 EUR would have waited as unassigned cost until a period-end allocation.
The company result, 3,500.00 EUR, does not change when a cost is distributed between segments, in the same way that a
distribution to profit centers moves cost without creating any.
The same journal entry lines also carry the profit center. Margin analysis cuts the postings by market, Profit Center Accounting cuts them by responsibility, and both read the same ACDOCA lines, so neither one needs a transfer from the other.
Reporting
Margin analysis reporting reads the journal entry lines, so it is reconciled with the income statement by construction. SAP’s help names these apps; they are Fiori apps, so what you can start depends on your launchpad roles.
| App | What it does |
|---|---|
Display Line Items - Margin Analysis |
Shows the journal entry line items that are relevant for margin analysis. The default value of Account Assignment Type is EO, which shows true assignment; change it to see attributed assignment, or clear it to see all line items. You can display the items by ledger and open the line item details by field group. |
Product and Service Margins (app ID W0164) |
Analyzes revenue, cost and contribution margin across objects such as profitability segment, project, WBS element and sales order item, with revenue, cost and margin key figures such as billed revenue, recognized margin and reserves. |
Product Profitability with Production Variances |
Analyzes the contribution margin of individual products. It drills down on fixed and variable costs based on the standard cost component split, and on production variances, billed quantity and margin per unit. A line counts only if its journal entry is assigned to a profitability segment and the field Product Sold is filled. Values show in the global currency, and you can add the amounts in company code currency as measures. |
Which reports you build on top of these views, and which key figure schemes you define, is a design choice that depends on your operating concern. In costing-based profitability analysis SAP describes a key figure scheme as a group of formulas, built on value fields, that calculates key figures such as a contribution margin; margin analysis takes its values from accounts instead, so there are no value fields to define.
Sources: Display Line Items - Margin Analysis (SAP Help Portal, on premise), Product and Service Margins (SAP Help Portal, on premise), Product Profitability with Production Variances (SAP Help Portal, on premise), Key Figure Scheme (SAP Help Portal, on premise), Universal Allocation Run - Margin Analysis (SAP Help Portal, on premise)
Data volume
SAP describes one option for very large data volumes. Deferred summarization for margin analysis reduces the number of
journal entry lines that carry profitability characteristics. SAP calls it a function for exceptionally large data
volumes with critical performance and storage problems, to be used only when other summarization options are already in
use, because it limits the flexibility of reporting and its effects normally cannot be reversed. A report named
FINS_MA_DSUM_ANALYZE estimates the reduction before you decide. Journal entries processed by it should not be handled
with top-down distribution through KE28. Treat it as a decision for a specialist who has checked the SAP Notes named on
the page (requires an SAP system; not run here).
Differences between the editions
-
Operating concern. On premise you define the operating concern in Customizing and generate it. In the Public Edition, SAP states that one account-based operating concern is predefined and runs in the background, that you cannot maintain it, that you cannot generate a user-defined one in parallel and that there are no template operating concerns. SAP’s FAQ names the predefined operating concern A000.
-
Costing-based profitability analysis. Available on premise, in parallel with margin analysis. In the Public Edition SAP states that it is not possible and not planned.
-
Derivation. On premise, SAP’s page describes CO-PA derivation as a tool with its own rules. In the Public Edition a fixed set of derivation rules is delivered for the characteristics of A000 and cannot be changed, and you define substitution rules for the business context Market Segment with the Manage Substitution/Validation Rules app. For extension SAP names the BAdI Market Segment Extension Fields Substitution (
FINS_MARKET_SEGMENT_SUB). -
Attributed assignment. SAP says it is available in the Public Edition, and that SAP Best Practices content is shipped to activate it automatically. On premise it is a Customizing activation.
-
Deactivation. SAP states that margin analysis cannot be deactivated in the Public Edition.
Common errors and pitfalls
-
Expecting attributed lines in allocations. Settlement, allocation and top-down distribution read only true assignments. A cost that shows in a product report through attribution is not a sender or receiver for them, and the newly created lines are attributed again by the system’s logic.
-
Looking for value fields. Value fields belong to costing-based profitability analysis. A report that you expect to find in "value fields" in margin analysis will not exist; use the accounts and the characteristics.
-
Too many characteristics in the segment. A characteristic that is almost always filled and different on every line makes the number of profitability segments, and the data volume, grow without helping the analysis.
-
Reading an old name as a different thing. "Account-based profitability analysis" on a screen or in an old guide means margin analysis.
-
Comparing a product report with the profit center report. They cut the same postings differently, so a segment total is not expected to equal a profit center total; compare each with the income statement instead.
Summary
-
Margin analysis is the recommended form of Profitability Analysis in SAP S/4HANA. It stores costs and revenues in accounts, in the Universal Journal, so it is permanently reconciled with Financial Accounting.
-
The operating concern defines the characteristics, such as product or customer. A combination of characteristic values is a profitability segment, and the system finds the operating concern from the company code through the controlling area.
-
A line has a true assignment when the sending application or a manual entry gives it a segment, and an attributed assignment when the system derives one from the cost center, order, project or sales order. Only true assignments reach allocations and settlement; attributed ones are in reports.
-
Contribution margins are revenue minus the costs at a chosen step. In the example,
PG-Aearns 2,000.00 EUR andPG-B1,500.00 EUR after packing and freight, 3,500.00 EUR (2,975.00 GBP) in total. -
On premise you can define the operating concern and run costing-based profitability analysis in parallel; in the Public Edition one account-based operating concern, A000, is predefined and costing-based analysis does not exist.
References
-
Profitability Analysis (CO-PA) (SAP Help Portal, on premise)
-
Profitability Characteristics in Journal Entries (SAP Help Portal, on premise)
-
Costing-Based Profitability Analysis (SAP Help Portal, on premise)
-
Assigning the Operating Concern (SAP Help Portal, on premise)
-
Display Line Items - Margin Analysis (SAP Help Portal, on premise)
-
Product Profitability with Production Variances (SAP Help Portal, on premise)
-
Deferred Summarization for Margin Analysis (SAP Help Portal, on premise)
-
Universal Allocation Run - Margin Analysis (SAP Help Portal, on premise)
-
Assign Profitability Segment (SAP Help Portal, Public Edition)