Sub topic 12
Defining and Assigning Units in Customizing
This chapter assumes you know what the client, company code, plant, and storage location are, and that you can log on to an SAP system and open transactions. It shows where each unit is created and assigned. Table names follow the earlier chapters.
What customizing is
Customizing is the configuration layer of SAP. You do not create organisational units with application transactions like material entry. You define them in the Implementation Guide (IMG), which you open with transaction SPRO. The path is SAP Reference IMG and then Enterprise Structure.
Two points shape everything else here.
- Customizing changes are recorded in a transport request, so they can move from development to test and production systems.
- Client-specific settings live in the client you are logged on to. Plants and company codes are client-specific, so they exist only in that client.
The definition and assignment pattern
The Enterprise Structure area splits into two actions for each unit.
- Definition creates the unit with its key, name, and basic data such as address and country.
- Assignment links the unit to its parent in the hierarchy.
You must define a unit before you can assign it. The order below follows the dependencies.
Main transactions and IMG paths
Under Enterprise Structure, the Definition branch holds the creation steps and the Assignment branch holds the links.
| Task | IMG area | Typical transaction |
|---|---|---|
| Define company code | Financial Accounting | OX02 |
| Define plant | Logistics - General | OX10 |
| Define storage location | Materials Management | OX09 |
| Assign plant to company code | Logistics - General | OX18 |
| Maintain valuation level | Materials Management | OX14 |
The transactions OX02, OX10, OX09, and OX18 are common shortcuts. Check them in your own release, because the menu path in SPRO is always the authoritative route.
Assigning a plant to a company code
Assignment is the step that causes the most mistakes. A plant belongs to exactly one company code, and you set that link in customizing. The link is stored through the valuation area, which is why the query in the earlier chapter joins T001W to T001K and reads BUKRS.
Before you assign, confirm three things:
- The plant already exists.
- The company code already exists.
- No materials have been created for the plant yet, if you can avoid it.
The last point matters because changing an assignment after data exists is restricted. Once a plant has stock or valuation data, SAP blocks reassignment. Moving it to another company code means a data migration project, not a setting change.
Storage locations are defined per plant
You define a storage location inside one plant. The key is only unique within that plant, so storage location 0001 in plant 1000 is a different record from 0001 in plant 2000. This is why T001L is keyed by plant and storage location together.
You can check your customizing result by reading the table.
DATA lv_werks TYPE werks_d VALUE '1000'.
SELECT lgort, lgobe
FROM t001l
WHERE werks = @lv_werks
INTO TABLE @DATA(lt_storage_locations).If the new storage location does not appear, the usual causes are that the entry was saved in a different client, or that the transport has not reached the system you are checking.
Common errors
- Defining the unit in the wrong client. The table row exists, but only in the client where you saved it.
- Skipping the assignment. A plant that is defined but not assigned cannot be used for postings, because the system cannot find the company code.
- Reusing a storage location key and expecting a shared record. Each plant keeps its own copy.
- Making changes directly in production. Many systems lock customizing in production, and a change made there bypasses transport control.
Exercise
A colleague defines plant 3000 and a storage location 0001 for it, then tries to post a goods receipt and gets an error that no company code can be found. Which customizing step was most likely skipped, and how can you confirm it by reading a table?
Show answer
The assignment of the plant to a company code was skipped. You can confirm it by reading T001K for the valuation area of plant 3000 (BWKEY equal to the plant) and checking that BUKRS is filled, or by running the join of T001W and T001K and seeing that plant 3000 returns no company code.
Exercise
Why can storage location 0001 exist in two plants at once without conflict?
Show answer
A storage location is unique only within its plant. The full key in T001L is plant plus storage location, so (1000, 0001) and (2000, 0001) are two separate records.