‎2012 Feb 07 4:04 PM
Hi ABAPers,
I have a requirement to create material master record fetching some attributes from the existing SAP materials i.e to replicate the Create with reference feature in MM02
I have tried passing the value of reference material number to PL_REF_MAT parameter in CLIENDATA table of 'BAPI_MATERIAL_SAVEDATA'. But still it is not creating with reference.
I have got a solution; that is use of BAPI_MATERIAL_GET_ALL first and then BAPI_MATERIAL_SAVEDATA, but it may be a performance issue for my program as i m expecting 60000 materials.
Please propose any other solution.
‎2012 Feb 07 4:24 PM
Hi Ankit,
Are you doing from non sap or in sap.The bapi is fine for your requirement.Keep some good coding and see.Check with BAPI_STANDARDMATERIAL_CREATE,MATERIAL_MAINTAIN_DARK.
Regards,
Madhu.
‎2012 Feb 07 4:28 PM
Hi Madura,
So you mean to say is that, i can create a material with reference material number by passing reference material number value to PL_RET_MAT field of the CLIENTDATA table of BAPI_MATERIAL_SAVEDATA ?
‎2012 Feb 07 4:33 PM
‎2012 Feb 07 4:35 PM
Hi Madhurao,
Sorry for mispronouncing your name.
I have tried that, but the BAPI is throwing error. According to you it is technically feasible?
‎2012 Feb 07 4:50 PM
‎2012 Feb 07 5:00 PM
Hi Madurao,
I am putting all the values in the BAPI_MATERIAL_SAVEDATA as well as PL_REF_MAT value.
This i am doing for the function code 'UPD' for an already existing material but the attributes like material group etc are not getting changed for this material on the basis of reference material.
Thanks and regards,
ankit
‎2012 Feb 08 4:17 AM
Hi Ankit,
Did you check how it is copying from mm01 when you copying material.
Regards,
Madhu.
‎2012 Feb 08 6:08 AM
No , i haven't checked.
For that do i have to do debugging of MM01?