
Once upon a time (October 2024), one of our clients encountered severe performance issues. Naturally, we investigated the problem, and I found it fascinating how a simple copy-paste mistake could have such a significant side effect. Unfortunately, I was too busy at the time to write about it immediately, but now I finally have the chance to share it.
The client experienced terrible performance when mass-processing delivery documents—specifically, during the mass assignment of multiple deliveries to a transportation unit (TU). The process was so slow that it resulted in a timeout short dump.
I generally find performance topics in EWM quite interesting because there's often room for a 10–50% improvement in execution time with minimal effort. This case was no exception: most of the effort was in understanding why the process was so slow. The fix itself was trivial—especially now, since SAP has already released a corresponding OSS Note.
During debugging, we noticed that the TU/Delivery was being read far more times than expected for this kind of operation.
After further investigation, I discovered that a recently implemented cache in the class /SCWM/CL_SR_TUDLV wasn’t functioning as intended. This class is central for reading TU/Delivery assignments, and in our scenario, it was executing read operations for every single item—repeatedly, for all processed items.
Here’s the issue:
Not so easy to spot, right? But with SAP’s correction, it becomes clearer:
At the time we identified the problem, SAP had not yet released a fix, so we proceeded with a modification to correct the issue ourselves by replacing sy-subrc with sy-tabix.
A simple copy-paste error led to an incorrect index (lv_index_mtdlv), which caused the entire cache mechanism to fail. As a result, the cache table remained empty, preventing any caching from taking place.
If you want to verify whether this issue affects your system, you can check directly in the method /SCWM/CL_SR_TUDLV=>SETUP.
Alternatively, you can check if your system falls within the gap between the following OSS Notes:
2954670 ( Causing Side effect ) Version Components:
and OSS 3516727 (Fixing Side effect) Version Components:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |