I use this article to log my findings today.
Performance issue during Sales Order Save
I am developing the program to modify and save sales order in the backend. I found the performance of order save is poor – on average it took 6 seconds to save a order. Then I use SAT to trace the program to try to find the performance bottleneck.
I expand the call hierarchy list:
Most of the execution time is spent on this method CL_DOC_PROCESSING_CRM_ORDER=>CRM_ORDER_EXEC_SMART_FORM.
And every time the order is saved, I notice there is an outbound request in SOST:
the document is a smart form:
Looking into its outer callstack I found the smart form generation and sending is implemented via action framework:
Here below is how I investigate it step by step:
1. find the process type of changed sales order in table CRMD_ORDERADM_H: WCBC
2. in SPRO Customer Relationship Management->Transactions->Basic Settings->Define transaction types:
find its leading transaction category BUS2000115
And action profile:
3. in SPRO Customer Relationship Management->Basic functions->Actions->Actions in Transactions->Change Actions and Conditions->Define Action profile and conditions:
Now we find the smart form name, the process class and method which is exactly what we have found in SAT trace:
In SPRO Customer Relationship Management->Basic functions->Actions->Actions in Transactions->Change Actions and Conditions->Define Conditions
we found the Partner function is set as 0001 Sold-To party.
So we go to webclient UI, navigate to Sold-To Party,
Maintain my email address there
after that I could receive the mail with smartform attached every time sales order is changed.