Application Development 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: 

SD_SALESDOCUMENT_CREATE bad performance

gili81
Discoverer
0 Kudos
828

Hi,

We have an interface which SAP is the provider and we return the price of each material that supplied in the request.

The process execute FM SD_SALESDOCUMENT_CREATE which take too long apprx 7.5 seconds which is alot.

In the trace I can see that in this FM the SD_SALES_DOCU_MAINTAIN take 7.5.

All we need is to execute SD_SALESDOCUMENT_CREATE in test mode and return the price of material according to the terms of payment of each material.

Is there any option to improve the performance ?

2 REPLIES 2

DominikTylczyn
Active Contributor
0 Kudos
622

Hello

First of all, I would use BAPI_SALESORDER_CREATEFROMDAT2 instead of SD_SALESDOCUMENT_CREATE. The BAPI uses SD_SALESDOCUMENT_CREATE internally, so it won't help with the performance, but the BAPI is released for end customer usage whereas SD_SALESDOCUMENT_CREATE is not. Better stick to official interfaces.

Besides, I think what you are doing is the correct approach. Don't look for any shortcuts here, as there are none. You have to build a sales order fully in order to get the price. There are many different functions executed behind the scenes while creating a sales order like partner determination, scheduling, ATP, pricing etc. They all take time. I'd suggest to run a trace and check what the bottle neck is and try to optimize that. If you do that, online sales order processing in VA01 will be faster too.

Best regards

Dominik Tylczynski

raymond_giuseppi
Active Contributor
0 Kudos
622

You could try to use BAPI_SALESORDER_SIMULATE.