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

Material extension

Former Member
0 Likes
1,275

Hi Team,

I need to create the material for more than 10 sales organization presently i am using inside the loop

BAPI_MATERIAL_SAVEDATA function module its taking more time.  So i need to create the material at single shot for all the sales organizations.\

Can anyone suggest me this BAPI -BAPI_MATERIAL_SAVEREPLICA will help to solve this issue.If anyone having sample code also give me..

Thanks in Advance,

Ramesh.

5 REPLIES 5
Read only

Former Member
0 Likes
1,082

see this thread it will help you to understand about creating more than one material at a time

Read only

Kartik2
Contributor
0 Likes
1,082

Hi,

You are correct, the bapi BAPI_MATERIAL_SAVEREPLICA can be used for mass upload of materials. Please go through the documentation provided for the function module, you will understand how to use it.

For more information on how to use the function module you can do a where used list for the function module and find some standard code where it is used. Hope it helps. Thank you.

Regards,

kartik

Read only

former_member209818
Active Contributor
0 Likes
1,082

You can send all your Sales Org data in SALESDATA Internal table and it should extend the material for all the sales ORgs

Read only

kumud
Active Contributor
0 Likes
1,082

Hello Ramesh,

I did a where-used list on FM BAPI_MATERIAL_SAVEREPLICA and found that there are occurrences wherein BAPI_MATERIAL_SAVEDATA has been commented to use the SAVEREPLICA FM.

Now the point is if the data is very huge, you could call FM BAPI_MATERIAL_SAVEREPLICA in chunks like let's say for every 500 no. of records. You may check the performance after doing the same.

Regards,

Kumud

Read only

AnjaneyaBhardwaj
Contributor
0 Likes
1,082

Hi ,

Hope you found your answer.Few points may be worthwhile to observe.

1. BAPI_MATERIAL_SAVEDATA  and BAPI_MATERIAL_SAVEREPLICA are not alternates in terms of just loops  as the SAVEREPLICA corresponds to  the IDOC MATMAS_MASS_BAPI01 and SAVEDATA corresponds to IDOC MATMAS_BAPI01 .If you observe the structure you can find out the difference  so it really depends on your need whether you can replace one with another or not .

2. Help with the performance is not clear  as finally the Underlying FM's which these BAPI's call are same with Minor difference in the way update occurs(Although this may result in performance gain as the database LUW consumes most resources) .

3. Rollback has to be handled very carefully for MASS update as If there is something wrong with the any one of the 999999999 (max no you can input)possible material .None of the Material will get updated and I think that you would not like that.

4. It may be worthwhile to check the real performance you will gain because of the reason explained in point 2.

5. Please check for Mass update T code MM17 or similar transaction to extend your parts to multiple Sales Organization After your part has been created.

6. The best bet is still Idocs' as it will handle the status commit/Rollback properly even in the case of Mass update but it depends whether you are in the implementation or just writing program to avoid User interaction.

Thanks,

Anjan .

.