Hello
In addition, if you are using the BAPI to create the orders, please take a look on the following note:
https://service.sap.com/sap/support/notes/484823
This note mentions the flag USECOLL_UPD, which can be used to postpone the update of the planning file. The planning file is updated collectively when the last order is created and that should help you to improve the performance.
See the relevant information extracted from the note below:
The new functions of a collected update of the planning file entries per LUW can be activated by setting optional parameter HEADERDATA-USE_COLL_UPD. However, the user must make sure that optional parameter HEADERDATA-LAST_ORDER is set for the last call of one of the two BAPI methods CREATE or CHANGE. Only then all planning file entries are transferred to database table MDVM or DBVM!
Example:
BAPI method CREATE (function module BAPI_PLANNEDORDER_CREATE) is called in form of a loop for the creation of several planned orders. In this case, you must generally set parameter HEADERDATA-USE_COLL_UPD. Parameter HEADERDATA-LAST_ORDER is only set for the last loop pass and thereby triggers the update of the planning file entries collected before.
BR
Caetano