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: 

duplicate records

Former Member
0 Kudos

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.

11 REPLIES 11

Former Member
0 Kudos

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

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

0 Kudos

hi Rich Heilman,

I have duplicates in material charctersics,like rawstock and oil content.

0 Kudos

Hi Priya,

You can try functions:

BAPI_CLASS_CHANGE

BAPI_CLASS_CHARVALUE_DEL_DEP

Regards,

Lanka

0 Kudos

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

0 Kudos

hi Murthy,

let me explain detail,

we have some duplicates in materail charctersicks

DataPacket Data rec.Component Material Crustsurf

1

1

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

Hi Priya,

There cannot be duplicates for material.,if you are just checking material no. alone.

ferry_lianto
Active Contributor
0 Kudos

Hi Priya,

You can use MM06 to flag material for deletion.

Hope this will help.

Regards,

Ferry Lianto

0 Kudos

You will have to write up some logic to figure out which ones are duplicates, then you can use that list of material numbers and use any of the "already mentioned" solutions for flagging the material for deletion.

Regards

RIch Heilman