How to delete duplicate materials in SAP: status, MM06 and order
Block with a material status, clear stock, orders and reservations, flag in MM06 and let archiving delete it. The safe order, with SAP sources.
To delete a duplicate material in SAP, you don't start with the deletion flag. First you block the code with a material status, then you clear stock, purchase orders, reservations and MRP requirements, and only then do you flag it for deletion in MM06. The record is physically removed later, during archiving, once nothing depends on that code anymore.
This scene is common in master data teams. The team agrees that two codes are the same bearing, someone sets the deletion flag on the duplicate and the ticket is closed. A few weeks later, the stock report still shows a balance on the "deleted" code, and someone asks in the team chat: "wasn't this material removed?"
It wasn't. The deletion flag only tells SAP that the record may be removed in the future. Stock, orders and reservations stay where they are until someone deals with each of them. This step closes out material master data cleansing, and it is the one I most often see done in the wrong order. This article covers only that step: the procedure inside SAP after the company has already decided which code stays. If you are still finding out which items are repeated, start with the guide on how to identify duplicate materials, which covers matching criteria, false positives and choosing the surviving code.
What does SAP mean by material status and deletion flag?
According to SAP's material master documentation, the material status tells you whether a material has restrictions and what they are, for example a part still in development or one being discontinued (SAP Help Portal, Material Statuses). It blocks the material for specific activities such as purchasing, MRP or inventory management.
The deletion flag is something else. Per SAP's documentation, a material master record can only be deleted by the archiving and deletion program if it has been flagged for deletion (SAP Help Portal, Flagging Material Master Records for Deletion). The flag is the precondition for deletion, not the deletion itself.
Put simply: the status controls day to day use of the material; the flag prepares its final exit.
Where does each status live and how far does it reach?
SAP's documentation describes two status levels for logistics (Material Statuses):
- Plant-specific material status: shown on the Costing, MRP, Production Resources/Tools, Purchasing, Quality Management and Work Scheduling screens, and valid for that plant. In SAP S/4HANA it is still part of the material master, in field MARC-MMSTA ("Plant-Sp.Matl Status"), maintained in MM02 (SAP KBA 3080582).
- Cross-plant material status: found on the Basic Data screen and valid for the whole client.
For sales, the same documentation lists the distribution-chain-specific material status and the cross-distribution-chain material status, on the Sales: Sales Org. Data screen. If you need a refresher on what each screen holds, I covered the SAP material master views and required fields in another post.
The part that trips people up: SAP evaluates the plant-specific and cross-plant statuses together. In the documentation's own example, status 01 blocks Purchasing at the plant and status 02 blocks Inventory Management at cross-plant level; the result is a material blocked for both activities in that plant (Material Statuses).
Does the status actually block, or does it only warn?
It depends on your company's configuration. Per SAP's documentation, in Customizing you define the statuses and the attributes of each one, and the status determines how the material is handled in each application: purchasing, material requirements planning, use in bills of material and others. When a material with a status is used, the system issues a warning or an error message, depending on the status chosen (SAP Help Portal, Check Material Status).
SAP's example for a material being discontinued makes it concrete: Purchasing set to "B" (error, no purchase order can be created), MRP set to "A" (warning) and Inventory Management left blank (no message, so the material can still be withdrawn from stock), as shown on the same Check Material Status page.
For a duplicate, that design makes sense: you stop new purchases and let existing stock be consumed or transferred. But the codes and the behavior of each status are defined by each company. Before you apply one, confirm with your SAP team what each status does in your system.
What does the deletion flag do, and what doesn't it do?
According to SAP's documentation (Flagging Material Master Records for Deletion):
- The flag can be set at different organizational levels, such as plant or sales organization. The record is deleted at that level and at the levels below it.
- Flagging at client level deletes the record at all levels. Flagging at plant level deletes it at the plant and below (the storage location, for example), but not at client level.
- When you set the flag, the system creates a change document.
To set it, the path is Material, Flag for Deletion, Immediately or Schedule, entering the material and the organizational levels. A scheduled flag has to be activated, using the same function that activates planned changes (SAP Help Portal, Flagging a Material Master Record for Deletion). The proposal list sits under Extras and shows materials with no stock so you can pick the material and the level (SAP Help Portal, Flagging Materials for Deletion Using a Proposal List).
On the sales side, SAP's documentation states that a material flagged for deletion triggers an error message during sales order entry and delivery processing, which blocks those transactions (SAP Help Portal, Deleting a Material Master Record).
What it does not do: it doesn't zero out or move stock. SAP KBA 2421211 describes the exact symptom from the opening scene: you flag the material for deletion in transaction MM06 and, in MMBE, it still shows up with stock (SAP KBA 2421211). The technical field referenced in the note is MARA-LVORM. Stock has to be dealt with first.
When does the material actually leave the system?
Only through archiving and deletion. Per SAP's documentation, in most companies the archiving and deletion program is run at regular intervals by the system administrator (Flagging Material Master Records for Deletion), and on its next run it processes only the flagged materials (Flagging a Material Master Record for Deletion). The sales documentation adds that the material is deleted only if all business transactions that depend on it have been completed (Deleting a Material Master Record).
Which mechanism should you use, and when?
| Mechanism | Where it lives | Scope | Effect | When to use it |
|---|---|---|---|---|
| Plant-specific material status | Plant screens such as Purchasing, MRP and Costing (MARC-MMSTA) | The plant | Warning or error by area, depending on configuration | First block, when the duplicate exists only in some plants or each plant has its own timeline |
| Cross-plant material status | Basic Data screen | The whole client | Warning or error by area, depending on configuration; combined with the plant status | When the duplicate should not be used in any plant |
| Sales status | Sales: Sales Org. Data screen | The distribution chain, or all of them with the cross-distribution-chain status | Restriction in sales, depending on configuration | When the duplicate is also sold |
| Deletion flag (MM06) | Material master, by organizational level | The flagged level and those below; at client level, all of them | Error in sales orders and deliveries; does not clear stock; enables archiving | After stock, orders, reservations and requirements have been handled |
| Archiving and deletion | Program run by the system administrator | Flagged materials only | Deletes the record if dependent transactions are completed | Final step, within the company's archiving cycle |
What is the safe order for taking a duplicate out of circulation?
The sequence below is the recommendation I use with teams, not an SAP rule. It builds on the sources above and on one simple idea: block first, clean up next, flag last.
1. Block the duplicate with a status
Apply the plant-specific or cross-plant status, depending on scope. Choose a status that raises an error in Purchasing and leaves Inventory Management open, so the stock can still go out.
2. Clear the stock
Consume the duplicate's stock or post a recorded stock transfer to the surviving code, following your company's process.
3. Close or redo orders, reservations and requirements
Open purchase orders, reservations, purchase requisitions and MRP requirements tied to the duplicate need to be completed or recreated on the surviving code.
4. Confirm there is no stock left
Use the deletion proposal list, which shows materials with no stock. If the duplicate does not appear there, that points to remaining stock: check stock by plant and storage location before setting the flag. The list only shows the absence of stock; open purchase orders, reservations, purchase requisitions and sales orders have to be checked separately.
5. Flag for deletion at the right level
In MM06, flag at plant level if the code is still valid in other plants, or at client level if it is leaving the whole company. Use immediate or scheduled; a scheduled flag only takes effect once activated.
6. Let archiving do the deletion
Physical deletion belongs to the system administrator, within the archiving cycle.
What does this look like in a concrete case? (hypothetical example)
Hypothetical example, created only to illustrate the procedure. It is not a customer case.
A manufacturer has two codes for the same bearing: code A, complete and widely used, and code B, created later with an abbreviated description. Code B exists in two plants. Plant 1 holds stock and a maintenance reservation. Plant 2 has an open purchase order. The team has already decided that A stays and B goes.
- The master data team sets a cross-plant status on B that raises an error in Purchasing and a warning in MRP, with Inventory Management left open. Nobody can create a new purchase order for B in any plant.
- In plant 1, the reservation is recreated on code A, and B's stock is consumed or transferred to A with a recorded posting.
- In plant 2, purchasing handles the open order with the supplier: receive and consume the material, or cancel and reorder on A.
- With no stock and nothing pending in either plant, B appears on the proposal list of materials with no stock. The team flags B for deletion at client level in MM06.
- In the next archiving cycle, the administrator processes B. If a dependent transaction is still open, B stays in the system and the team looks into why.
Notice that the flag came at the end, not at the start.
Where to start
- List the pairs already decided: duplicate and survivor. If that list doesn't exist yet, go back to the duplicate identification step.
- Ask your SAP team for the list of configured statuses and what each one does by area: warning, error or nothing.
- For each duplicate, gather stock by plant and storage location, purchase orders, reservations, requirements and, if it is sold, open sales orders and deliveries.
- Apply the status and clear stock and open items, plant by plant.
- Flag for deletion at the right level and note the date, so you can check it against the next archiving cycle.
- Add this procedure to your material master data cleansing checklist so the next batch follows the same order.
Frequently asked questions
Does the deletion flag zero out the stock?
No. SAP KBA 2421211 describes a material flagged in MM06 that still shows stock in MMBE (SAP KBA 2421211). The stock has to be consumed or transferred before you set the flag.
Status or deletion flag: which comes first?
The status. It blocks use by area, with a warning or an error depending on configuration (Check Material Status), and gives you time to clear stock and open items. The flag comes later, because it is the precondition for archiving (Flagging Material Master Records for Deletion). This order is an operational recommendation, not an SAP rule.
Can you delete a material that still has an open purchase order?
Physical deletion does not happen while a dependent business transaction is still open, according to SAP's documentation (Deleting a Material Master Record). That is why I recommend completing the order, or cancelling it and reordering on the surviving code, before setting the flag.
How do you stop the duplicate from being created again?
Deleting the old code does not stop someone from creating a new one tomorrow. The control has to sit at the point of entry: a rule that checks whether the item already exists before it is created, and an approval before the code is released. The criteria for that check are in the guide to identifying duplicate materials.
How 4MDG can help
Removing the duplicate from SAP is the last step of work that starts earlier: reviewing the catalog item by item to eliminate duplicates, standardizing descriptions with a PDM (a structured description pattern), classifying items under NCM (the Mercosur product code used in Brazil) and UNSPSC, normalizing units of measure and enriching attributes before loading into the ERP. That is our material master data cleansing service. The cleansed catalog goes into SAP ECC or S/4HANA via API, IDoc, BAPI or file, and entry rules with an approval workflow prevent a duplicate material from being created again in SAP. To find out how many items in your base are duplicated, missing attributes or inconsistently classified, request the free consulting and assessment: it runs on a real sample of your data, nothing is installed in your environment and there is no commitment.
Note: material status configuration, the levels used for the deletion flag and the archiving cycle vary by company and by SAP release. Check with your company's SAP team before applying this procedure.
Sources
- SAP Help Portal, SAP Library, Material Master (LO-MD-MM), "Material Statuses". https://help.sap.com/saphelp_me60/helpdata/en/34/15c453f57eb44ce10000000a174cb4/content.htm. Accessed on October 27, 2026.
- SAP Help Portal, SAP Library, Product Cost Controlling, "Check Material Status". https://help.sap.com/saphelp_46c/helpdata/en/be/f32c7dd435d1118b3f0060b03ca329/content.htm. Accessed on October 27, 2026.
- SAP Help Portal, SAP Library, Material Master (LO-MD-MM), "Flagging Material Master Records for Deletion". https://help.sap.com/saphelp_46c/helpdata/en/ff/515e5449d811d182b80000e829fbfe/content.htm. Accessed on October 27, 2026.
- SAP Help Portal, SAP Library, "Flagging a Material Master Record for Deletion". https://help.sap.com/saphelp_me60/helpdata/en/4f/15c453f57eb44ce10000000a174cb4/content.htm. Accessed on October 27, 2026.
- SAP Help Portal, SAP Library, "Flagging Materials for Deletion Using a Proposal List". https://help.sap.com/saphelp_me60/helpdata/en/52/15c453f57eb44ce10000000a174cb4/content.htm. Accessed on October 27, 2026.
- SAP Help Portal, SAP Library, Basic Functions and Master Data in SD (SD-BF), "Deleting a Material Master Record". https://help.sap.com/saphelp_470/helpdata/en/dd/55f6e6545a11d1a7020000e829fd11/content.htm. Accessed on October 27, 2026.
- SAP Support, KBA 2421211, "Stock for a material with a deletion flag can be seen in transaction MMBE". https://userapps.support.sap.com/sap/support/knowledge/en/2421211. Accessed on October 27, 2026.
- SAP Support, KBA 3080582, "S4HANA: Changes for MARC-MMSTA field not displayed in MM02/MM03". https://userapps.support.sap.com/sap/support/knowledge/en/3080582. Accessed on October 27, 2026.