Skip to main content

HANA-Optimized SQL

AdvancedPerformance⏱ 20 min

Task

Refactor data processing logic to leveragecode pushdown. Aggregate sales values directly in the database instead of ABAP loops.

Write Your ABAP Code

ABAP Editor
Loading...
📥 Sample Output
WERKS   TOTAL_NET_VALUE
1000    1250000
2000    980000
💡 Hint

Use SUM and GROUP BY directly in Open SQL instead of looping in ABAP.

✅ View Reference Solution
SELECT werks,
       SUM( net_value ) AS total_net_value
  FROM zsales
  GROUP BY werks
  INTO TABLE @lt_result.