Sub topic 4
Views: how the material master is organized by department
Prerequisites and scope
This chapter assumes you can navigate SAP GUI and run transaction codes. It also assumes you know what a plant, a company code, and a storage location are. You should have read the chapters on organizational levels and material types. This chapter explains what a view is and how views relate to org levels, material types, and the underlying data. The chapters after this one cover each view in detail.
What a view is
A material record is used by many departments. Purchasing needs order data. Sales needs delivery data. Planning needs lot-size rules. Accounting needs a valuation price. Showing every field to every user would be confusing, and most users would not be allowed to change most of it.
A view is a group of material master fields that one department uses. A view is a screen grouping. It is not a separate record. The material is one object with one material number. The views are the tabs you see when you display or change it.
Two points follow from this:
- A view is a user-interface concept. The data is stored in tables by organizational level, not by view.
- A view can be maintained only if the user has authorization for it and the material type allows it.
Views and organizational levels
Each field in a view belongs to a specific organizational level. When you maintain a view, SAP asks you for the org levels that view needs. This is why the create dialog shows different fields depending on the views you select.
| View group | Typical org level asked for | Level of the data |
|---|---|---|
| Basic Data | None | Client |
| Sales: Sales Org. Data 1 and 2 | Sales organization, distribution channel | Sales area |
| Sales: General/Plant Data | Plant | Plant |
| Purchasing | Plant | Plant |
| MRP 1 to 4 | Plant | Plant |
| Plant Data / Stor. 1 and 2 | Plant, storage location | Plant, or plant and storage location |
| Accounting 1 and 2, Costing 1 and 2 | Valuation area (usually the plant) | Valuation area |
Some views mix levels. Plant Data / Stor. 1 holds plant-level fields and also storage-location-level fields such as the storage bin. The Purchasing view holds plant-level data, but the purchasing value key and some texts are stored at client level.
What decides which views a material can have
Three things decide which views you see for a given material.
- Material type. The material type controls which views are allowed. A service material has no MRP or storage views. A raw material (ROH) has no sales views by default. A finished product (FERT) usually has all of them.
- User department. In the classic transaction MM01, a dialog lists the views to select. Users can select only the views offered. Authorization objects such as MMATESTA (maintenance status) can restrict the views a user may maintain.
- Field selection. Field-selection control can hide, show, or make required individual fields inside a view. The chapter on field control covers this.
The maintenance status, a string of letters stored with the material, records which views have already been created. For example, K is the code for basic data, E for purchasing, D for MRP, and V for sales. The letters differ by view. You read them in field PSTAT of tables MARA and MARC. You rarely need the codes, but they explain a common error: a view that was never created cannot be changed. It must first be created by extending the material.
View groups in practice
The main groups are:
- Basic Data 1 and 2. Description, base unit of measure, material group, weights. Valid for the whole client.
- Classification. Characteristics for searching and grouping materials.
- Sales. Sales Org. 1 and 2 hold delivering plant, tax data, and units of sale. Sales: General/Plant holds availability check and transportation group.
- Purchasing. Purchasing group, order unit, and GR processing time.
- MRP 1 to 4. MRP type, lot-sizing procedure, safety stock, procurement type, scheduling.
- Plant Data / Stor. 1 and 2. Storage conditions, batch management, shelf life.
- Accounting 1 and 2, Costing 1 and 2. Valuation class, price control, standard or moving average price, costing lot size.
- Quality Management, Warehouse Management, Forecasting. Used only if those processes are active.
Each of these is the subject of its own later chapter.
Seeing views in the transactions
In SAP GUI, MM01 (create), MM02 (change), and MM03 (display) all open a view selection dialog. The dialog shows views as a list. You mark the ones you want. The org level dialog follows. Then the screen has one tab for each selected view.
In the Fiori app Manage Product Master Data, the same data is shown as sections of an object page. The section names follow the same view names, but you can usually see all data you are authorized for without picking views first.
In S/4HANA the term "product" and "material" refer to the same object. The Fiori apps say Product, and the GUI transactions and tables say Material.
Views and table access
The views are not separate tables. A single query joins the tables for the levels you need. The query below lists the materials that exist in plant 1010 with their material type and MRP type. It reads client-level data (MARA, MAKT) and plant-level data (MARC).
SELECT mara~matnr,
makt~maktx,
mara~mtart,
marc~werks,
marc~dismm
FROM mara
INNER JOIN makt ON makt~matnr = mara~matnr
AND makt~spras = @sy-langu
INNER JOIN marc ON marc~matnr = mara~matnr
WHERE marc~werks = '1010'
INTO TABLE @DATA(lt_materials)
UP TO 100 ROWS.Here mtart is a client-level field from Basic Data. dismm is the MRP type from the MRP 1 view, stored at plant level. Both appear in one result because the query joins levels, not views.
Common errors
- A field is missing on the screen. The view may not be allowed for the material type, or field selection hides the field. Check the material type first.
- A view tab is not offered during change. It was never created for this plant or sales area. Extend the material to that level, then maintain the view.
- Users change basic data in the wrong place. Client-level data is shared. A change made while working in one plant affects every plant.
- A view looks maintained in one plant and empty in another. Plant data is stored per plant. Maintaining MRP for plant 1010 does nothing for plant 1020.
- Accounting data is missing. The valuation level is set in customizing. If valuation is at plant level, you need accounting data for every plant.
Summary
A view is a department-oriented group of fields, not a record of its own. Each field is stored at one organizational level. The material type, the user's authorization, and field selection decide which views appear. Keep the level in mind, and the behavior of the views becomes predictable.
Exercise
A user maintains the MRP 1 view for material FG-100 in plant 1010. A colleague opens the same material in plant 1020 and finds no MRP data. Why, and what must be done?
Show answer
MRP data is stored at plant level, so maintaining it for plant 1010 creates data only in table MARC for that plant. Plant 1020 has no MRP data because the material has not been extended to it. The colleague must extend the material to plant 1020 (for example with MM01 or MM02, selecting the MRP views and entering plant 1020) and then maintain the MRP fields there.
Exercise
Why does the join of MARA, MAKT, and MARC in this chapter return one row for each plant in which the material exists, if you remove the plant condition from the WHERE clause?
Show answer
MARA and MAKT hold client-level data, so they have one row for each material (and language). MARC holds plant-level data, so it has one row for each plant in which the material was created. The join therefore repeats the client-level data once for each plant row.