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

Creating material master with Reference material

Former Member
0 Likes
658

Hi folks,,,

I need to create a Material by using its referrence material,is it poosible thru bapi?

Eg : original Material Number : Material01

with all its details including sales org and plantsand etc,,,

Now i need to create a material like

example : Material01/AB

with all its sales org and plants copied from the original material.

Could anyone please help with a sample code?

Thank a lot in advance

Rinky.

3 REPLIES 3
Read only

venkata_ramisetti
Active Contributor
0 Likes
452

Hi,

Can u check FM MATERIAL_REFERENCE_GEN is useful or not?

It is not a BAPI/RFC.

If this FM works fine for your requirement, you can create a wrapper function module using this function module.

Thanks,

Ramakrishna

Read only

0 Likes
452

anyother suggestions is also welcome.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
452

Yes it is possible thru BAPI_MATERIAL_SAVEDATA. You will need to get all of the data for the reference material, into the structures for the BAPI, then simple chang the material number to the new material number.

The field names are different in the BAPI then the fields in MARA, MARC, MARD, MBEW, etc. So you will need to map them.

Regards,

RIch Heilman