abap-performance-hana

Optimizes ABAP code for HANA by guiding query pushdown and database-centric patterns.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/LeON-W666/ABAP-Remote-FS-for-Codex --skill abap-performance-hana-leon-w666
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: abap-performance-hana
Source: https://github.com/LeON-W666/ABAP-Remote-FS-for-Codex/tree/main/client/media/skills/abap-performance-hana
Command: npx skills add https://github.com/LeON-W666/ABAP-Remote-FS-for-Codex --skill abap-performance-hana-leon-w666

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves slow or wasteful ABAP performance on S/4HANA and HANA by helping you push the right work into database execution plans instead of filtering and aggregating in ABAP loops.

Core Features & Use Cases

  • Code Pushdown Guidance for HANA: Prioritizes moving aggregations, filtering, joins, sorting, CASE logic, and window functions into SQL/CDS so HANA does the heavy lifting.
  • Database Access Pattern Rules: Recommends safe SELECT practices (no SELECT *), proper WHERE usage, JOIN-centric querying, and when to use FOR ALL ENTRIES, UP TO n ROWS, and subqueries.
  • HANA-Oriented ABAP Refinements: Covers internal table strategy (HASHED/SORTED/standard), loop and bulk operation patterns, and string handling choices that avoid unnecessary runtime overhead.

Quick Start

Use the abap-performance-hana skill to optimize your ABAP code for a HANA-based SAP S/4HANA system by first checking the system type with the SAP system info tool and then asking it to rewrite the SELECT/JOIN/aggregation parts for pushdown to the database.

Frequently Asked Questions about abap-performance-hana

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize ABAP query performance on HANA?

To optimize ABAP query performance on HANA, you push aggregations, filtering, joins, and sorting into SQL or CDS views so the database handles the heavy lifting instead of ABAP loops. This ensures set-based execution plans and reduces runtime overhead.

What is SQL pushdown in S/4HANA and when should I use it?

SQL pushdown in S/4HANA is the practice of moving data-intensive logic like CASE statements and window functions into the database layer. You should use it to replace ABAP loop filtering and aggregation, allowing HANA to process data using set-based execution.

Should I use CDS views or AMDP for ABAP code pushdown?

Choosing between CDS views and AMDP for ABAP code pushdown depends on your logic complexity. CDS views are ideal for declarative data models and joins, while AMDP handles procedural database functions when standard SQL constructs are insufficient for HANA execution.

Does ABAP performance tuning for HANA require avoiding SELECT *?

Yes, ABAP performance tuning for HANA requires avoiding SELECT * to minimize data transfer. You should use explicit column lists, proper WHERE clauses, and JOIN-centric querying to ensure the database only processes necessary fields.

How do I refactor internal table processing for S/4HANA systems?

To refactor internal table processing for S/4HANA, you select the appropriate table type like HASHED or SORTED tables and apply bulk operation patterns. This avoids unnecessary runtime overhead from row-by-row string handling and loop processing.

When should I not use FOR ALL ENTRIES in ABAP on HANA?

You should not use FOR ALL ENTRIES in ABAP on HANA when the internal table is empty or contains duplicate keys, as this bypasses database join optimizations. Subqueries or explicit JOINs are preferred for set-based HANA execution.