‎2006 Feb 22 8:30 PM
hi,
i want to delete some duplicate records in material master,i have to delete that one by using MM02 ,how can i do that one thanx in advance.
‎2006 Feb 22 8:33 PM
Hi,
You can write a program and check the Duplicate material(Define your logic ) and then you can use the following function to delete duplicate material: BAPI_MATERIAL_DELETE
this will set deletion flag for the duplicate material.
Regards,
Lanka
‎2006 Feb 22 8:35 PM
What makes them duplicate? As material number field is key and you can not have duplicates, does the material description make them duplicates? If so you will need to check for duplicates in MAKT, get the material numbers which are duplicates then you can use MM17 to flag them for deletion.
Regards,
Rich Heilman
‎2006 Feb 22 8:39 PM
hi Rich Heilman,
I have duplicates in material charctersics,like rawstock and oil content.
‎2006 Feb 22 8:45 PM
Hi Priya,
You can try functions:
BAPI_CLASS_CHANGE
BAPI_CLASS_CHARVALUE_DEL_DEP
Regards,
Lanka
‎2006 Feb 22 8:55 PM
Hi Priya,
YOu can use FM : CLAF_CLASSIFICATION_OF_OBJECTS to get all the charcterstic values. Then compare charcterstics and then you can set the deletion flag by using :BAPI_MATERIAL_DELETE
Hope this may help you.
Regards,
Lanka
‎2006 Feb 22 9:09 PM
hi Murthy,
let me explain detail,
we have some duplicates in materail charctersicks
DataPacket Data rec.Component Material Crustsurf
1
1
‎2006 Feb 22 9:11 PM
hi Murthy,
let me explain detail,
we have some duplicates in materail charctersicks
DataPacket Data rec.Component Material Crustsurf
1 20 3962 nubuck
1 21 3962 nubuck
like this so i want to delete those duplicats.
‎2006 Feb 22 9:25 PM
Hi Priya,
As I am looking in to your examples you have maintained two classes for a given material and you want to delete one class which is not relevant.
Try this function :
BAPI_CLASS_CHARVALUE_DEL_DEP
or
CLAF_CHECK_UDEF_CLASS_CHANGE.
Regards,
Lanka
Message was edited by: Lanka Murthy
‎2006 Feb 22 8:38 PM
Hi Priya,
There cannot be duplicates for material.,if you are just checking material no. alone.
‎2006 Feb 22 8:40 PM
Hi Priya,
You can use MM06 to flag material for deletion.
Hope this will help.
Regards,
Ferry Lianto
‎2006 Feb 22 8:46 PM