>50% faster SAP reporting through autonomous AI
Autonomous AI refactored a DB-heavy SAP report into HANA-aligned execution, cutting runtime in half while preserving 100% functional accuracy.
Outdated ABAP Creating Performance and Migration Risk
As part of its S/4HANA migration initiative, the organization uncovered a growing risk inside its SAP ECC landscape: years of custom ABAP code written for legacy databases, not HANA.
Business-critical reports were running significantly slower than acceptable, impacting finance and operational teams. Many programs relied on outdated coding patterns that degraded performance as data volumes grew.
Traditional remediation estimates ranged from 1-2 weeks per program, making large-scale optimization impractical. The approach depended heavily on specialized ABAP expertise, increasing both delivery risk and cost.
With migration timelines under pressure, the organization needed a faster, safer alternative-without expanding teams or delaying transformation.
AI-Driven ABAP Optimization for S/4HANA Readiness
Sookti AI deployed autonomous agents to analyze and optimize the client’s custom SAP programs end-to-end.
The workflow included:
Data-driven improvements measured on live enterprise workloads. Results below represent a subset of optimized programs from a broader SAP performance initiative.

Before vs. After — SAP Runtime Analysis (ZDSALEMIS_GST, live production) Runtime: 8.63s → 4.16s | DB time share: 80.81% → 52.90%
Execution shifted from DB-bound behavior to balanced, HANA-optimized processing through structural code refactoring.
Pro-Level Parallel Cursor Logic
For massive nested datasets, agents implement parallel cursors to scan two sorted tables simultaneously, avoiding repeated lookups.
LOOP AT it_final1 ASSIGNING <gv>.
" Legacy: Nested loop causes O(n*m) complexity
LOOP AT it1_final ASSIGNING<gv1>
WHERE delv_no = <gv>-delv_no
AND length = <gv>-length.
< gv > -bundle = <gv>-bundle + <gv1>-bundle.
ENDLOOP.
ENDLOOP." Sort once for Parallel Cursor logic
SORT it1_final BY delv_no length.
DATA(lv_curr_idx) = 1.
LOOP AT it_final1 ASSIGNING <gv>.
" Parallel Cursor: Linear traversal (O(n+m))
LOOP AT it1_final ASSIGNING < gv1 > FROM lv_curr_idx.
IF < gv1 > -delv_no < <gv>-delv_no.
CONTINUE. " Skip to start of match
ELSEIF < gv1 > -delv_no > <gv>-delv_no.
EXIT. " Early exit: No more matches possible
ELSE.
lv_curr_idx = sy - tabix. " Update starting point
< gv > -bundle += <gv1>-bundle.
ENDIF.
ENDLOOP.
ENDLOOP.“We'd been living with this report's performance issues for years. Sookti AI fixed in a day what we'd been putting off for months, and the code it produced was cleaner than anything we'd have written ourselves.”
Engagement Details
Ready to Unlock Similar Performance Gains?
Run a controlled pilot on your most critical SAP workloads and validate measurable results before scaling enterprise-wide.
Book a call with us or write to: aditya@sookti.ai | tanushree@sookti.ai

