Sub topic 13
Design considerations and common mistakes
This chapter assumes you know what the client, company code, plant, and storage location are, and how plants are assigned to company codes. It also assumes you know that material master data is kept at client, plant, and storage location level. Here you will use that knowledge to make design decisions and to avoid the errors that are expensive to fix later.
Why design decisions here are hard to undo
Organisational units are the foundation that nearly every transaction and master record refers to. Once postings exist, several assignments are effectively locked in.
- A plant can be assigned to only one company code. After material documents or accounting documents exist for the plant, you cannot reassign it.
- A company code's currency and chart of accounts are fixed once postings exist.
- Unit keys, such as a plant ID like
1000, are stored in many tables. Renaming a key is not supported. You can only create a new unit and migrate to it.
Treat the structure as a decision you make once, with a review from every functional area (finance, logistics, sales, and purchasing) before you build it.
A decision procedure: which unit does a requirement belong to?
For each business requirement, ask which question it answers. The answer points to the unit.
| Requirement | Unit |
|---|---|
| Separate legal entity with its own balance sheet and tax reporting | Company code |
| Separate test or training environment with its own master data | Client |
| Site where goods are produced, procured, or planned separately | Plant |
| Distinguish physical places inside one site, such as a high-bay rack and a goods-receiving area | Storage location |
| Report several legal entities together for group consolidation | Company (grouping of company codes) |
| Negotiate prices with vendors for a set of plants | Purchasing organisation |
| Sell to customers through a distribution channel | Sales organisation |
| Share cost and profit centre structures | Controlling area |
The test is the purpose. A unit exists because a process needs it, not because the business has a matching box on its org chart.
Design considerations
Keep the number of clients small
A client is a technical container. It separates data completely, including users, master data, and transaction data. Most systems have separate clients for customizing, testing, and production, and the production client is the only one that holds live business data.
Do not use clients to model business units. Cross-client reporting is not possible in standard SAP, and each additional client multiplies the maintenance work for users, master data, and transports. Use company codes for separate legal entities in one client.
Align company codes with legal reality
One company code corresponds to one legal entity that must produce its own financial statements. Create a new company code when:
- A new legal entity is founded or acquired and must report on its own.
- A different country brings a different currency, chart of accounts, or fiscal year variant.
Do not create company codes for departments or regions. Use profit centres or business areas for internal reporting. Too many company codes make closing slower, intercompany postings more frequent, and authorisations more complex.
Define plants by operational need
A plant is the right unit when sites differ in their planning, production, or procurement. Typical reasons are:
- Material requirements planning (MRP) runs separately for the site.
- The site has its own production resources, routings, or work centres.
- The site has its own valuation, as valuation is usually at plant level.
Two buildings on one campus that share planning and purchasing usually belong in one plant, with two storage locations. Splitting them into two plants creates extra stock transfers, extra material master views to maintain, and extra planning runs.
A plant must also belong to the correct company code from the start. The assignment is the link between logistics and finance. Every goods movement that changes inventory value posts to the accounts of the company code that owns the plant.
Use storage locations for stock separation, not for planning
A storage location is a place inside one plant where stock is physically kept. Storage locations are unique only within their plant. Plant 1000 and plant 2000 can both have a storage location 0001, and they are different units.
Quantities (such as unrestricted-use stock) are held at storage-location level. Values are held at valuation-area level, which is usually the plant. This has a consequence for design. Splitting stock across storage locations does not split its value, so you can separate stock physically without any effect on accounting.
Use storage locations when you need to:
- Track quantity in different physical areas.
- Allow or block certain stock movements by area.
- Run physical inventory counts per area.
Avoid creating storage locations for status changes (for example, quality inspection). Stock types such as quality inspection and blocked stock already exist as separate stock categories within a storage location.
Plan for the valuation level
The valuation level is set once, in customizing, for the whole client. The two possibilities are valuation at plant level and valuation at company code level. Plant level is the standard in nearly all systems because it allows different prices for the same material in different plants. Company code level cannot be changed back after posting.
Common mistakes
| Mistake | Consequence | Better approach |
|---|---|---|
| Using a separate client per country or per business unit | No cross-client reporting, duplicated master data, higher maintenance | Use company codes in one productive client |
| One company code per department | Heavy closing effort, many intercompany postings | Use profit centres for internal structure |
| Using a plant for every warehouse building | Extra transfers, duplicate material master maintenance | Use storage locations in one plant |
| Using storage locations to model stock status | Redundant structure, confusing stock overview | Use stock types and special stocks |
| Reusing plant keys for different purposes during migration | Hard to interpret historical data | Keep keys unique and documented |
| Forgetting to assign a new plant to a purchasing organisation | Purchase orders cannot be created for the plant | Complete all assignments and test |
| Reassigning a plant to another company code after postings | Not possible, inconsistent data | Decide assignment up front |
Checking a design with Open SQL
You can check a structure in the system with queries on the tables you have seen in earlier chapters. This query shows how many storage locations each plant has and to which company code it belongs.
SELECT w~werks,
w~name1,
k~bukrs,
COUNT( l~lgort ) AS storage_location_count
FROM t001w AS w
INNER JOIN t001k AS k ON k~bwkey = w~bwkey
LEFT OUTER JOIN t001l AS l ON l~werks = w~werks
GROUP BY w~werks, w~name1, k~bukrs
INTO TABLE @DATA(lt_overview).Use it to spot a plant with many storage locations that might be a candidate for merging, or a plant with none, which cannot hold stock.
A second check finds stock rows for locations that exist in the stock table. It shows the key at which quantities are held:
DATA lv_werks TYPE werks_d VALUE '1000'.
SELECT matnr, werks, lgort, labst
FROM mard
WHERE werks = @lv_werks
INTO TABLE @DATA(lt_stock).Read the result by the key matnr, werks, lgort. If you need a total per plant, aggregate it yourself, because the table is at storage-location level.
A short review checklist
Before you approve a design, confirm each of these:
- Every legal entity that must report separately has its own company code.
- Every plant is assigned to exactly one company code, and the assignment matches the legal owner of the site.
- Every plant has the storage locations it needs, and the keys are unique within the plant.
- Valuation is set at plant level unless there is a documented reason otherwise.
- Purchasing, sales, and controlling units are assigned to the plants and company codes that use them.
- The client strategy is documented: which clients exist, and what each is for.
Exercise
A company runs two warehouse buildings on one site. Both are planned together by MRP, bought for by the same purchasing team, and owned by one legal entity. Management asks whether to create two plants. What do you recommend, and what does your choice change for stock quantities and stock value?
Show answer
Recommend one plant with two storage locations. The buildings share planning, purchasing, and legal ownership, so nothing requires a separate plant. Quantities are held per storage location, so each building keeps its own stock figures. Value is held at valuation-area level (usually the plant), so splitting the buildings into storage locations does not split the value. Two plants would add stock transfers, extra material master views, and extra planning runs without a business need.
Exercise
A project team proposes creating one company code for each sales region of a single legal entity, to get regional profit reports. Why is this a design mistake, and what should they use?
Show answer
A company code represents a legal entity with its own books. Regions of one legal entity do not need separate balance sheets, and extra company codes add closing effort, intercompany postings, and authorisation complexity. For regional profit reporting, use profit centres (or similar internal structures) within the single company code.