Welcome to the tutorial about SAP CO Account Assignment. This tutorial is part of our free SAP CO training. You will learn how account assignment works in SAP ERP and what are different sources of information about account assignment that the SAP system uses.
Normally, when a financial document is entered in SAP FI module, user has the option of entering the cost center in the financial document. However, when documents are entered from different modules or a cross-module financial transaction occurs, such as from MM or SD, there is no option of entering the cost center in the document. In this situation, the SAP system will derive the cost center through automatic SAP CO account assignment, substitutions, or through default settings made in the primary cost element.
Automatic SAP CO Account Assignment
The automatic account assignment has to be configured in the transaction code OKB9. For posting made in external accounting, such as for price differences, exchange rate differences, etc., the SAP system automatically checks entries in the OKB9 settings and derives the cost center.
If you do not enter a CO object (order, cost center, or project) in external accounting postings made in FI, MM or SD modules and the posting is cost relevant, then the automatic account assignment checks the relevant cost center and makes the posting.
Here are examples of automatic account assignments:
- Banking fees, exchange rate differences and discounts in FI
- Minor differences and price differences in MM
The account assignment objects that can be maintained in the transaction OKB9 are:
Normally, the automatic account assignment runs on the company code level along with the CO object. However, if the user wants to make the posting on the business area level, valuation area level or profit center level, it is also available in OKB9 settings. So basically it includes the following levels:
- Company code level
- Business area level
- Valuation area level
- Profit center level
The above 3 excluding the company code level are used in cases when the account assignment is needed below the company code level.
Here are the prerequisites of activating automatic SAP CO account assignment:
- Activation of the cost center accounting
- Creation of cost centers
- Maintenance of cost elements
Additionally, you can also create orders and profit centers as per the business requirements.
Settings in Transaction OKB9
Let’s discuss settings that are possible for automatic SAP CO account assignment in OKB9 transaction.
Start SPRO transaction and navigate to the following path:
Controlling – Cost Center Accounting – Actual Postings – Manual Actual Postings – Edit Automatic Account Assignment (OKB9)
Alternatively, you can start OKB9 transaction directly from the command bar.
- If you want to have the setting on the company code level only, then enter the company code and the cost element along with the corresponding CO object, i.e. a cost center, an order or a profit center.
- If you want to have the settings on the valuation area level, then enter the company code and the cost element and chose the ‘valuation area’ option in the account assignment detail as ‘1’.
- Similarly, if you want to have the settings on the business area or profit center level, then choose the option ‘2’ or ‘3’ respectively.
If you have chosen account assignment detail ‘1’ or ‘2’, then click on ‘Detail per business area/valuation area’ on the left sidebar.
Enter the valuation area and enter the corresponding CO object, then click save button.
Default SAP CO Account Assignment
In order to determine the correct CO account assignment, the SAP system performs several checks in the following sequence. First it checks the document which a user is posting. If the cost center is empty in the document, then the system checks if any substitutions are maintained for the particular G/L account. Next, if the substitution is also missing, then the system moves on to the OKB9 settings for automatic SAP CO account assignments. Finally, if these settings are also missing, the SAP system checks master data of the primary cost element (G/L Account) under the tab of Default Account Assignment. You can display this master data using the transaction KA03.
You can maintain the cost center and the order in the master data of the primary cost element.
So, basically the order of checks the system makes is:
- Financial document – Cost center
- Substitutions – transaction OKC9
- Automatic account assignments – transaction OKB9
- Default account assignments – transaction KA03/KA02
Lastly, if any of the above is not maintained, then the SAP system throws an error ‘Account X requires an assignment to a CO Object’ and doesn’t allow posting of a document.
SAP CO Account Assignment using Substitution
In cases where you don’t need OKB9 or default account assignment, the user can go for user exits where a specific G/L account is mentioned under the company and the value in the cost center is substituted by the cost center given in the substitution.
The transaction for maintaining the substitution is GGB1.
Usage of substitutions for SAP CO account assignment is justified by the business requirement and usually SAP CO account assignment requirements are fulfilled by OKB9 or default account assignments.
Did you like this tutorial? Have any questions or comments? We would love to hear your feedback in the comments section below. It’d be a big help for us, and hopefully it’s something we can address for you in improvement of our free SAP CO tutorials.
Page last updated by Cleo Isco on
This content was created to clarify the system logic of the controlling accounting assignment.
You can define automatic account assigments or default account assugnments for postings of the primary cost element type.
The SAP system then automatically includes the specified (additional) account assignment for the primaty postings you make.
You define automatic and default account assignments for cost elements that you always post to a particular cost center. You can also define the assignment of an overhead
order or profit center to a cost element. Whether automatic or default, the account assignmments are default values that can be overwritten in the application.
Explaination of the system logic and checks in the account assignment
* Every posting to a cost element requires an assignment to an account assignment object.
* Each CO module has a relevant cost object (except Profit Center Accounting).
* In addition to the ‘real’ posting, ‘statistical’ postings to additional cost objects are possible.
* Objects receiving real vs. statistical postings are determined by the system.
* Each posting generates a duplicate posting in Profit Center Accounting; therefore, all PCA postings are ‘statistical’ by definition.
Information - Order that the accounting assignment is checked within CO
The following is the order of Checks used by the system sequentially:
The system will check if the Account Assignment is provided by the calling application or entered manually by the user.
In this example FB50.
OKC9 - Substitutions - System will check if a substitution is setup to provide the account assignment.
(Further information in relation to OKC9 see Note: 105024).
OKB9 - System will check for Default Account Assignments in transation OKB9.
(Further information in relation to OKB9 see Note: 105024)
If still no Account Assignment exists, the master data of the cost element will be assigned (can be an Order or Cost Center).
Error KI235 - Account X requires an assignment to a CO Object
If the master data has not been maintained with the necessary Account Assignment then the Error Message KI235 will occur unless the following modification is
implemented in your system.
What it's stronger ? Validation or Substitution ?
If you have defined a substitution that contradicts a validation condition, the system informs you of this by displaying a message.
Validation has priority than substitution.
SAP Note 41103 : INFO: CO account assignment logic
SAP Note 842318 : Frequently asked questions about validations + substitutions
SAP Note 392273 : When is validation/substitution called?
SAP Note 107650 : CO-internal postings:Account assignmnt.type fields
SAP Note 1296568 : KI235 - Requires a CO Account Assignment Logic
SAP Note 371517 : OKB9 not executable despite current settings
SAP Note 117655 : Default account assignment from OKB9 is not used