Since Real-time Derivation in Margin Analysis is quite a new topic, Henry wants to understand the concept in order to evaluate in the project, in which scenarios this tool could be used.
In the past, derivation in CO-PA could be used to fill many of the CO-PA dimensions (usually product, customer, and/or region), and CO-PA returned the contribution margins.
However, for certain business cases, expenses and revenues had to be posted to cost objects such as WBS elements, internal orders, or sales orders first.
In the second step, these objects had to be settled to CO-PA.
In addition, for overhead costs, expenses had to be posted to cost centers first. At period-end closing, these were allocated to CO-PA.
Therefore, profitability analysis was not completed until the period-end allocations and settlement processes were completed to transfer the overhead and missing values to CO-PA.

With Margin Analysis, derivation rules can be set up to derive market segments from cost centers, orders, and WBS elements during posting.

This enables you to work with more extensive data in margin analysis within a period, that is, you can get business insights in real time and do not have to wait until period-end closing.
Therefore, this new type of derivation is also known as real-time derivation.
Period-end closing may also be faster, since period-end closing tasks such as settlements or allocations can be omitted for certain business cases.
In general, there are two cases with profitability segments that are recorded in the journal entry in SAP S/4HANA:
Case1:
Income statement items that have a true account assignment to a profitability segment (ACDOCA: Object Type field (ACCASTY) = EO)
Case 2:
Income statement items with a different cost object (not to profitability segment and ACDOCA: Object Type (ACCASTY) <> EO field) in which a profitability segment can also be derived.
Postings from the second case are called account-based attributes (also known as attributed profitability segments).
The attributed characteristics are based on the best-guess principle using the information that is available at this point in time.
Activation of the Derivation in Customizing
Real-time derivation for postings without real profitability segment can be activated in Customizing for the following controlling types:
- Cost center
- Internal order
- Project
- Sales Order
- Production order
- Maintenance order
- Service documents (service orders or service contracts).
Use the following menu path in customizing to activate real-time derivation separately for each supported cost object type and also for other criteria within an object type (for example, only for a specific cost center category or project profile):
Controlling → Profitability Analysis → Master Data → Activate Derivation for Items without Profitability Segment .

There are two special cases where also balance sheet accounts without an assigned cost element or G/L accounts of type N — Nonoperating Expense or Income, are attributed:
- WIP (Work in Process) Postings from Event-Based Revenue Recognition
- External settlement of results analysis data to Finance.
For this reason, a separate activation indicator for balance sheet accounts is available for projects and other objects with revenue, but not for cost centers.
The attributed characteristics are derived using the derivation tool that was already described.
For internal orders, projects, sales and service orders, the derivation can also read data from a settlement rule or from an assigned sales order.
This means that if you settle to CO-PA, you can set up a derivation to read the settlement rule or the sales order item and add the CO-PA characteristics to the posting line when you post to an order or project.
See SAP Note 2439201 - S/4 HANA Finance: Derivation logic when determining "attributed" profitability segments.
Also see SAP Help: https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/48f4b4785b8e45938ac44a67be8032d9/f40df478a24a40b197a68467cc155e82.html
The following example shows a characteristic derivation rule for the characteristic Product to be derived from the cost center.
According to the rule, if postings are made to cost center 10101601 — Marketing (DE), the value F2-00 — Bicycle Trailer Gr00 is derived for the Product field.
This derivation rule (step 15) was positioned before the characteristic derivations of Product_Line (step 16), the Price_Category (step 17), and the Sales_Campaign_Segment (step 18).
This means that if real-time derivation for cost centers has been activated in addition to characteristic derivation, the product Bicycle Trailer Gr00 is derived during a posting to the Marketing (DE) cost center, and the other three characteristics are also derived.
All four characteristics are then assigned immediately to the relevant profitability segment when the posting on the cost center is executed.

Scenario 1
As described in the following figure, let us first assume that real-time derivation for cost centers has not been activated and the Post General Journal Entries app is used to post marketing costs (G/L Account 65301000 — Marketing Expenses) to cost center 10101601 — Marketing (DE).
In this case, only a real account assignment is made to the cost center.
Note

Note
In the figure above, the object type is KS (for cost center), that is, the cost center posting is the real posting that can be further allocated.
When you execute a report for Profitability Analysis, for example: Market Segments - Actuals, you can see that:
- The Account Assignment Type field represents the Object Type field with the value KS and therefore indicates in the report that a real account assignment was made to the cost center.
- According to the settings in scenario 1, # - Not assigned exists for the fields Product Sold, Product_Line, Price_Category, and Sales_Campaign_Segment, that is, no real-time derivation was performed.
This is shown in the figure below:

Scenario 2
Let us now assume, as described in the figure below, that real-time derivation has been activated for cost centers.

The Post General Journal Entries app is used to post marketing costs (G/L account 65301000 — Marketing Expenses) to cost center 10101601 — Marketing (DE).

In this case, during the posting, in addition to the real account assignment to the cost center (object type KS), the real-time derivation of the four specified characteristics that are posted to a profitability segment (Profitab Segmt No. 386) also takes place.
When you execute a report for Profitability Analysis, for example: Market Segments – Actuals, you can see that the derived assignment exists for the specified fields, that is, a real-time derivation has been performed.
The profitability segment is available for reporting.
Likewise, due to the characteristic Account Assignment Type selected in the report with the value KS, you can see that the account assignment to the cost center was the real account assignment and the posting to the profitability segment is the attributed account assignment, that is, the statistical posting.
This is shown in the figure below:

The Object Type field specifies which CO object has the real primary account assignment:
- KS - Cost Center
Here, the cost center has the real account assignment. If there is a material or customer in the same line, you immediately know that it is the attributed (statistical) value from the real-time derivation.
- EO - Profitability Segment
Here, there is a real account assignment in margin analysis. Only lines with this status are included in real margin reporting and can be distributed top-down within Margin Analysis.
- OR - Internal Order
An internal order is the real carrier of the costs; the CO-PA characteristics are also only attributed here.
- PR - Project / WBS element
A project or WBS element is the real carrier of the costs, the CO-PA characteristics are also only attributed here.
If you want to ensure in reporting or in a SE16N query of ACDOCA that you only see the real values and that the statistical postings for postings within the month are hidden, you must enter the following for the field Account Assignment Type or Object Type (technical: ACCASTY) as follows:
- Filter for the cost center values that have not yet been allocated: ACCASTY = KS
- Filter for real Margin Reporting: ACCASTY = EO
Restrictions for real-time derivation
If the real account assignment is on the cost center and the profitability segment (e.g. the material) was only determined using real-time derivation, it is a so-called attributed account assignment (attributed profitability segment).
In this state, the following rules apply within margin analysis:
- No direct further distribution:
You cannot use this value as a sender for a top-down distribution within margin analysis. At this point, the field in the table ACDOCA for the profitability analysis is only a statistical "attribute" for reporting, "not a real imputed pot", which you could empty.
- The cost center locks the value:
Since the cost center is the real account assignment object, it "owns" the money. The value is "locked" on the cost center and can only leave the system using the cost center.
- At the end of the month, a cost center assessment (allocation) is to be executed into Profitability Analysis.
- Only then does the value moves physically from the cost center and becomes a real profitability segment in Margin Analysis, which can then be distributed top-down in a second step.
When you execute the cost center assessment, the original posting, that is, the primary posting executed within the month (for example: Marketing Costs of 100 € on cost center 10101601 — Marketing (DE) with the attributed characteristics Product, Product_Line, Price_Category, Sales_Campaign_Segment) remains unchanged in the database table ACDOCA.
There is no subsequent reversal, clearing, or direct offsetting entry on the original line item of the real-time derivation.
During month-end cost center assessment (allocation), the system generates new line items. The cost center is credited using a secondary clearing account (allocation cost element 42).
On the receiver side (the "correct" market segments), there are debit postings with the real account assignment/debit on the profitability segment.
The figure below visualizes this.

If cost center reporting apps are called, the primary posting (debit) is canceled with the assessment posting (credit). The cost center is cleanly credited to EUR 0.
If margin analysis reporting apps are executed, you should filter in the report for the Account Assignment Type field to the value EO (profitability segment).
As a result, all statistical cost center postings are immediately removed from the view.
You can only see the real values and the result after the final month-end assessment.
As a result, the original, purely statistical value is hidden in contribution margin accounting so that no double counting occurs.
Advantages of real-time derivation:
Real-time margin analysis within the period
Disadvantage of real-time derivation:
Reporting within the period is based on the best-guess principle only. After period-end closing, you get different results for the changed CO-PA characteristics (for example: product and customer).
Anything that would create multiple lines doesn't work in real time. It is only possible to extend the posting line, for example, to post to the cost center and certain CO-PA characteristics, as shown in the example.
A posting item cannot be distributed to different receivers as in a settlement (for example, 50% to product group A and 50% to product group B).
Settlement of orders and projects is therefore still required in the following cases:
- If the settlement is to multiple receivers and not 100% to only one profitability segment.
If the settlement is not to CO-PA, but to other receivers (cost center, assets, G/L account, and so on).
- Profitability analysis or calculation of work in process (WIP) must be performed at period-end closing.
Recommendation:
- If you expect a significant change to the attributed CO-PA characteristics during period-end closing and do not want to display any best-guess results only in reporting within the period, you should not activate real-time derivation for such cases.
- If settlements, allocations, and/or a top-down distribution are still required, we recommend that you check the effects on reporting before you activate real-time derivation.
- You should only activate real-time derivation for cases in which you know the final profitability segments, that is, no further settlements or allocations to CO-PA or top-down distributions in CO-PA are required.