Sub topic 5
Example: defining enterprise structure in the IMG
This chapter walks through one concrete IMG task: defining the organizational units that every later configuration step refers to. It assumes you can navigate SAP GUI, know what a client is, and understand that IMG activities write to Customizing tables that can be recorded in a Customizing request.
Why enterprise structure comes first
Enterprise structure is the set of organizational units that mirror the legal and operational shape of a company. Examples are company codes, plants and sales organizations. Almost every other Customizing table uses one of these units as part of its key. Examples are a chart of accounts assigned to a company code, a valuation area tied to a plant, and pricing set up per sales organization.
Because of this dependency, enterprise structure is configured early. Changing it later is expensive. A company code that already holds postings cannot simply be renamed or removed, and some assignments are locked once data exists.
All of these units are Customizing, not Workbench objects. You create them through IMG activities, and the rows land in client-dependent tables. If the client allows recording, those rows travel in a Customizing request.
Where it lives in the IMG
In SPRO, open SAP Reference IMG and expand Enterprise Structure. The node has two main branches.
- Definition creates the units, for example under Financial Accounting, Logistics - General, Sales and Distribution, and Materials Management.
- Assignment links units to each other, for example a company code to a company, or a plant to a company code.
The split matters because definition and assignment are separate activities. Each one writes to its own tables, and each one asks for a Customizing request when you save.
| Unit | Typical IMG activity | Role | Assigned to |
|---|---|---|---|
| Company | Define Company (OX15) | Legal entity for consolidation | Company codes (OX19) |
| Company code | Edit Company Code Data (OX02) | Smallest unit with its own balanced books | A company, a chart of accounts, a fiscal year variant |
| Plant | Define Plant (OX10) | Production or storage location of a company code | A company code (OX18) |
| Storage location | Maintain Storage Location | Inventory location inside a plant | A plant |
| Sales organization | Define Sales Organization | Selling unit responsible for terms of sale | A company code |
Transaction codes are shortcuts to the same IMG activities. Menu paths and codes vary a little between releases, so confirm them in your own system's IMG before relying on them.
Step-by-step: defining a company code
Suppose the project needs a new company code for a German subsidiary. The steps below are a typical sequence.
- Confirm the target client in SCC4. In a development client, the setting should allow automatic recording of changes. Otherwise the save either fails or you cannot transport the result.
- Open SPRO and go to Enterprise Structure > Definition > Financial Accounting > Edit, Copy, Delete, Check Company Code.
- Choose Edit Company Code Data. This opens the maintenance view for table T001.
- Choose New Entries and enter the key and the descriptive fields:
- Company code, for example
1100, which is a four-character key. - Company name and city.
- Country and currency, for example
DEandEUR. - Language.
- Save. A dialog asks for a Customizing request. Pick an existing open request or create a new one.
- Define a company if you need one, then assign the company code to it in the assignment branch.
- Assign the company code to its chart of accounts and fiscal year variant in the Financial Accounting global settings.
If you can reuse an existing company code, the IMG offers Copy Company Code (EC01). It copies the company code together with many dependent settings, such as the chart of accounts assignment and account determination. This saves a lot of manual entry, and you still need to review the copy for values that should differ.
What actually gets recorded
The maintenance view V_T001 is a window onto table T001. When you save, the system writes the new row to T001 and adds an entry to your Customizing request. The request typically holds an object of type view contents (VDAT) for the view, and table entries (TABU) selected by key.
Request: DEVK900123 (Customizing request)
Owner: CONSULTANT1
Task: DEVK900124
R3TR VDAT V_T001 (view contents, maintained via SM30 or the IMG)
R3TR TABU T001 (table entries, selected by key)The TABU entry carries the key of the company code you created, not the whole table. On import, only the entries named in the request are changed in the target system. This is why you can create several company codes in different requests and import them independently.
Keep the assignments in the same request, or in a request that imports right after it. If an assignment reaches production before the unit it refers to, the import can fail or leave the system with inconsistent Customizing.
Verifying the result with ABAP
You do not need ABAP to configure the IMG, but a small report is a quick way to check what a client contains. Table T001 is client-dependent. Open SQL returns only rows for the current logon client, so no MANDT condition is needed.
REPORT zdemo_company_codes.
SELECT bukrs, butxt, ort01, waers
FROM t001
ORDER BY bukrs
INTO TABLE @DATA(company_codes).
LOOP AT company_codes INTO DATA(cc).
WRITE: / cc-bukrs, cc-butxt, cc-ort01, cc-waers.
ENDLOOP.Run this in development and again in the quality client after the import. The two lists should match for the company codes you transported. If one is missing, check the request contents, the import logs, and whether the import went to the intended client.
Edge cases and common errors
- Wrong client. The IMG writes to the client you are logged on to. A company code created in client 100 does not exist in client 200 of the same system until it is transported or copied.
- No request prompt. If SCC4 does not record changes, the save succeeds silently and the row cannot be transported. You find out only when the target system lacks it.
- Assignment before definition. Importing an assignment for a plant before the company code exists in the target system produces errors or incomplete data. Keep the sequence definition first, then assignment.
- Changing used units. A company code with postings cannot have its currency changed, for example. Decide currency, chart of accounts and fiscal year variant before any business data exists.
- Copy leftovers. A copied company code inherits settings from the source. Review tax, address and account determination entries that should be different.
- Changes outside the IMG. Entering rows directly in SM30 may bypass the checks and dependent updates the IMG activity applies. Prefer the IMG path.
Summary of the pattern
Enterprise structure shows the general IMG workflow in a small space. You choose an activity in SPRO, maintain a view over a client-dependent table, and save into a Customizing request. You then repeat the steps for the dependent definitions and assignments, and release the request so the import can follow the same order in each system.
Exercise
You created company code 1100 in the development client and assigned plant 1101 to it, saving each step into a different Customizing request. In the quality system, the plant assignment request was imported first and it failed. Explain why this likely happened and what you should do.
Show answer
The plant assignment refers to company code 1100, which did not yet exist in the quality system because its request had not been imported. Import the company code request first, then the assignment request. In future, keep dependent definitions and assignments in the same request or release them in order, and check the import log for the exact missing key.
Exercise
A colleague saved a new company code in the IMG and was never asked for a Customizing request. What should you check first, and where?
Show answer
Check the client settings in SCC4 for the client they were logged on to. If automatic recording of changes is off, or the client role does not allow it, the row is saved locally without a request, so it cannot be transported. Then re-enter the change in a client that records changes, or use another approved method to move it.