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

BAPI_SALESORDER_SIMULATE Performance Problem

Former Member
0 Likes
1,554

HI All,

My requirement is to select all Materials from MARA (as per certain condition), may be this can be some 50000 materials.....!!

After this i have to use BAPI_SALESORDER_SIMULATE to simulate the creation of a sale order to check whether the material is correct or not. This BAPI stops when it finds an incorrect material. I will check the material and delete from my internal table. After deleting this material, i will run the BAPI for the rest of materials. I will do this till the BAPI returns a success message. This will help me give the success Materials.

This program of min eis running for 8 hours, when i am giving all the materials to select.

I did a performance check, and it is telling that the most time taken one is MARA_ARRAY_READ function module and this function module is calling the subroutine "PERFORM SPERREN_MARA USING SY-SUBRC". If you see in the subroutine, the time consuming one is this function module "ENQUEUE_EMMARAS". This one is called for each material.

Please let me know if anything can be done to by pass this check...or to improve the performance..

Regards

Rakesh.

2 REPLIES 2
Read only

Former Member
0 Likes
881

IMHO

Sounds like you are using a sledge hammer to crack a walnut.

Why not identify those specific items that constitute a correct material, and test for these. The BAPI may do it all, however, doing it all comes with a cost. You have found the cost in long run times, poor performance, etc.

Read only

Former Member
0 Likes
881

HI Rakesh

I guess you can expect better solutions if you can let us know the exact requirement...

<b>After this i have to use BAPI_SALESORDER_SIMULATE to simulate the creation of a sale order to check whether the material is correct or not.</b>

What do u mean by correct or not???

If you can provide a clear requirement, i guess friends here can give better advises and alternatives if any...

Kind Regards

Eswar