Code Pushdown with SAP HANA and ABAP The Journey That Changes Everything

Introduction:

ABAP reports that fetch millions of rows and process them in nested loops often slow down sharply after a migration from SAP ECC to SAP S/4HANA. This happens because the application server continues to perform tasks that SAP HANA can handle more efficiently in memory.

In particular, technical architects and ABAP developers encounter this issue in custom reports, Fiori apps, and OData services that rely on designs built for classic databases.

To address this challenge, code pushdown moves filtering, joining, and aggregation directly into the database layer. Developers can achieve this through ABAP CDS views, ABAP Managed Database Procedures (AMDP), and modern Open SQL.

Furthermore, this approach reduces unnecessary data transfers and allows SAP HANA to process data more efficiently.

In this guide, we explain how code pushdown works, which technique best fits each scenario, and how developers can implement it in SAP S/4HANA and SAP BTP.

What Is Code Pushdown in SAP HANA and ABAP?

Code pushdown is a development principle that shifts data-intensive processing from the ABAP application server to the SAP HANA database layer.

Traditionally, ABAP programs read large datasets into internal tables and then filter, join, and aggregate that data through loops on the application server. Although this approach worked well with row-based databases, it often caused excessive data transfers between the database and application layers. As a result, applications experienced longer response times and higher memory consumption.

However, SAP HANA changes this approach through its in-memory, column-oriented engine, which performs calculations directly where the data resides. By pushing processing logic down to the database, developers allow SAP HANA to return only the final result set. Consequently, the application server processes far less data.

Furthermore, this approach reduces network traffic, shortens execution times, and helps applications scale as data volumes grow across SAP S/4HANA landscapes.

Code Pushdown in SAP HANA infographic listing the top 4 techniques: CDS Views, AMDP, Open SQL Enhancements, and Native SQL/ADBC

Benefits of Code Pushdown

The most direct benefit of code pushdown is lower response time because the database processes data where it is stored and returns only the required results. In addition, this approach significantly reduces the workload on the ABAP application server. Since fewer records travel across the network, fewer internal tables consume application memory. As a result, the same hardware can support more concurrent users and handle larger reporting workloads.

Beyond performance improvements, code pushdown also delivers important business benefits. It makes near real-time reporting more practical, particularly for finance closing, sales monitoring, and supply chain planning. Furthermore, it supports modular design by allowing developers to reuse logic defined in CDS views across reports, Fiori apps, and OData services without duplicating code.

Nevertheless, code pushdown shifts more processing to SAP HANA. For this reason, teams should monitor database memory and CPU usage carefully to ensure that complex views do not consume unnecessary resources.

Common Code Pushdown Techniques in SAP HANA and ABAP

TechniqueDescription
CDS ViewsCore Data Services allow semantic modeling and advanced logic at the DB level
AMDPABAP Managed Database Procedures enable SQL Script logic inside ABAP classes
Open SQL EnhancementsIntroduces modern SQL syntax for optimized data operations
Native SQL & ADBCDirect SQL execution and advanced control for high-performance operations

Consequently, these techniques are central to implementing pushdown pseudocode in modern SAP systems and are essential skills for ABAP SAP technical developers.

Development Approaches: Top-Down vs Bottom-Up

Moreover, as SAP evolved, so did the methods of ABAP development for HANA. Two primary models exist:

FeatureBottom-Up ApproachTop-Down Approach
InitiationStarts in HANA (views, procedures)Starts in ABAP (CDS views, RAP)
ComplexityRequires synchronization between layersSimplified management and integration
PerformanceHighHigh
MaintainabilityComplex and error-proneEasier with lifecycle tools like ADT
SuitabilityBest for small-scale, intensive tasksIdeal for enterprise-grade custom development

Post NetWeaver 7.4, SAP encourages the Top-Down approach, aligning with modern development environments and leveraging CDS and RAP for flexibility.

Real-World Applications of Code Pushdown

Real-Time Reporting and Analytics

For instance, with pushdown logic, sales dashboards, KPIs, and financial summaries can be calculated immediately out of CDS views.

Code Pushdown in SAP HANA infographic showing what it is, why it matters, and how to implement it with ABAP using CDS and AMDP.

Supply Chain Processing

Complex logic to process huge transaction records can be pushed down to HANA and then be executed in AMDP, hence performance is optimal.

SAP Fiori Applications

Fiori app-consumed OData services are snappier and leaner using CDS views with pushdown logic.

Data Aggregation and Forecasting

Open SQL improvements reduce reliance on nested ABAP loops and enable more efficient business logic.

Understanding Pushdown Pseudocode

Pushdown pseudocode represents a shift in the logic-writing approach. Instead of looping and filtering data in ABAP:

  • Specifically, the logic is modeled using SQL (CDS, AMDP)
  • Operations like filtering, joining, and aggregating happen at the database level
  • ABAP is responsible for triggering and integrating the result

This not only reduces processing time but also makes the system more robust and maintainable. It represents a new standard in ABAP development.

Tools and T-Codes for Code Pushdown

Tool/T-CodePurpose
SCTS_HTASynchronize HANA packages with ABAP for transport management
SE11/SE80Define data dictionary objects and consume CDS views
Eclipse ADTDevelop and manage CDS, AMDP, and RAP projects using a modern IDE
ST05/ST22SQL trace and dump analysis tools for performance tuning

To achieve this, for development using SAP HANA and ABAP, it’s essential to work within these tools to ensure consistency and performance optimization.

How ABAP CDS Enables Code Pushdown

In ABAP CDS (Core Data Services), logic is modeled at the database layer using SQL-based syntax. This allows:

  • Business logic and metadata to be defined in one place
  • OData services to be generated automatically
  • Complex joins and calculations to be executed in-database
  • Enhanced performance through in-memory computation

The result: ABAP applications that consume CDS views need fewer lines of procedural code and deliver faster performance.

Conclsuion

Code pushdown allows SAP HANA and ABAP to work as one performance-oriented platform because data-intensive logic runs in the database, while the application layer focuses on orchestration and business processes. To achieve this, developers can use ABAP CDS views, AMDP, and modern Open SQL to cover most pushdown scenarios. Furthermore, the top-down development model keeps these objects within the standard ABAP lifecycle.

Looking ahead, as more organizations complete their migration to SAP S/4HANA and extend their landscapes with SAP BTP, code pushdown will remain an essential skill for ABAP developers and architects. Therefore, teams should review their custom code, replace loop-based data processing, and measure performance through ATC and SQL traces. By taking these steps, they can reduce execution times, improve Fiori responsiveness, and prepare custom developments for cloud-ready, clean-core architectures.

Frequently Asked Questions (FAQs)

What is code pushdown in SAP ABAP on HANA?

Code pushdown involves moving data-intensive operations, such as filtering, joining, and aggregation, from the ABAP application server to the SAP HANA database. In this approach, the database processes data directly in memory and returns only the required results. Consequently, this reduces data transfers, shortens execution times, and lowers the workload on the application server.

What is SAP ABAP development for HANA?

It involves writing ABAP programs that take advantage of SAP HANA’s in-memory capabilities. To achieve this, developers use ABAP CDS views, AMDP, and modern Open SQL to execute data-intensive operations directly in the database. Meanwhile, ABAP handles business logic, integration, and user interaction.

Which T-code synchronizes SAP HANA objects with ABAP?

SCTS_HTA is the transaction used for the SAP HANA transport container in bottom-up scenarios. It connects HANA repository objects to the ABAP transport system, so teams can move HANA content together with ABAP changes across the landscape.

How does code pushdown work in ABAP CDS?

In ABAP CDS, developers define joins, filters, calculations, and aggregations in a view using SQL-based syntax. When an application reads the view, SAP HANA executes the logic in the database and returns only the final result, which keeps the ABAP code shorter and faster.

When should I use AMDP instead of CDS views?

Use AMDP when your logic requires procedural SQLScript, particularly for multi-step calculations or complex data transformations that CDS views cannot handle. However, CDS views offer a better choice for most reporting and data modeling requirements because developers can maintain them more easily and use them with less dependency on SAP HANA.

Is code pushdown required for SAP S/4HANA?

Although code pushdown is not mandatory, SAP recommends adopting this approach when developing custom code in SAP S/4HANA. However, programs designed for classic databases can still run in the new environment. Nevertheless, these programs often fail to fully utilize SAP HANA’s performance capabilities, especially when processing large datasets through loop-based operations. As a result, developers may miss significant performance improvements that database-level processing can deliver.

How can I find code that needs pushdown optimization?

Run ABAP Test Cockpit checks and the SQL Monitor (SQLM) to identify SELECT statements inside loops and expensive database calls. Then use the ST05 SQL trace to measure runtime before and after each change, so the improvement is based on real data.

Does code pushdown work in SAP BTP ABAP Environment?

Yes, SAP BTP ABAP Environment supports CDS views, RAP, and Open SQL for pushdown. It uses the top-down approach exclusively, so developers define all data models and logic in ABAP, and the system manages the underlying SAP HANA objects.

Share:

Facebook
Pinterest
LinkedIn
WhatsApp
Picture of Laeeq Siddique - SAP Technical Consultant

Laeeq Siddique - SAP Technical Consultant

I'm a technical and development consultant focused on S/4HANA and BTP, SAP Consultant specializing in developing innovative solutions for Manufacturing, Energy more.

Table of Contents