Sub topic 5
The plant: the operational site for production, procurement, and planning
This chapter assumes you know what a client and a company code are (covered in earlier chapters), can read basic Open SQL, and understand relational tables and keys. It does not cover plant assignment to company codes in detail. That comes in the next chapter.
What a plant is
A plant is an organisational unit that represents an operational site. Depending on the business, it can be a factory, a distribution centre, a regional office, or a group of storage buildings. A plant is the place where the company produces goods, procures goods, plans material requirements, and keeps stock.
In SAP, the plant is the central unit for logistics. Most logistics functions work at plant level:
- Materials requirements planning (MRP) calculates what to produce or buy for each plant.
- Production orders are created and executed in a plant.
- Purchase orders name a receiving plant.
- Inventory management posts goods movements to a plant.
- Maintenance, quality management, and costing also refer to a plant.
A plant is defined in the system by a four-character key, such as 1000. The key is unique within the client. Two plants in the same client cannot share a key, even if they belong to different company codes.
Where the plant sits in the hierarchy
A plant belongs to exactly one company code. That rule exists because every goods movement in a plant has a financial effect, and financial accounting is done per company code. If a plant belonged to two company codes, the system could not decide which legal entity owns the stock.
The reverse is not true. One company code can own many plants.
Plant tasks in more detail
Production and planning
A plant is the unit for which MRP runs. Planning parameters such as the MRP type, lot-sizing procedure, and planned delivery time are stored for a material in a specific plant. The same material can therefore be planned differently in two plants. A factory may produce it in-house, while a distribution centre buys it as a finished product.
Procurement
When a purchase order is created, each item names the plant that receives the goods. The purchasing organisation negotiates the terms, and the plant receives the delivery.
Inventory
A plant is one level of the stock hierarchy. Quantities are kept per material and plant, and in more detail per storage location. The plant is also normally the level where stock is valuated, which the valuation area chapter explains.
Reading plant data with Open SQL
Plants are stored in table T001W. The query below reads plants and joins them to table T001K, the valuation area table. BWKEY is the valuation area. It is usually equal to the plant key. The join shows which company code each plant belongs to.
SELECT w~werks,
w~name1,
k~bukrs
FROM t001w AS w
INNER JOIN t001k AS k ON k~bwkey = w~bwkey
INTO TABLE @DATA(lt_plants)
UP TO 20 ROWS.The result has one row per plant: the plant key WERKS, its name NAME1, and the company code BUKRS. Because each plant has exactly one company code, no plant appears twice in the result.
Common mistakes
- Treating the plant as a legal entity. Balance sheets and tax reports are made per company code, not per plant.
- Creating a plant for every warehouse. A separate building that holds stock for the same site is usually a storage location, not a plant. Create a new plant only when the site needs its own planning, its own valuation, or its own production.
- Assuming plant keys are unique across clients. The key is unique only within one client. Test and production clients often reuse the same keys.
Exercise
A company has one factory and one warehouse building on the same site. Both belong to the same legal entity. The planners run MRP once for the whole site. Should the warehouse be a separate plant? Give your reason.
Show answer
No. The warehouse should be a storage location in the factory's plant. Planning happens once for the site, and the same company code owns both, so a second plant would add maintenance work (separate material data, separate planning runs) without any business benefit. A separate plant is justified only when the building needs its own planning, valuation, or production.
Exercise
Why can a query that joins T001W to T001K on BWKEY return each plant only once, even though a company code has many plants?
Show answer
Each plant has exactly one valuation area, and each valuation area at plant level maps to exactly one company code. The join goes from the plant to its single company code, so the "many" side of the relationship is on the company code, not on the plant. Each plant row therefore matches one T001K row.