MM Program Custom development Mass upload

Mass Material Master Upload Program

Short answer: A custom program that creates or updates material master data in bulk from Excel or CSV rows, including the basic data, plant and valuation views. It checks everything in test mode first, then lists the result and error message for every row.

Estimated effort
M · 4–6 working days
System
ECC and S/4HANA
Tables
4
Scope
Global
Built by
NeKuDos Teknoloji
Last updated

Why is the standard not enough?

MM17 only changes existing materials in bulk; it neither creates new materials nor reads a file. LSMW needs technical setup and is not recommended for many objects in S/4HANA. The Migration Cockpit is designed for the initial data migration. Companies that create hundreds of materials every month need a templated upload with a test mode that business users can run themselves.

Who uses it? Master data teams, MM consultants and purchasing or planning teams that introduce new products.

Closest standard alternatives

  • MM17 Mass Maintenance of Materials. Changes existing materials in bulk; does not create materials or read files.
  • LSMW Legacy System Migration Workbench. Can load from files but needs technical setup; not recommended for many objects in S/4HANA.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
MARAGeneral Material DataGeneral material data: type, industry sector, base unit, material groupWriteECC + S/4
MAKTMaterial DescriptionsMaterial description (per language)WriteECC + S/4
MARCPlant Data for MaterialPlant data: MRP type, purchasing groupWriteECC + S/4
MBEWMaterial ValuationValuation data: valuation class, price control and priceWriteECC + S/4

S/4HANA notes

  • MBEW: In S/4HANA the Material Ledger is mandatory and valuation data is read through a compatibility view. Prices remain readable; validate value calculations against the currency and valuation view in use.

BAPIs and functions used

  • BAPI_MATERIAL_SAVEDATACreate and change material master data. Creates or updates the material with all views for each row
  • BAPI_TRANSACTION_COMMITCommit a BAPI transaction. Saves successful rows permanently

Selection screen parameters

ParameterDescriptionTypeReference fieldRequiredExample
P_FILEUpload file (XLSX or CSV)Single value—YesC:\temp\malzemeler.xlsx
P_TESTTest mode (check without posting)Checkbox—NoX
P_UPDATEUpdate existing materialsCheckbox—No—

Input file columns

The columns of the upload template and the SAP fields they are written to. Columns with an asterisk are mandatory.

#ColumnTarget fieldRequired
1Material (blank = internal number)MARA-MATNRNo
2Material typeMARA-MTARTYes
3Industry sectorMARA-MBRSHYes
4DescriptionMAKT-MAKTXYes
5Base unitMARA-MEINSYes
6Material groupMARA-MATKLNo
7PlantMARC-WERKSYes
8MRP typeMARC-DISMMNo
9Purchasing groupMARC-EKGRPNo
10Valuation classMBEW-BKLASNo
11Price controlMBEW-VPRSVNo
12PriceBy rule Written to MBEW-VERPR when price control is V, to MBEW-STPRS when it is SNo

Sample upload file

1Material (blank = internal number)Material type *Industry sector *Description *Base unit *Material groupPlant *MRP typePurchasing groupValuation classPrice controlPrice
2ROHMCarton box 60x40PC011000PD0013000V5.10
3RM-2051ROHMSteel sheet 3 mmKG021000PD0023000V64.80
4FG-5003FERTMPacked product CPC102000PD7920S295
A view built with fictional sample data; not real system data.

Result list columns

#ColumnSource
1RowCalculated Row number in the file
2MaterialMARA-MATNR
3StatusCalculated From the BAPI return messages: created, updated or error
4MessageCalculated First error or success message from the BAPI return table

Sample result list

RowMaterialStatusMessage
2100000123CreatedMaterial 100000123 created
3RM-2051CreatedMaterial RM-2051 created
4FG-5003ErrorPurchasing group is required for plant 2000
A view built with fictional sample data; not real system data.

How does the program work?

  1. The file (XLSX or CSV) is read from the user’s PC or, in a background job, from the application server; the first row is skipped as the header.
  2. Every row is checked for mandatory fields and values: material type, industry sector, unit of measure, plant and valuation class must exist in the system.
  3. The row is mapped to the BAPI_MATERIAL_SAVEDATA structures: header, basic data, description, plant data and valuation data.
  4. In test mode the BAPI is called and the change is rolled back, so every error is visible without posting.
  5. In a real run BAPI_TRANSACTION_COMMIT is called after each successful row; results and messages are listed per row, and failed rows can be downloaded as a separate file.

Performance notes

Run files above a few thousand rows as a background job. Committing per row isolates failed rows; for very large volumes, committing per package can be considered.

Features

  • Test mode (check without posting)
  • Line-by-line result and error log
  • Download failed lines as a separate file The corrected file can be uploaded again with the same template.
  • Export to Excel An empty upload template can be downloaded as Excel.
  • Runs as a background job

Authorization objects

  • M_MATE_MARMaster data maintenance authorization by material type
  • M_MATE_WRKMaster data maintenance authorization by plant

Frequently asked questions

Can this program be used on S/4HANA?

Yes. BAPI_MATERIAL_SAVEDATA is supported on S/4HANA as well. The Migration Cockpit is recommended for the initial migration; this program is for the ongoing need to create materials in daily operations.

Which views can be loaded?

The template covers basic data, plant and valuation views. Sales, warehouse or accounting views can be added to the template as needed; each extra view increases the effort range.

What happens to failed rows?

Failed rows are not saved and are listed with their messages. They can be downloaded as a separate file, corrected and uploaded again.

Related reports

MM Report Custom ALV report

Stock Aging Report

A custom ALV report that shows how many days each material has been in stock since its last goods receipt and which age bucket (0–30, 31–90, 91–180, …

MARD · MARA · MAKT · MBEW

Let us build this program for your system

Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.

Related report: Mass Material Master Upload Program