2006 Dec 07 8:27 AM
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.
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.
2006 Dec 07 11:43 AM
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.
2006 Dec 07 1:37 PM
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
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |