What is a Company Code in SAP ?
Company Code is a legal entity of Financial Accounting for which you draw individual financial statements ( Balance Sheet and Profit & Loss Account ) for purpose of external statutory reporting. In other words, the organizational unit for which a complete self-contained set of accounts can be drawn up for external reporting purpose.
The Creation of company code in sap is mandatory and at least one Company Code should be defined in the system for implementing FI.
Transaction code to Define company Code is OX02