Sub topic 3
Material types and industry sectors
This chapter assumes you can navigate SAP GUI and know what a plant and a valuation area are. You should also know the difference between client-level and plant-level data from the previous chapter. ABAP reading skills help with the final example but are optional.
Two keys set at creation
Every material has two classification keys, and you choose both when you create it.
- Material type is a four-character key such as
ROHorFERT. It groups materials that behave alike in business processes. - Industry sector is a one-character key such as
M(mechanical engineering) orC(chemical industry). It selects a set of field and screen settings suited to an industry.
Both keys are stored in the general data table MARA, in the fields MTART and MBRSH. The material type decides what the system lets you do with the material. The industry sector decides how the screens look.
What the material type controls
Material types are customizing objects. You maintain them in transaction OMS2 (table T134, with plant-level settings in T134M). A material type controls these things:
| Control | Effect |
|---|---|
| Allowed views | Which departmental views can be maintained. A service has no MRP or storage views. |
| Number assignment | The number range, and whether numbers are internal or external. |
| Procurement type | Whether the material may be produced in-house, procured externally, or both. |
| Quantity update | Whether goods movements change stock quantities. |
| Value update | Whether stock changes post to the general ledger. |
| Price control | Whether a price control is mandatory. |
| Valuation class | Which classes may be used, through an account category reference. |
Quantity update and value update are set per valuation area, which is why they live in the plant-level table T134M. The same material type can therefore behave differently in two valuation areas.
Standard material types
SAP delivers many types. These are the ones you meet most often:
| Key | Name | Typical use |
|---|---|---|
| `ROH` | Raw material | Bought and consumed in production. Never sold. |
| `HALB` | Semifinished product | Produced in-house, or bought and processed further. |
| `FERT` | Finished product | Produced in-house and sold. Normally not purchased. |
| `HAWA` | Trading goods | Bought and resold without processing. |
| `HIBE` | Operating supplies | Consumed in production but not part of the product. |
| `ERSA` | Spare parts | Maintenance parts. |
| `DIEN` | Service | Has no stock and no inventory views. |
| `NLAG` | Non-stock material | Bought for immediate consumption. No stock is kept. |
| `UNBW` | Non-valuated material | Stock quantities are tracked, but no values. |
| `VERP` | Packaging | Packaging material. |
A finished product usually allows in-house production as its procurement type. Raw materials usually allow external procurement. The settings are only defaults. Change them to fit your own processes.
Do not edit the delivered types. Copy one to a new Z type and adjust the copy. This keeps your changes separate from SAP's.
What the industry sector controls
The industry sector does not change what the material is. It selects the field-reference and screen-sequence settings used for the screens. Typical values include M (mechanical engineering), C (chemical industry), P (pharmaceutical industry) and 1 (retail). A pharmaceutical sector, for example, can show additional fields that a mechanical-engineering sector hides.
Two rules apply to the industry sector:
- You choose it when you create the material. You cannot change it afterward.
- Many companies use a single sector for all materials. Field control then depends only on the material type and the user's chosen views.
Treat the sector as a decision you make once. If you need a different one, you create a new material.
Changing the material type later
You can sometimes change a material type in MM02, for example from ROH to HALB. The system only allows it when the two types are compatible. Stock, open documents, and different number range settings are the usual reasons for rejection. Check the settings in OMS2 for your own system before you plan a mass change. The restrictions also depend on how the material is already used.
How the material type connects to other chapters
The material type sits upstream of nearly everything else in the material master, as the diagram shows.
The allowed views tell you what a user can maintain. The number range tells you how the material number is built. The value update controls whether accounting data is required. Later chapters on views, number assignment, and valuation all refer back to these settings.
Reading material types with ABAP SQL
The report below counts the materials per material type. It joins MARA to T134T to get the type descriptions. A second query reads the update flags for one type from T134M.
REPORT zdemo_material_types.
SELECT mara~mtart,
t134t~mtbez,
COUNT( * ) AS cnt
FROM mara
INNER JOIN t134t ON t134t~mtart = mara~mtart
AND t134t~spras = @sy-langu
GROUP BY mara~mtart, t134t~mtbez
ORDER BY mara~mtart
INTO TABLE @DATA(lt_counts).
cl_demo_output=>write( lt_counts ).
SELECT mtart, bwkey, mengu, wertu
FROM t134m
WHERE mtart = 'HAWA'
INTO TABLE @DATA(lt_update).
cl_demo_output=>write( lt_update ).
cl_demo_output=>display( ).In the second result, MENGU is the quantity-update flag and WERTU is the value-update flag. An X means the update is active for that valuation area (BWKEY). If a type has no rows in T134M for a valuation area, the system cannot use it there.
Common errors
- Choosing a type by name.
FERTdoes not mean the material must be sold. Choose the type from the processes the material takes part in, not from its label. - Wrong type for services. A
DIENmaterial has no inventory views. Do not use it for items you keep in stock. - Mixing number assignment. If a type uses external numbers, the user must enter the number. If you expect the system to assign one, you get an error.
- Expecting the sector to change later. It cannot be changed, so confirm it before you save.
- Editing delivered types. Upgrades can overwrite changes. Use
Zcopies.
Exercise
A user creates a material with type HAWA and industry sector M. Later they realize the sector should have been C. What can they do, and what does the material type control that the sector does not?
Show answer
The industry sector cannot be changed after creation, so the user must create a new material with sector C. The material type controls allowed views, number assignment, procurement type, quantity update, value update, and price control. The sector only selects the field and screen settings.
Exercise
Which table holds the quantity-update and value-update flags for a material type, and why are they stored there instead of with the type itself?
Show answer
Table T134M holds them. They are set per valuation area, so the same material type can update quantities and values in one plant and behave differently in another.