Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting Material Master Records ????

Former Member

Hi All,

I want to delete material master records.

Can anyone please suggest me how to delete them including the data from all the relevant tables associated with MARA.

It will be great if anyone suggest me step by step procedure.

<b>Reward Points will be there</b>

Thanks,

Harish

6 REPLIES 6

Former Member
0 Kudos

Hi Harish,

Writing a piece of code to delete the data from MARA might delete the data from the table itself but might not reflect any changes in all the related ones.

I can suggest one way of doing this, try to record the transaction MM02 where in you select a material number and delete the record from the screen. Now write a code in which you populate an internal table with all the material numbers from MARA and then using that internal table data execute a BDC program for the above done recording, so that all the materials are deleted from the table through the transaction, this shall reflect changes to all the realted areas.

<b>Reward points if this helps,</b>

Kiran

Former Member
0 Kudos

Hi Harish,

first mark the material for deletion with transaction MM06 after that use transaction MM71.

Regards Vassko!

Former Member

Hi Harish

If there are no transaction(Good recieved .. etc) in this material master , you can do it by marking for delete after that archiving the data.

The archiving is the method to delete master data . you can tell basis team which material that you would like to delete it .

If there are some transaction in this material master , you can' t do it .

Best Regards

Wiboon

Message was edited by:

Wiboon Chaiyabutsakul

Former Member
0 Kudos

Hi Harish,

Use transaction MM70 - Material Master->Other->Reorganization->Material->Choose.

Build variant with selection range of material master records to be selected for deletion and maintain run parameters. Execute.

Use transaction MM71 - Material Master-> other-> Reorganization->Material->Reorganization

Build a second variant

Maintain run parameters and execute.

It is also important to remove the records manually from info record, POs, PRs, reservation etc for successful deletion of the material.

Reward points pls.

Regards,

Govind.

Former Member
0 Kudos

How can we delete materials permanently from Material master?

Use transaction

MM70 - Material Master->Other->Reorganization->Material->Choose.

Build variant with selection range of material master records to be selected for deletion and maintain run parameters. Execute.

Use transaction

MM71 - Material Master-> other-> Reorganization->Material-Reorganization

Build a second variant

Maintain run parameters and execute.

It is also important to remove the records manually from info record, POs, PRs, reservation etc for successful deletion of the material.

regards

Giridhar

Former Member

Archiving the Material Master

Transaction SARA contains all the SAP archiving objects for all the SAP R/3 applications modules. All the SAP archive functions are shown in SARA. Choose the corresponding SAP archive object, hit enter and the archive administration menu will be shown. Provided here will be an example on how to archive the SAP Material Master.

Archive a Material Master Record

When a material is no longer required in a company or plant, you can archive and delete the material master record.

You have to Flag the material master record for deletion. This is known as logical deletion.

Before a material master record can be archived and deleted, other objects (such as purchasing documents) that refer to this material must themselves be archived. You can see which objects these are and the dependencies between them in the network graphic.

If a material master record cannot be archived and deleted at a given organizational level, the reason is given in the log (for example, a purchase order exists for the material). The log also contains technical data such as the number of material master records read and the number deleted.

Some of the archive error log message :-

Costing data exists

Use in routing

Use in sales and distribution

Use in bill of material

Delivery exists

Costing data exists

Info record exists

Purchase order exists

The Archiving steps :-

Archiving object MM_MATNR for archiving material master records.

You can display the archived data, but not reload it.

To archive the material master, first goto transaction MM71.

Type in a variant name and click Maintain. (Tick the Test Mode for archive simulation).

Save the variant.

Maintain the Start date and Spool parameters and click execute.

Click Goto Job Overview to check the archive status.

To do a permanent delete, goto transaction SARA and click Delete button.

Maintain the Archive Selection, Start date and Spool parameters.

Click Test Session for testing or click execute to start the deletion program.

Click Goto Job Overview to check the delete status.

Now, if you goto MM02/MM03, you will not be able to find the record in the material master.