CASE STUDY/GLOBAL CONSUMER GOODS MANUFACTURER

Up to 99% faster SAP reporting through AI-led ABAP optimization

Autonomous AI agents optimized multiple business-critical ABAP programs for a leading consumer products manufacturer, resolving timeouts, cutting runtimes up to 99%, and delivering results with zero manual ABAP intervention.

Pattern
PERFORMANCE
Up to 99%faster runtime
MANUAL ABAP
ZeroIntervention required
DELIVERY VELOCITY
2 daysvs 2 months
CUSTOM CODE
100,000+lines refactored
THE CHALLENGE

Under production-scale workloads, critical SAP programs were timing out or crashing, creating operational risk and threatening system stability.

Our client, one of India's largest footwear manufacturers, was running SAP ECC with a large inventory of custom ABAP programs spanning production planning, procurement, logistics, finance, and warehouse management. With an S/4HANA migration on the horizon, performance issues that had accumulated over years could no longer be deferred.

The immediate problem was operational. Across several programs covering MIS reporting, transport flow tracking, purchase registers, customer aging, article master creation, and more, programs were either timing out with maximum runtime errors, crashing with short dumps due to memory exhaustion, or running for minutes before producing results. Month-end reporting cycles were strained and business teams were forced to work around system instability.

Manual remediation was estimated at months of iterative code review and testing, an effort that was neither available nor acceptable given the migration timeline and the scarcity of ABAP expertise.

Traditional remediation estimates came back at months of developer effort with no guarantee of consistent quality across all programs.

- Program Lead, Global Footwear Manufacturer
THE APPROACH

Autonomous AI-driven ABAP Optimization Across Production Programs

Sookti AI deployed autonomous agents across all programs simultaneously. Each agent analysed the full codebase, identified performance bottlenecks, and applied targeted technical fixes without touching business logic or functional output.

The agents:

Identified execution hotspots across loops, database access patterns, and aggregation logic
Replaced SELECT-in-loop patterns with bulk retrieval using FOR ALL ENTRIES
Introduced sorted internal tables with binary search for O(log n) read performance
Moved repeated database reads outside loops, preloading data safely in memory
Applied parallel cursor techniques to eliminate nested loop overhead
Optimized memory-intensive programs to work within runtime and memory constraints
Preserved every functional condition, rule, and output structure exactly
Every transformation was automatically validated against the original program output before delivery. Automated documentation was generated inline, making every change traceable and audit-ready.
THE RESULTS

Data-driven improvements measured on live enterprise workloads. Results below represent a subset of optimized programs from a broader SAP performance initiative.

PROGRAM / REPORT
ZPP_MIS
BEFORE (LEGACY)
Timeout(all divisions)
AFTER (SOOKTI AI)
8.7s(all divisions)
IMPROVEMENT
83%faster
PROGRAM / REPORT
ZCUST_OPEN_ITEM_AGE
BEFORE (LEGACY)
>18.5s
AFTER (SOOKTI AI)
2.34s
IMPROVEMENT
87%faster
PROGRAM / REPORT
ZMM_R_PR_CLOSE_NEW
BEFORE (LEGACY)
508s
AFTER (SOOKTI AI)
276s
IMPROVEMENT
45%faster
PROGRAM / REPORT
ZSD_TRANSPORT_FLOW_RPT_NEW
BEFORE (LEGACY)
Timeout(full range)
AFTER (SOOKTI AI)
97.6s
IMPROVEMENT
97%faster
PROGRAM / REPORT
ZRWSORLIARTI
BEFORE (LEGACY)
264s
AFTER (SOOKTI AI)
164s
IMPROVEMENT
38%faster
PROGRAM / REPORT
ZWM_ARTICLE_MLGN_CREATION
BEFORE (LEGACY)
112s / Timeout
AFTER (SOOKTI AI)
1.3s / 9.1s
IMPROVEMENT
99%faster
PROGRAM / REPORT
ZRM07MLBD
BEFORE (LEGACY)
307s(subset)
AFTER (SOOKTI AI)
157s(subset)
IMPROVEMENT
49%faster
PROGRAM / REPORT
ZMM_PURCHASE_REGISTER_NEW
BEFORE (LEGACY)
70.9s(subset)
AFTER (SOOKTI AI)
52.8s(subset)
IMPROVEMENT
26%faster
PROGRAM / REPORT
ZRM07MLBS
BEFORE (LEGACY)
34.9s(subset)
AFTER (SOOKTI AI)
8.9s(subset)
IMPROVEMENT
74%faster
PROGRAM / REPORT
ZMM_MATERIALDETAIL
BEFORE (LEGACY)
122.4s(subset)
AFTER (SOOKTI AI)
32.3s(subset)
IMPROVEMENT
74%faster

Programs previously timing out on full production datasets now complete within seconds to minutes. Results were validated with 100% functional parity before delivery. The transformation restored system stability in production while preserving clean-core principles.

DOCUMENTATION
Automatictraceable and audit-ready
MEMORY STABILITY
Resolvedall high-memory short dumps (5.5+ GB loads)
OUTPUT VALIDATION
100%with zero functional deviation observed
TIMEOUT ELIMINATION
100%for multiple critical reports across modules
WHAT CHANGED

From SELECT-in-Loop to Bulk Retrieval with Binary Search

Agents identify repeated database access patterns inside loops and refactor them to bulk retrieval with binary search, delivering O(log n) lookup performance regardless of dataset size.

Before
SELECT in LOOP
LOOP AT t_final ASSIGNING <l_fs_final>.
  " Performance Anti-pattern: DB hit in loop
  SELECT SINGLE audat FROM vbak
    INTO(audat)
    WHERE vbeln = <l_fs_final>-sono.
        ENDLOOP.
After
Bulk Select + Binary Search
IF t_final IS NOT INITIAL.
  " Bulk Retrieval using FOR ALL ENTRIES
  SELECT vbeln, audat FROM vbak
    INTO TABLE @DATA(lt_vbak)
    FOR ALL ENTRIES IN @t_final
    WHERE vbeln = @t_final - sono.
  SORT lt_vbak BY vbeln.
        ENDIF.
LOOP AT t_final ASSIGNING <l_fs_final>.
  " O(log n) read instead of DB call
  READ TABLE lt_vbak INTO DATA(ls_vbak)
    WITH KEY vbeln = <l_fs_final>-sono
    BINARY SEARCH.
        ENDLOOP.
SOOKTI AI'S VALUE
ASPECT
Code Transformation Time/ Time to Go-Live
BEFORE (MANUAL)
1 week per report (7 man-days per 5,000+ lines)
NOW WITH SOOKTI AI
Minutes per report, no manual intervention
ASPECT
Performance
BEFORE (MANUAL)
Bottlenecks from outdated patterns (SELECT * , loop-in-loop)
NOW WITH SOOKTI AI
50–90%faster execution with HANA-specific techniques
ASPECT
Code Optimization
BEFORE (MANUAL)
Manual identification and patching of inefficient code
NOW WITH SOOKTI AI
Automatic identification and correction; rewritten for HANA (CDS views, parallel cursors)
ASPECT
Quality Assurance
BEFORE (MANUAL)
Manual testing; high dependency on key developers
NOW WITH SOOKTI AI
100%functional parity validated with automated regression testing
ASPECT
Risk Management
BEFORE (MANUAL)
High dependency on key developers; risk of human error
NOW WITH SOOKTI AI
No “hero-developer” dependency; consistent, repeatable, auditable process with self-documenting output
ASPECT
SAP Clean-Core & Future/Upgrade-Proof
BEFORE (MANUAL)
Customizations break with SAP upgrades, manual checking to ensure HANA-compliant code
NOW WITH SOOKTI AI
Built-in clean-core compliance; SAP Standard CDS, Functions and Classes
ASPECT
Long-Term Maintainability
BEFORE (MANUAL)
Difficult to maintain; lack of documentation and poor readability
NOW WITH SOOKTI AI
Annotated ABAP with rationale per change; easy to maintain
TESTIMONIALS

Sookti AI resolved timeouts we had been living with for years, across 10 programs, in a single batch, without touching a line of code manually.

- SAP Technical Lead, Client
ENGAGEMENT DETAILS

Engagement Details

Industry
Manufacturing (Footwear)
Landscape
ECC 6.0 S/4HANA (Brownfield)
Scope
Custom Code Optimization
Environment
Live Enterprise Production Workloads

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

Background ASCII Illustration