skip to Main Content

Code Pushdown – The Journey SAP HANA and ABAP Brings Along


In 2010, SAP introduced SAP HANA, an in-memory, column-oriented relational database management system. As the cornerstone of SAP’s new products for a long time now and in the future, the use of SAP HANA in-memory database is prevalent in SAP’s ecosystem. As the technical foundation of SAP’s traditional products, ABAP has its mature development model and application architecture. SAP CTO once said, “There is no future with ABAP alone, and there is no future in SAP without ABAP”. 


Looking into the journey of how the SAP HANA database evolved, we always found ABAP goes hand in hand. 

The combination of SAP HANA and ABAP has also become the technical architecture of many SAP products. SAP put forward the concept of “Code Pushdown” during its evolution.


“Code Pushdown” is a paradigm also called “code-to-data” compared to the classic approach; it is data-centric, meaning you should execute intensive, expensive computations in the database layer as much as possible to use the computing power of HANA fully. We don’t recommend putting the calculation logic in the NetWeaver ABAP application layer if the database can complete the task. What “Code Pushdown” brings along is the enablement of fast retrieval of data and a reduced amount of application execution. 

How To:

Simply put, with “Code Pushdown”, the program logic is moved down from the application layer to the database layer. However, it doesn’t mean that the ABAP program logic migrates to the HANA database. Implementing “Code Pushdown” requires utilizing the full strengths of ABAP and HANA, respectively. HANA is the best fit for modeling; on the other hand, ABAP’s responsibility is for programming. Thanks to HANA’s high-speed real-time computing capabilities, you can convert many computing logic units in ABAP to HANA Models. Therefore, ABAP only needs to be responsible for querying and aggregating those models to get results.


Top-down Approach vs Bottom-Up Approach 

Starting with NetWeaver 7.4 onwards, the “Code Pushdown” principle has been fully embraced and realized with the Top-Down approach being brought on the stage. 

Before that, in the traditional Bottom-Up approach, the development was widely based on the HANA view and stored procedure. In terms of performance, this approach is better. However, due to the nature of SQL and its process-oriented characteristics, you cannot use it as an application layer development technology like object-oriented ABAP. Thus, we need to consume the stored procedures and views in the application server as required. The consequence is then, as a developer, you need to work in both worlds and take the responsibility to keep HANA and ABAP artefacts in sync while keeping an eye on lifecycle management. This development experience makes it not suitable for large-scale projects. So, some limited scenarios use the bottom-up approach.


In the Top-Down approach, the modeling is managed in the application layer, namely, the ABAP program. After activation, the corresponding database objects will be created in HANA. The evolved ABAP for HANA also satisfies the requirement that application layer development requires flexible architecture. This is a big step to reflect SAP’s full embracement of “Code Pushdown.” 


“Code Pushdown” Realization 

You can achieve the “Code Pushdown” paradigm mainly in four ways:

  1. Transparent optimizations 
  2. Reuse components 
  3. Advanced SQL in ABAP
    – Open SQL enhancement
    – CDS view
  4. SAP HANA Native Features: AMDP, Native SQL

with increased levels of complexity regarding efforts for “Code Pushdown”, on the other hand, with increased utilization of SAP HANA capabilities. 

Code pushdown is a technique most ABAPers embrace and may get hands-on or already worked with when possible. This blog gives you an overview of what “Code Pushdown” is and how to achieve it, along with the evolution journey of SAP HANA and ABAP. In the next blog, we’ll dive a bit deeper with two concrete examples to help you gain a further understanding of “Code Pushdown”. 

If you are interested in viewing similar articles, visit our blog, here.

View our LinkedIn, here.

Ting Yang is an Expert Developer at Mindset Consulting, USA. Before joining Mindset, she worked on the S4 HANA product team for both On-Premise and Cloud solutions with over 6 years experience in SAP. Ting is also an intrapreneur leading one of SAP’s venture studios for innovation and customer success. She is a tech enthusiast and a UX, and ML advocate. In her leisure, she enjoys playing the piano and reading books about art and architecture.

Back To Top