What Are Company Codes in SAP?

The company code in SAP is the smallest organizational unit of external accounting for which a complete, self-contained set of accounts can be created.


This includes the entry of all posted transactions and the creation of individual financial statements, such as the balance sheet and the profit and loss statement. In other words, the entity typically entering into an agreement with a supplier, from both an organizational structure and a legal standpoint, is usually a company code. Purchase orders must have a company code referenced in order to be created in SAP.


Creating a company code in SAP S/4HANA is the same as in previous SAP ERP iterations, and the guidelines for creating company codes still apply as well. You should try to minimize org structure levels and hierarchies whenever possible. Creating a large number of company codes will create system overhead. In a complex enterprise, this is sometimes unavoidable, and finance usually has a larger say in this area than procurement. The steps involved for creating a one-to-one company linked to a company code are as follows:

  1. To create the company, follow IMG menu path Enterprise Structure > Definition > Financial Accounting > Maintain Company, or run Transaction OX15 as in this figure.

Create Company

  1. Select New Entries, then enter your company name and address information.

Define Company Code

  1. Next, you need to create a company code and enter address information. To create a company code in SAP S/4HANA, first enter Transaction OX02 or follow IMG menu path Enterprise Structure > Definition > Financial Accounting > Define, Copy, Delete, Check Company Code. Then maintain the company code data at a high level as shown in the previous figure.

On this screen, you define the number (Company Code), Company Name, City, Country, Currency, and Language for the company code. You’ll define the full address in the accounting data in the next step.

  1. Once you’ve created the company code, maintain the company code address and key accounting data in Transaction OBY6. After you create a company code, it can be assigned to a company, controlling area, and/or a financial management area, as shown in the final figure. Here you can also update key areas like the chart of accounts, tax data, fiscal year reporting settings, and other finance-driven data. Note that this is not for procurement to define in a vacuum; procurement should be working in full conjunction with finance. Just as finance shouldn’t drive the purchasing org discussion, neither should procurement drive the company code definition at this level.

Change Company Code Data


Editor’s note: This post has been adapted from a section of the book Sourcing and Procurement with SAP S/4HANA by Justin Ashlock.


Sourcing and Procurement with SAP S/4HANA
Sourcing and Procurement with SAP S/4HANA

Get all the essential details to set up and use SAP S/4HANA for sourcing and procurement! Follow step-by-step instructions to configure your system for operational and direct procurement, inventory management, contracts, product sourcing, and invoices. Learn how SAP S/4HANA integrates with SAP Signavio, SAP Ariba, SAP Fieldglass, and more. Then, expertly run your system after go-live—see how to get the most out of your new analytics features and customize your UI. Explore the future of sourcing and procurement!

Learn More

SAP PRESS is the world's leading SAP publisher, with books on ABAP, SAP S/4HANA, SAP CX, intelligent technologies, SAP Business Technology Platform, and more!