Sub topic 16
What changed in S/4HANA
This chapter assumes you know the views and organizational levels from earlier chapters. You should also know the basic tables MARA, MARC, MARD and MBEW. Here we look at what S/4HANA changes in the material master and what that means for your daily work and your code.
The data model stayed, the details moved
The material master still has a client level, plant-level data, and valuation data. MM01, MM02 and MM03 still work. What changed is the field lengths, how stock is stored, and which apps and background processes use the data.
| Area | Before (SAP ERP) | S/4HANA |
|---|---|---|
| Material number | 18 characters | Up to 40 characters, once the extension is activated |
| Stock and movements | Documents in MKPF and MSEG, plus aggregate stock tables | One table, MATDOC. Stock is calculated from it |
| Valuation | Material ledger optional | Material ledger always active. Actual costing stays optional |
| MRP | Classic MRP (MD01) | MRP Live (MD01N), which runs in the database |
| Maintenance UI | SAP GUI transactions | Fiori app Manage Product Master Data, plus the transactions |
| Suppliers and customers | Vendor and customer master | Business partner, linked through customer-vendor integration |
Longer material numbers
In S/4HANA the material number field MATNR can hold 40 characters. On-premise systems do not change the length by default. You activate the extension in configuration. After that, any custom code that assumes 18 characters can break. Typical failures are a CHAR18 variable, a fixed-width file layout, or a conversion exit that pads numbers to the old length. Declare variables with TYPE matnr instead of a fixed length.
Stock without aggregates
Older releases updated stock totals in tables such as MARD at every goods movement. S/4HANA writes only the movement line to MATDOC and calculates the totals when you read them. This removes locking conflicts between postings. Old table names stay readable through compatibility views, so existing SELECT statements usually keep working. Do not write to these tables directly.
Material ledger and universal journal
Every material is now valued through the material ledger, so MBEW is always in use. Price control (standard or moving average) works as before. Postings go to the universal journal, which gives you one accounting source for material and finance reports.
Products, partners and planning
Fiori calls the material a product. The data is the same. You may also notice that suppliers are maintained as business partners. Purchasing views refer to them, but you do not change them in the material master. MRP Live reads the same planning parameters you set in the MRP views. Your settings stay valid, but the run is faster and the planning screens differ.
Exercise
A custom report declares DATA lv_matnr(18) TYPE c. and reads stock quantities from MARD. Which two S/4HANA changes could affect it, and how do you fix each?
Show answer
First, the material number can be 40 characters, so the 18-character variable can truncate it. Declare it as TYPE matnr. Second, stock is now calculated from MATDOC. Reading MARD still works through a compatibility view, but you should not write to it. Reading is fine, so check that the report only reads, and update any code that changes stock tables directly.