‎2009 Jan 20 11:12 AM
Hi All,
Some wrong materials are created .Now can you please let me know how to delete the material master data.
Regards.
Rohit.
‎2009 Jan 20 11:18 AM
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.
‎2009 Jan 20 11:20 AM
Hi...create a report which accepts the materials to be deleted from a file
and delete using DELETE MARA FROM WA.
‎2009 Jan 20 11:20 AM
‎2009 Jan 20 11:23 AM
HI Rohit,
Try using BAPI_MATERIAL_DELETE
This can be used to set the delete flag.
Regards,
Nitin.
‎2009 Jan 20 11:24 AM
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.
‎2009 Jan 20 11:24 AM
‎2009 Jan 20 11:25 AM
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
‎2009 Jan 20 11:26 AM
‎2009 Jan 20 11:33 AM
Hi
Use MM06 T code delete the same
For mass deletion write BDC for the same
Regards
Shiva
‎2009 Jan 20 7:51 PM
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.
‎2009 Jan 20 9:59 PM
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
‎2009 Jan 20 11:25 PM
I agree as well.
Lets try a little test to see how many cowboys are out there...