Application Development and Automation 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: 
Read only

How to delete Material Master data

Former Member
0 Likes
2,064

Hi All,

Some wrong materials are created .Now can you please let me know how to delete the material master data.

Regards.

Rohit.

12 REPLIES 12
Read only

Former Member
0 Likes
1,326

Hi...

write a test program to delete records from material master table based on material. select that records and keep them in internal table.

then use belo syntax.

DELETE <DB tab> FROM TABLE <ITAB>.

Regards,

KP.

Read only

Former Member
0 Likes
1,326

Hi...create a report which accepts the materials to be deleted from a file

and delete using DELETE MARA FROM WA.

Read only

Former Member
0 Likes
1,326

Use BAPI BAPI_MATERIAL_DELETE

Hope this helps...

Read only

Former Member
0 Likes
1,326

HI Rohit,

Try using BAPI_MATERIAL_DELETE

This can be used to set the delete flag.

Regards,

Nitin.

Read only

Former Member
0 Likes
1,326

Hi,

Do a simple prg:

Select all the records (which records u want to delete) into one internal table.

Then delete the db table using this internal table.

DELETE <db tablename> FROM TABLE<internaltable name>.

Hope this will help u.

Thanks.

Read only

GauthamV
Active Contributor
0 Likes
1,326

Use SARA transaction.

Read only

Former Member
0 Likes
1,326

hi

for you abovesaid requirement,you need to goto material in RSA1, right click and choose "delete master data".now the system will check the usage of the master data records in data providers and other info objects. If a record is not used, it will be deleted subsequentely.

Moreover there is no possibility of getting rid of all materials if you have transactional data posted to these objects.

try out these fm's as well

OL_SET_LVORM_MATERIAL

SET_LVORM_MATERIAL

hope this helps

regards

Aakash Banga

Edited by: aakash banga on Jan 20, 2009 4:56 PM

Read only

Former Member
0 Likes
1,326

MM06 - Mark for deletion

Read only

Former Member
0 Likes
1,326

Hi

Use MM06 T code delete the same

For mass deletion write BDC for the same

Regards

Shiva

Read only

Former Member
0 Likes
1,326

i would NEVER, EVER directly delete entries from the material master.

set the delete flags with the BAPI, or MM06, as suggested, then run SARA for object MM_MATNR, also as suggested.

the first sets the delete flag, the second physically removes materials from the tables that have thier delete flag set.

Read only

0 Likes
1,326

6 people replied with how to delete it right from the master tables. 6 PEOPLE ! Shame shame.

David is correct, don't ever do it that way.

MM06 to mark it for deletion, then Archive

Read only

0 Likes
1,326

I agree as well.

Lets try a little test to see how many cowboys are out there...