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

copy material master

Former Member
0 Likes
2,695

Hey friends,

I need to copy a material with refrence to another material.all the sales org and plants and all the other detials are the same.

Could anyone pelase let me know any function module or BAPI for this?

Thanks

Tina

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,001

Yes, you can use the function module, MATERIAL_MAINTAIN_DARK, or the BAPI, BAPI_MATERIAL_SAVEDATA.

You can also do this manually using MM17, or MM01.

Regards,

Rich Heilman

8 REPLIES 8
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,002

Yes, you can use the function module, MATERIAL_MAINTAIN_DARK, or the BAPI, BAPI_MATERIAL_SAVEDATA.

You can also do this manually using MM17, or MM01.

Regards,

Rich Heilman

Read only

0 Likes
2,001

Hi rich,

I tried using using it,, but its not working properly, could please get me a smaple of code so that i can try it out and see..

this is my development,Actually this is one of the process, i need to change the material no by concatinating the refernce material no with SUB,

for example if suppose i want to copy a material 1234 to another material then the material which is duplicated should contain its no as 1234/DUP1.

And this is also a back ground process,, i am liitle bit confused and worried.Please let me know a way to acheive this task.

Thanks

Tina

Read only

0 Likes
2,001

Hi rich,

I tried using using it,, but its not working properly, could please get me a smaple of code so that i can try it out and see..

this is my development,Actually this is one of the process, i need to change the material no by concatinating the refernce material no with SUB,

for example if suppose i want to copy a material 1234 to another material then the material which is duplicated should contain its no as 1234/DUP1.

And this is also a back ground process,, i am liitle bit confused and worried.Please let me know a way to acheive this task.

Thanks

Tina

Read only

0 Likes
2,001

any suggestions

Read only

0 Likes
2,001

Hi Tina, which solution are you going with? The BAPI is probably the best way to go programmatically.

Regards,

Rich Heilman

Read only

0 Likes
2,001

Hi Rich,

I tried creating a material using this bapi fucntion by haveing a reference material to be copied, but i was not able to achieve this task.(programatically)

Or shall i go with BDC Process,, let me know your suggestions

Thanks

Tina

Read only

0 Likes
2,001

BDC processing will only make your head hurt(really bad). Lets move forward with the BAPI. The below link shows how to copy a material from one plant to another, you would need to follow this same lines. You need to get all of the info for the reference material and fill the BAPI structures accordingly, then replace the material number with the new material.

http://www.sap-img.com/abap/bapi-to-copy-materials-from-one-plant-to-another.htm

Regards,

Rich Heilman

Read only

0 Likes
2,001

Hey Rich,

Thanks for your support,let me try doing this and let you know how it works.

Thanks a lot.

Tina