Sub topic 4
The company: grouping company codes for consolidation
This chapter assumes you know what a client and a company code are (covered in earlier chapters). It also assumes you can read a simple Open SQL SELECT.
What a company is
A company is an organisational unit that groups one or more company codes. Its main purpose is consolidated financial reporting. Each company code keeps its own books and balance sheet. To report for a corporate group, you need a way to say which company codes belong together. The company provides that link.
A company has a short ID of up to six characters. It also has a name and address data. It holds no postings or balances itself. The company codes underneath it hold the data.
Rules for the assignment
- A company can contain one or many company codes.
- A company code belongs to at most one company.
- A company belongs to the client in which it is defined.
- The company is optional. A company code works without one, but legal consolidation then has nothing to group by.
The company sits above the company code in the financial hierarchy. It is not part of the plant and storage location chain. Plants and storage locations never refer to a company directly. They reach one only through the company code that their plant is assigned to.
A worked example
A retail group has a German company code (1000) and an Austrian company code (2000). Both are legal entities with separate balance sheets. The group also owns a US subsidiary (3000).
The group's reporting needs are:
- Group A covers the German-speaking market. Its management wants one consolidated view of codes 1000 and 2000.
- Group B is the US business and is consolidated on its own.
The team defines two companies and assigns 1000 and 2000 to the first and 3000 to the second. A consolidation tool can now read the company assignment and combine the right ledgers.
Companies and intercompany business
The company ID is also used as the trading partner. When one company code sells to or buys from another company code in a different company, the document can carry the partner's company ID. Consolidation uses it to eliminate intercompany receivables and payables. Business partner master data has a trading partner field for this purpose.
Where to maintain and read it
Companies are defined in customizing with transaction OX15. Company codes are assigned to a company in the company code's global data, which you can reach with OX02. In the database, the company ID is stored in the company code table T001 in the field RCOMP. This query counts company codes per company:
SELECT rcomp,
COUNT( * ) AS company_codes
FROM t001
GROUP BY rcomp
INTO TABLE @DATA(lt_companies).A row with an empty rcomp is the group of company codes that have no company assigned.
Common errors
- Treating the company as a legal entity. The legal entity in SAP is the company code. The company is a grouping for reporting.
- Expecting plants to belong to a company. A plant's company comes only from its company code.
- Forgetting the assignment. A company that exists but has no company codes does nothing. Check that each company code carries its
RCOMPvalue. - Mixing up the company and the controlling area. The controlling area groups cost accounting and is covered in a later chapter. The company serves legal consolidation.
Exercise
A group has company codes 1000, 2000, and 3000. Codes 1000 and 2000 must be consolidated together, and 3000 is reported separately. How many companies do you define, and which table field links a company code to its company?
Show answer
Define two companies: one for 1000 and 2000, and one for 3000. The link is the field RCOMP in table T001, which holds the company ID for each company code.