Sub topic 4
Material master data for procurement
This chapter assumes you know the purchasing and posting steps from the process overview and the organizational units (company code, plant, purchasing organization, purchasing group). It covers which material master fields drive a purchase, where they are stored, and which errors an incomplete record causes.
What the material master is
The material master is the central record for everything a company buys, makes, stores, or sells. In S/4HANA the same record is called a product in the Fiori app Manage Product Master Data. The classic transactions MM01, MM02, and MM03 still work.
A purchase order item that names a material copies defaults from this record: description, order unit, purchasing group, delivery time, and tax data. The material also tells the system whether stock is kept and how it is valued. That decides which accounts a goods receipt posts to.
Data is stored at several organizational levels
The record is split into views. Each view is stored at the organizational level where the data differs.
| Level | Typical views | Main table | Procurement content |
|---|---|---|---|
| Client | Basic data | MARA | Material type, base unit, order unit, material group |
| Plant | Purchasing, MRP, plant data | MARC | Purchasing group, planned delivery time, procurement type, batch and source list flags |
| Storage location | Storage | MARD | Stock by storage location |
| Valuation area (usually the plant) | Accounting | MBEW | Price control, prices, valuation class |
Alternative units of measure and their conversion factors are in MARM.
A material must be extended to each plant that buys it. Creating it at client level alone is not enough.
Fields that matter for purchasing
Basic data
- Material type (for example ROH raw material, HAWA trading goods, DIEN service, NLAG non-stock material). It controls the number range, which views exist, and whether quantities and values are updated.
- Base unit of measure is the unit in which stock is kept.
- Order unit is the default unit on purchase orders. If it differs from the base unit, the conversion must exist in MARM. Otherwise the PO item cannot convert quantities.
- Material group classifies the material for reporting and, in many setups, for release strategies and account assignment.
Purchasing view (plant level)
- Purchasing group is the default buyer group proposed on requisitions and orders.
- Planned delivery time in days. Requisitions and orders use it to propose delivery dates.
- GR processing time is the days needed after receipt to make stock available.
- Purchasing value key defines reminder days and over- and under-delivery tolerances.
- Source list requirement and automatic purchase order flags change how sourcing and PO generation behave.
- Plant-specific material status can block purchasing for the plant or warn about it.
Accounting view
- Valuation class links the material to general ledger accounts. Together with a transaction key such as BSX (stock) or WRX (GR/IR), it determines the posting accounts. The accounting chapter covers this in detail.
- Price control is either S (standard price) or V (moving average price). Under S, a difference between the PO price and the standard price is posted to a price difference account. Under V, the moving average price is adjusted.
Reading material data with ABAP SQL
This report joins the three tables for one material in one plant. If the plant uses split valuation, MBEW holds one row per valuation type, so you may get several rows. The placeholders TG11 and 1710 must exist in your system.
REPORT z_read_material_procurement.
DATA(lv_matnr) = CONV matnr( 'TG11' ).
DATA(lv_werks) = CONV werks_d( '1710' ).
SELECT FROM marc AS c
INNER JOIN mara AS a ON a~matnr = c~matnr
LEFT OUTER JOIN mbew AS b ON b~matnr = c~matnr AND b~bwkey = c~werks
FIELDS c~matnr, c~werks, c~ekgrp, c~beskz, c~plifz, c~webaz,
a~meins, a~bstme, b~vprsv, b~bklas
WHERE c~matnr = @lv_matnr
AND c~werks = @lv_werks
INTO TABLE @DATA(lt_data).
IF lt_data IS INITIAL.
WRITE / 'Material is not extended to this plant.'.
ENDIF.
LOOP AT lt_data INTO DATA(ls_data).
WRITE: / ls_data-matnr, ls_data-werks, ls_data-ekgrp, ls_data-plifz,
ls_data-meins, ls_data-bstme, ls_data-vprsv, ls_data-bklas.
ENDLOOP.The left outer join keeps the row when the accounting view is missing. A missing vprsv and bklas in the output is exactly the condition that later blocks a goods receipt.
What S/4HANA changes
- The material number field is 40 characters long instead of 18. Check interfaces and custom code that assume 18.
- Stock quantities are no longer stored as totals in tables such as MARD. They are derived from the material document table MATDOC. Read stock through the provided compatibility views or the standard APIs and not by updating those tables.
- The material ledger is always active. Every material has valuation data, and price control and valuation class are still maintained as above.
- Suppliers are created as business partners (the previous chapter). Material master data is still maintained as before and is then linked to suppliers through info records and contracts.
Common errors and how to read them
- "Material is not maintained in plant." The plant-level purchasing or MRP view is missing. Extend the material to the plant.
- No stock posting possible for a goods receipt. The accounting view is missing, or no valuation class is assigned. Maintain the accounting view for the valuation area.
- Quantity or unit conversion problems on the PO. The order unit differs from the base unit and MARM has no conversion. Add the conversion.
- PO item rejects the material. A plant-specific status blocks purchasing. Check the status, and do not remove it without asking the owner.
- Unexpected price differences at invoice. The price control is S while PO prices vary. Choose the price control deliberately when you create the material.
Exercise
A buyer creates a purchase order for a new raw material in plant 1710. The PO item is accepted, but the goods receipt fails because no accounts can be determined. The purchasing view is complete. Which view is probably missing, which two fields in it drive account determination, and which table would you check?
Show answer
The accounting view for the valuation area of plant 1710 is probably missing or incomplete. The valuation class drives account determination (with the transaction key such as BSX or WRX), and the price control decides how price differences are handled. Check table MBEW for a row with the material and the plant as valuation area. If the row is absent or the valuation class is empty, maintain the accounting view.
Exercise
A material has base unit PC and order unit BOX. Where must the relationship between the two units be stored, and what happens on a PO if it is missing?
Show answer
The conversion factor is stored in the alternative units of measure in table MARM, maintained in the basic data. If it is missing, the system cannot convert the ordered quantity into the base unit, so the PO item shows an error and cannot be saved correctly.