Learn the definition of cost-of-sales reporting and how it is distinguished from period-based reporting. Follow the steps to define and derive functional areas to facilitate cost-of-sales reporting. Discover the benefits of cost-of-sales reporting by functional area and how it contrasts with other methods of cost-of-sales reporting that are more commonly used in the SAP system such as costing-based Profitability Analysis (CO-PA) and cost center reporting.
Key Concept
Functional areas save you hours of reconciliation time every month when trying to tie your managerial accounting (CO) reports (e.g., from cost centers or Profitability Analysis [CO-PA]) with the general ledger. You also can streamline the number of reports you need to create and use, as the functional area scenario is now part of the SAP General Ledger. This functionality already exists in your system as part of the FI/CO module, so you do not need to pay for anything extra other than the time it takes to set it up.
Cost-of-sales accounting is an alternative way of reporting your profit and loss (P&L) results. The traditional way of performing P&L reporting is by using the period-based approach in which you match sales with the costs for that period, according to what elements of cost were incurred. Elements of cost are basically represented by P&L accounts, such as salaries, travel expenses, maintenance, electricity, and so on. The cost-of-sales approach matches sales with costs for a period according to where the costs were incurred. This approach groups your costs into “functional areas” such as production, sales expenses, marketing, and administration. Therefore, the period-based approach identifies what costs were incurred, whereas the cost-of-sales approach identifies where the costs were incurred. When mapped correctly, the period-based and cost-of-sales accounting statements should be fully reconciled, with the only difference being how the costs are classified (Figure 1).

Figure 1
Period accounting statement mapped to cost-of-sales accounting
Almost every organization uses the period-based approach as this approach is represented by P&L accounts and cost elements. Also, many organizations also use some form of cost-of-sales accounting by using cost centers, Profitability Analysis (CO-PA), or general ledger accounts (creating several accounts for a single cost type, to represent the different functional areas they are incurred in, such as payroll – production, payroll – R&D, and payroll – sales).
Note
When I refer to general ledger, I mean the FI submodule used to record accounting transactions. SAP General Ledger is used to describe the new functionality such as parallel ledgers, document splitting, and segment reporting that SAP introduced a few years ago.
The problem with the first two approaches is that they are not always directly aligned with general ledger reporting. Cost center and CO-PA reports are sourced and updated from different tables to the general ledger, and hence, some reconciliation issues may arise. Using general ledger accounts could lead to an unmanageable number of accounts in the system if every expense account is broken down into all the areas in which they are posted. The use of functional areas eliminates these issues because with the SAP General Ledger, they resides in the same table (FAGLFLEXT) as the general ledger accounts, and since the functional area is its own object, it does not require any change or expansion of your chart of accounts.
In this article, I show you how you can easily activate cost-of-sales accounting and derive functional areas using the standard system functionality. I also show you a unique program that you can use to update functional areas retroactively on documents that have already been posted.
Assign Cost-of-Sales Accounting Scenario to Ledger
First, you need to activate Cost-of-Sales Accounting for your company code. To complete this step, follow IMG menu path Financial Accounting (New) > Financial Accounting Global Settings (New) > Ledgers > Ledger > Activate Cost of Sales Accounting. Make sure that the relevant company codes have the Active option selected in the COS Status field.
Now you need to assign the Cost-of-Sales Accounting scenario to the relevant ledgers. Go to the IMG menu path Financial Accounting (New) > Financial Accounting Global Settings (New) > Ledgers > Ledger > Assign Scenarios and Customer Fields to Ledgers. Highlight the relevant ledger and double-click the Scenarios folder on the left part of the screen. Click the New Entries button and enter scenario FIN_UKV (Figure 2).

Figure 2
Add functional area scenario to ledgers
Create Functional Areas
Now you define the functional areas on which you want to report. Remember that the objective here is not to create a functional area for each P&L account, but to have a functional area that represents an identifiable area to which costs have been incurred. A common approach to creating functional areas is to have a split by production, sales costs, marketing, and R&D. You also need to create revenue-based functional areas so that you can compare sales with cost-of-sales by functional area in one report. Go to transaction code OKBD to create functional areas and enter a key and description (Figure 3).

Figure 3
Create functional areas
Derive Functional Areas
If you want your functional area reporting to be fully reconciled with your period-based income statement, you need to make sure that every P&L-related posting has a functional area assigned to it. Thus, you need to review all the postings that are made to P&L accounts in your system and ensure that a functional area is derived by one of the following methods (in order of override priority):
- Direct posting: You can enter a functional area directly when posting a document (such as using transaction FB50 or FB60). You need to make sure that the field status of the general ledger account you are posting to has the functional area as a required or optional field (set in transaction OBC4).
- Substitutions: If you want functional areas to be derived based on specific prerequisites (not covered by the other derivation methods), you can create a substitution rule specifying what needs to happen in a document in order for a functional area to be derived. This step is done using transaction OBBH.
- Assign the functional area to general ledger accounts: You can assign functional areas directly in the general ledger master record by going to transaction FS00 and entering a value in the functional area field in the Type/Description tab. Alternatively, you can mass update your general ledger accounts with functional areas using transaction OB_GLACC11.
- Assign functional areas to cost elements: A primary cost element’s functional area is usually derived directly from the general ledger account with which it is associated. In the case of secondary cost elements, you can enter the functional area directly in the master data using transaction KA02.
- Assign functional area to cost objects: Functional areas can be assigned to most cost objects, such as cost centers, internal orders, production orders, or work breakdown structure (WBS) elements, by using the master data maintenance transactions (e.g., KS02, KO02, CO02, or CJ02).
- Assign a functional area to cost center categories: You can update functional areas in the relevant cost center categories so that the cost center created from that category automatically has the functional area defaulted. This step is done using transaction OKA2.
Redetermine Functional Areas
As you are reading this article, you might keep asking this question: We already have postings made in the year. How do we update functional areas in documents that have already been posted?
You can use a program to retroactively update functional areas in posted finance documents. To use this program you implement SAP Note 677630. The program name is different depending on your release (Table 1).

Table 1
Functional area correction programs for SAP releases
This article is based on the latest version of SAP, so I demonstrate how to use the program ZRFCORRFA_FAGL. I use an example of a cost center that previously did not have a functional area, and I have posted a journal entry to that cost center. The document will look like the screen shown in Figure 4.

Figure 4
Accounting document without functional area
You can see that the Functional Area field for document 100003962 is blank. This area is blank because cost center N9960 does not have a functional area assigned to it. It is a master record (also, none of the other aforementioned derivation methods exist). Now go to the cost center master in transaction KS02 and enter a functional area (Figure 5).

Figure 5
Add functional area to cost center master
When you save the entry by clicking the save icon
, you receive a message stating that transaction data already exists. Press the Enter key to confirm the message.
Now go to transaction SE38/SA38, enter program ZRFCORRFA_FAGL, and click the execute icon
. Alternatively, you can have a custom transaction code created for this program so that users do not need to access transaction SE38 in the productive environment (which some businesses frown upon). This step brings you to Figure 6.

Figure 6
Functional area correction report
I entered the specific document number that I posted, but you can choose to leave this field blank (if you want all document numbers to be selected) or choose some other restriction criteria (such as document type and posting period to narrow down the selection). Obviously, be careful not to run this report too wide open so that it does not affect your system’s performance. At the bottom part of the screen (not shown in Figure 6), there is a section called Exceptional Derivation. Make sure that you select the Standard Derivation button in this section. Also, the default setting for this report is to run in Test Run mode. To have the option to run the report in Update mode, enter the word update in the command field (Figure 7).

Figure 7
Enter update in the command field
Press the Enter key, and the Control Parameters section appears (Figure 8). Take the flag off the Test Run check box (obviously, run the program in test run mode first!) and click the execute icon
. You receive a log output as shown in Figure 9 if everything is successful.

Figure 8
The Control Parameters section

Figure 9
Log output of functional area corrections
In Figure 9, you see in the Entry-View (BSEG) section that there were two lines in the document that I posted, but only the second line (which contained the P&L account) was relevant for a functional area update. You see from the highlighted part of this section that only the second line contains the new functional area. The balance sheet account did not have an update because it was not relevant for functional area derivation. In the New GL View section you see that the new functional area was updated in all the relevant ledgers: 0L, L5, and L6.
Now, if you go back to the document that was posted, you see that the functional area has been updated in the relevant line (Figure 10). You can report on functional areas by using standard drill-down reports such as transaction S_PL0_86000028. Alternatively, you can create your own drill-down reports using transaction FGI1 or Report Painter reports using transaction GRR1. The key thing to note is that as functional areas now exist in the same tables as the SAP General Ledger, all you need to do is specify the relevant table (FAGLFLEXT, for example) in order for the functional area field to be available.

Figure 10
Accounting document with new functional area
Paul Ovigele
Paul Ovigele is the founder of ERPfixers, an online micro-consulting platform (https://www.erpfixers.com). He has worked as an ERP financials consultant since 1997 in both North America and Europe, specializing in implementing the FI and CO modules along with their integrated areas for companies in industries such as consumer goods, chemicals, logistics, pharmaceuticals, apparel and entertainment. Paul has delivered numerous training sessions to finance professionals at both the functional and managerial levels, and he has presented at various SAP financials conferences around the world.
You may contact the author at paul@ovigele.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.