Sub topic 3
Organizational structure: the skeleton every module hangs on
This chapter assumes you know what an ERP system does, can read a simple SQL query, and understand tables, keys, and joins. It covers how SAP S/4HANA organizes a company into units that every module shares.
Why organizational units come first
Every document in S/4HANA, such as a purchase order or a billing document, is stored against organizational units. These units decide who can see the data, which currency and chart of accounts apply, and which postings are possible. Master data and transactions both depend on them, so you configure them before anything else.
The main organizational units
| Unit | What it represents | Main modules |
|---|---|---|
| Client | The top-level technical and legal container. Data in one client is invisible to others. | All |
| Company code | The smallest legal entity that gets its own balance sheet and profit and loss statement. | Finance |
| Plant | A site where goods are produced, stored, or procured. | Procurement, Inventory, Manufacturing |
| Storage location | A place inside a plant where stock is kept. | Inventory |
| Purchasing organization | The unit that negotiates terms with suppliers. | Procurement |
| Sales organization | The unit responsible for selling and for customer terms. | Sales |
Sales also uses a distribution channel and a division. Together with the sales organization they form a sales area.
Assignments, not strict nesting
Most units are linked by assignment in configuration, not by one strict tree. A plant belongs to exactly one company code. A purchasing organization can be assigned to a company code and also to several plants. A sales organization belongs to one company code, but it can sell from many plants.
These assignments drive automatic behavior. When you post a goods receipt in plant 1010, the system finds the company code, and from it the ledger and the accounts to post to. You rarely enter the company code by hand.
Seeing the structure in data
Organizational units appear as key fields in the tables. In the sales order query below, the filter on the sales organization (vkorg) limits the result to one selling unit.
SELECT FROM vbak
INNER JOIN vbap ON vbap~vbeln = vbak~vbeln
FIELDS vbak~vbeln, vbak~kunnr, vbap~posnr, vbap~matnr, vbap~netwr
WHERE vbak~vkorg = '1010'
INTO TABLE @DATA(order_items)
UP TO 100 ROWS.Finance tables use the company code the same way. In the Universal Journal table ACDOCA, the field rbukrs holds the company code, so one query can total balances per company code.
Common errors
- Treating the client as a business unit. A client separates entire systems' worth of data, so reporting across clients is not possible in standard tools.
- Mixing up company code and plant. A company code is a legal and accounting unit. A plant is a physical or logistical one.
- Forgetting assignments. If a plant is not assigned to a purchasing organization, you cannot create purchase orders for it, and the error message can seem unrelated.
- Changing the structure late. Reassigning units after documents exist is often blocked or very costly, so design the structure carefully at the start.
Exercise
A company has one legal entity that runs two factories. How many company codes and plants would you normally configure, and why?
Show answer
One company code and two plants. The company code represents the single legal entity with one set of financial statements. Each factory is a separate site, so each becomes a plant. Both plants are assigned to the same company code.