S/4HANA Cost Elements

This blog post about S4HANA Cost Elements is from our friends at SAPexpert - the source for trusted SAP tutorials, tips, and training content.


With S/4HANA Finance, the universal journal includes a single field account that covers both the general ledger (G/L) account and the cost element. As companies migrate to S/4HANA Finance, the system merges their existing G/L accounts and cost elements.

The transactions for the creation and maintenance of cost elements become obsolete, replaced by a single transaction for account maintenance. However, this technical change does not mean that the idea of a cost element has disappeared with S/4HANA Finance. Learn what changes come with S/4HANA Finance and what remains as before.


Key Concept

The cost element design within the controlling area is a vital part of setting up your controlling (CO) system. In S/4HANA Finance, as the accounts and cost elements are merged, the following changes result:

  • The primary cost elements represent the profit-and-loss accounts used to classify your journal entries. In all accounting approaches, you use cost elements to represent wages and salaries, material expenses, depreciation, and many others. If you use account-based profitability analysis (CO-PA) or if you have make-to-order processes requiring results analysis and settlement, you also use cost elements for revenues or sales deductions. In S/4HANA Finance, the G/L account and the primary cost elements merge into one.
  • The secondary cost elements record the value flows within CO, such as the charging of utility costs from a support cost center to an operational cost center or the charging of machine-hours to a production order. Additional examples include the charging of consulting time to a Work Breakdown Structure (WBS) element or the settlement of research and development costs to CO-PA. In S/4HANA Finance, accounts are created for every secondary cost element so that all value flows are visible in the universal journal and thus in reports such as the trial balance.


A Controlling (CO) implementation typically starts with the decision regarding which profit-and-loss (P&L) accounts require primary cost elements and which don’t. There are typically a handful of P&L accounts that do not need to be reflected in CO—either because they have no impact on the operational business or are needed for a particular purpose, such as recording work in process (WIP).

However, for the majority of P&L accounts, the implementation team creates a separate primary cost element for each account. It makes sure that the correct CO account assignment can be updated as each journal entry is posted. This approach allows capturing salary postings by cost center or material expense postings by Work Breakdown Structure (WBS) element.


All these changes with S/4HANA Finance, where the accounts and cost elements merge, and the master data settings for the cost elements become part of the general ledger (G/L) account master.

This means that where you used to create primary cost elements using transaction code KA01, you now are directed to transaction code FS00 (Display G/L Account Centrally). While this all sounds quite radical, the fundamental nature of the account does not change, and you continue to use the field status groups to control which account assignments are valid for each business transaction as before.

The merge of accounts and cost elements does have an impact on your authorization profiles. You can create accounts with no CO impact if you have authorization for G/L account maintenance (these are typically given by account, company code, and account type). However, if you want to create an account that is simultaneously a cost element, you need authorization for both the G/L account and the cost element (authorization object K_CSKB).

The combination also means that you need to keep the period locks in sync and make sure that the account types that allow postings match the CO business transactions that allow postings at any given time.


Setting Up Your Accounts in S/4 HANA Finance

Figure 1 shows the account master data in S/4HANA Finance (transaction code FS00), which is a combination of the account maintenance and the previous cost element maintenance transactions (transaction code KA01-3).

G/L account showing the account type for the primary cost element

Figure 1: G/L account showing the account type for the primary cost element


The main change to this screen is that you can choose between P&L accounts that do not require a cost assignment by selecting the account type Nonoperating Expense or Income and P&L accounts that are associated with a CO account assignment by selecting the Account Type Primary Costs or Revenue.

In my example, you have a raw material expense account, and any raw material posting to this account needs to be assigned to a CO account, such as a cost center, order, or WBS element. If you are migrating, your field status groups will already be set up to include these CO account assignments.

As you go through the screens, notice that the old Default Assignment tab in the cost element master record is gone, so the only way to set up the default account assignments is to use transaction code OKB9 or follow IMG menu path Controlling > Cost Center Accounting > Actual Postings > Manual Actual Postings > Edit Account Assignment. If you have entered default account assignments in your cost element master data, the migration process creates entries in table TKA3A for these default assignments. You can check them using transaction code OKB9.

The account type alone does not define how the account is used in CO. This is done by assigning a cost element category to each account. To check the cost element category, select the Control Data tab as shown in Figure 2.

Control data for G/L account showing the cost element category for primary costs
Figure 2: Control data for G/L account showing the cost element category for primary costs


In this tab, you see that your raw material account has the cost element category 1 (Primary costs/cost reducing revenues). (This value appears in the CElem category field.) You want similar accounts or cost elements for wages and salaries, asset depreciation, material movements, and many others.

You can also use cost elements of category 3 and 4 if you work with accrual postings. If you are using account-based profitability analysis (CO-PA), you also want cost elements of category 11 for revenue and category 12 for sales deductions.

You also use these cost element categories if you have make-to-order processes requiring results analysis, where revenue or direct costs are assigned to a project or sales order. If you have settlement processes that capitalize expenses as either asset under construction or finished goods inventory, you also want cost elements of category 22 for external settlement.

Note that the old restriction that WIP accounts must not be cost elements continue to apply (in other words, the account type for the WIP offsetting entry must be Nonoperating Expense or Income).

With the settings for the primary cost elements made to the relevant accounts, it’s time to think about the secondary cost elements. Before I go into detail here, it’s worth recalling how a primary cost element differs from a secondary cost element. A primary cost element is an extension of a P&L account, and the offsetting entry is always to a balance sheet account (so a salary expense will offset to accounts payable, a revenue posting will offset to accounts receivable, and so on).

A posting to a secondary cost element balances to zero, but under the same account. Hence, a direct activity allocation credits the cost center and debits the order under the same cost element.

The switch is in the sender (here cost center) and the receiver (the order), and this, in turn, may trigger a shift in profit centers or functional areas, all of which are captured as partner relationships in the universal journal.

In the past, secondary cost elements were created using transaction code KA06, but in S/4HANA Finance, you again are redirected to transaction code FS00 (Display G/L Account Centrally). During migration, secondary cost elements are migrated into the G/L account tables (SKA1, SKB1, and SKAT) for all company codes assigned to the CO area. Figure 3 shows the G/L account master data for a secondary cost element for the allocation of machine costs.

G/L account showing an account type for a secondary cost elementFigure 3: G/L account showing an account type for a secondary cost element


Again, you can see the cost element categories by selecting the Control Data tab. Figure 4 shows that this cost element can be used for internal activity allocations (in other words, to charge machine costs from a cost center to orders or projects).

Control data for G/L account showing cost element category for secondary costsFigure 4: Control data for G/L account showing cost element category for secondary costs


As you think about your secondary cost element categories, think about these sender-receiver relationships. These relationships give you a cost element category of 43 for internal activity allocation (as shown in Figure 4), 21 for internal settlement, 41 for overhead rates, and 42 for assessment. You’ll see an example of such a sender-receiver relationship and the associated value flow when I explain how a secondary cost element appears in the trial balance at the end of this article.

If you’ve been working with the classic General Ledger, these movements are recorded in the reconciliation ledger if they cross-company code boundaries and are moved to the classic General Ledger at the period close using transaction code KALC. If you’ve been working with the SAP General Ledger, you probably have set up real-time integration to create journal entries for these movements. Both these approaches are obsolete in S/4HANA Finance.

You always see such movements reflected in the universal journal so that you won’t need a reconciliation ledger. Because the secondary cost elements are now G/L accounts, you won’t need to map the CO business transactions to reconciliation accounts in FI.

The secondary cost elements appear in your financial accounts whenever you perform the transactions listed above, provided that you include the new accounts in your financial statement versions. You can find the link by clicking the Edit financial statement version button shown in the ribbon in Figure 4.

If you are building up your financial statement version from scratch, you can still use transaction code KA23 (Cost Elements: Master Data List) to list all the cost elements and their attributes in your system. This makes grouping them for reporting purposes much easier than trying to use the F4 help.

Other secondary cost elements exist that don’t represent such sender-receiver relationships. If you work with Result Analysis, you still need cost elements of type 31 (order/project results analysis). If you are working with Project System, you still potentially need cost elements of types 50, 51, 52 (project-related incoming orders), and 61 (earned value).


Working with Accounts and Cost Elements in S/4 HANA Finance

Figure 5 shows a sample trial balance in S/4HANA Finance. You see the classic view showing the balances by company code and account on the right, but also the option to drill-down by Account Type, Accounting Document, and Activity Type on the left.

This view enables you to drill down by account type (material, asset, vendor, customer) in Financial Accounting but also by activity type (for example, the machine hours that are allocated using the account or cost element shown in Figures 3 and 4) in CO. This same merge is available in all-new financial reports in S/4HANA Finance.

Sample trial balance in S/4 HANA FinanceFigure 5: Sample trial balance in S/4HANA Finance


However, while the accounts and cost elements are merged in the new reports, you continue to see the term cost element on many of the screens. You find the term cost element in the assessment cycles, the settlement profiles, the costing sheets, and other areas. These configuration transactions work exactly as before.

You can use the example shown in Figures 3 and 4 to perform time recording or order confirmations via the work center. You can enter only accounts of cost element category 41 in your costing sheets and accounts of cost element category 42 in your assessment cycles, and so on.

What’s important is that your secondary cost elements provide the transparency you need for your analysis. Mainly if you’ve only worked with costing-based CO-PA in the past, there is a tendency to allocate and settle under a single cost element and rely on the value fields to give you the detail you need for reporting. You may want to create separate secondary cost elements to distinguish between marketing expenses and sales and administration expenses in your assessment cycles.

In Figure 6, for example, select the account for raw material costs that you looked at in Figures 1 and 2 within the trial balance (Figure 5) and drill down by cost center to show all the cost centers to which raw materials were posted within the selected time frame.

Trial balance showing raw material account and assigned cost centersFigure 6: Trial balance showing raw material account and assigned cost centers


By comparison, in Figure 7, a more classic approach is taken in which the cost center line-item report transaction code KSB1) is used to select all postings to the raw material cost element with these cost centers in the same time frame.

CO line-item report showing raw material cost element and associated cost centersFigure 7: CO line-item report showing raw material cost element and associated cost centers


What’s happening here is that the system is using compatibility views to simulate the existence of CO line items even though the CO data has been subsumed in the universal journal. This means that you won’t need to rework your existing reports after migration to S/4HANA Finance.

Indeed, if you use the relationship browser in the CO line-item display, you find it appears to show an accounting document and a controlling document. However, both documents are views on the universal journal that display the data as if the old structures still existed. You could continue to explore the trial balance, focusing on single accounts, such as raw materials and selecting other account assignments (such as orders and projects) or looking at different accounts, such as revenue accounts and drilling down to the CO-PA characteristics.

Instead, look at the account for the secondary cost element in Figures 3 and 4, then drill down to the sender and receiver objects that were updated during these postings.


Trial balance showing activity allocation and associated postings.Figure 8: Trial balance showing activity allocation and associated postings.


In Figure 8, note that you’ve drilled down to the sender cost center (1303) and the sender activity type (1420), which gives you a credit balance. The offsetting line is a debit balance. To see the account assignment, you have to pull the order number by choosing the appropriate option in the navigation panel. This is a straightforward example, but it gives you an impression of the fundamental changes available with S/4HANA Finance.

$(document).ready(function(){ $("img").addClass("lazy"); }); !function(t,e,o,i){var r=t(e);t.fn.lazyload=function(o){var i,n=this,a={threshold:0,failure_limit:0,event:"scroll.lazyload",effect:"show",container:e,data_attribute:"original",data_srcset:"srcset",skip_invisible:!1,appear:null,load:null,placeholder:"data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs="};function f(){var e=0;n.each(function(){var o=t(this);if(!a.skip_invisible||o.is(":visible"))if(t.abovethetop(this,a)||t.leftofbegin(this,a));else if(t.belowthefold(this,a)||t.rightoffold(this,a)){if(++e>a.failure_limit)return!1}else o.trigger("appear"),e=0})}return o&&(void 0!==o.failurelimit&&(o.failure_limit=o.failurelimit,delete o.failurelimit),void 0!==o.effectspeed&&(o.effect_speed=o.effectspeed,delete o.effectspeed),t.extend(a,o)),i=void 0===a.container||a.container===e?r:t(a.container),0===a.event.indexOf("scroll")&&i.off(a.event).on(a.event,function(){return f()}),this.each(function(){var e=this,o=t(e);e.loaded=!1,void 0!==o.attr("src")&&!1!==o.attr("src")||o.is("img")&&o.attr("src",a.placeholder),o.one("appear",function(){if(!this.loaded){if(a.appear){var i=n.length;a.appear.call(e,i,a)}t("").one("load",function(){var i=o.attr("data-"+a.data_attribute),r=o.attr("data-"+a.data_srcset);i!=o.attr("src")&&(o.hide(),o.is("img")&&(o.attr("src",i),null!=r&&o.attr("srcset",r)),o.is("video")?o.attr("poster",i):o.css("background-image","url('"+i+"')"),o[a.effect](a.effect_speed)),e.loaded=!0;var f=t.grep(n,function(t){return!t.loaded});if(n=t(f),a.load){var l=n.length;a.load.call(e,l,a)}}).attr({src:o.attr("data-"+a.data_attribute),srcset:o.attr("data-"+a.data_srcset)||""})}}),0!==a.event.indexOf("scroll")&&o.off(a.event).on(a.event,function(){e.loaded||o.trigger("appear")})}),r.off("resize.lazyload").bind("resize.lazyload",function(){f()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&r.on("pageshow",function(e){e.originalEvent&&e.originalEvent.persisted&&n.each(function(){t(this).trigger("appear")})}),t(function(){f()}),this},t.belowthefold=function(o,i){return(void 0===i.container||i.container===e?(e.innerHeight?e.innerHeight:r.height())+r.scrollTop():t(i.container).offset().top+t(i.container).height())<=t(o).offset().top-i.threshold},t.rightoffold=function(o,i){return(void 0===i.container||i.container===e?r.width()+r.scrollLeft():t(i.container).offset().left+t(i.container).width())<=t(o).offset().left-i.threshold},t.abovethetop=function(o,i){return(void 0===i.container||i.container===e?r.scrollTop():t(i.container).offset().top)>=t(o).offset().top+i.threshold+t(o).height()},t.leftofbegin=function(o,i){return(void 0===i.container||i.container===e?r.scrollLeft():t(i.container).offset().left)>=t(o).offset().left+i.threshold+t(o).width()},t.inviewport=function(e,o){return!(t.rightoffold(e,o)||t.leftofbegin(e,o)||t.belowthefold(e,o)||t.abovethetop(e,o))},t.extend(t.expr[":"],{"below-the-fold":function(e){return t.belowthefold(e,{threshold:0})},"above-the-top":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-screen":function(e){return t.rightoffold(e,{threshold:0})},"left-of-screen":function(e){return!t.rightoffold(e,{threshold:0})},"in-viewport":function(e){return t.inviewport(e,{threshold:0})},"above-the-fold":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-fold":function(e){return t.rightoffold(e,{threshold:0})},"left-of-fold":function(e){return!t.rightoffold(e,{threshold:0})}})}(jQuery,window,document); $("img.lazy").lazyload(); console.log(typeof($("img").lazyload) === "function")