SAP ABAP on HANA Interview Questions (With Answers)

ABAP on HANA interviews test whether you can move data-heavy logic into the SAP HANA database and adapt code for S/4HANA. Expect questions on code pushdown, modern ABAP SQL, CDS view entities and associations, CDS access control, AMDP and table functions, performance tools such as SQLM and SWLT, custom code migration with ATC, and ABAP Cloud.
Below are 34 questions with short answers, written for S/4HANA. Classic topics such as internal tables, ALV, BAPIs and enhancements are in our SAP ABAP interview questions, so this list starts where that one stops.
ABAP on HANA basics
What does "ABAP on HANA" mean?
It means writing ABAP that takes advantage of the SAP HANA database instead of treating it like any other database. The language is the same, but the approach changes: filter, aggregate and join in the database, read only the data you need, and use CDS views and AMDP where they help. S/4HANA runs only on SAP HANA, so every S/4HANA developer works this way.
What is code pushdown, or code-to-data?
Moving data-intensive calculations from the ABAP application server down to the database. The classic pattern read large volumes into internal tables and processed them in loops; the HANA pattern lets the database do the work and sends only the result back. SAP's ABAP documentation recommends AMDP only when the same task cannot be done with ABAP SQL or CDS.
Why is SAP HANA fast for this kind of work?
HANA keeps data in memory and stores application tables mostly in column store, where each column is held and compressed separately. Aggregating or filtering a few columns across millions of rows then reads far less data than a row-by-row scan. Row store tables still exist for cases with many single-record reads and updates.
What must you check in custom code when moving from another database to HANA?
Code that silently relied on the old database's behaviour. A common case is a SELECT without ORDER BY whose result is then used with READ TABLE ... BINARY SEARCH or DELETE ADJACENT DUPLICATES: HANA does not guarantee any order without ORDER BY, so add ORDER BY or sort the table. Native SQL and database hints written for another database also need review.
Modern ABAP SQL
What changed in ABAP SQL syntax for HANA-era code?
From ABAP 7.40 SP05, the stricter syntax mode allows comma-separated field lists, host variables escaped with @, the INTO clause at the end of the statement and inline declarations such as INTO TABLE @DATA(lt_orders). Open SQL was renamed ABAP SQL. The new syntax is what unlocks SQL expressions and newer features.
Which SQL expressions can you push down in ABAP SQL?
Arithmetic and string expressions, CASE, CAST, COALESCE, built-in functions such as CONCAT and ROUND, and aggregates such as SUM and COUNT with GROUP BY and HAVING. Instead of looping to calculate a net amount or a status text, you calculate it in the SELECT list.
Should you use a JOIN or FOR ALL ENTRIES on HANA?
Prefer a JOIN, a subquery or a CDS view when the data is in the database. FOR ALL ENTRIES is still valid when the driver data comes from outside the database, such as an uploaded file, but remember that it removes duplicate rows and needs a non-empty driver table.
How do you show a very large data set in an ALV on HANA?
Use ALV with integrated data access, class CL_SALV_GUI_TABLE_IDA. Instead of loading all rows into an internal table, it sends paging, sorting, totals and grouping to the database and transfers only the visible rows. It can read a database table or a CDS view directly.
CDS views
What is a CDS view, and where do you create it?
A Core Data Services view is a data model defined in DDL source code that runs in the database. It can join and associate tables, calculate fields, take parameters and carry annotations for analytics, OData and Fiori. CDS views are created in ABAP Development Tools (ADT) in Eclipse, not in SE11, and are read in ABAP SQL like a table.
What is the difference between a CDS DDIC-based view and a CDS view entity?
A DDIC-based view (DEFINE VIEW) creates two objects: the CDS entity and an extra DDIC view, named with the @AbapCatalog.sqlViewName annotation. A CDS view entity (DEFINE VIEW ENTITY) has no extra DDIC view, activates faster and has stricter checks. SAP's ABAP keyword documentation marks DDIC-based views as obsolete and calls view entities their successor, so new views should be view entities.
What is an association, and how is it different from a join?
An association defines a relationship to another entity, such as from a sales order item to its material, with a cardinality and an ON condition. It becomes a join only when a field from the target is used in a path expression, so unused associations cost nothing. Associations can also be exposed for other views, OData services and ABAP SQL to follow.
What are cardinality and path expressions?
Cardinality states how many target rows match each source row, for example [0..1] or [0..*], or in newer syntax OF MANY TO ONE. A path expression follows associations with dots, such as _Material._Text.MaterialName, to read a field from a related entity without writing the join yourself.
What is a composition in CDS?
A special association between a parent and child that are existentially dependent, such as a sales order header and its items. It is declared with a to-child composition in the parent and a to-parent association in the child. RAP uses compositions to define the structure of a business object.
How do you secure data in a CDS view?
With CDS access control: a CDS role written in DCL with DEFINE ROLE, which adds conditions based on PFCG authorisation objects, such as allowing only company codes the user is authorised for. The view's @AccessControl.authorizationCheck annotation controls whether the check applies. Access control is evaluated automatically whenever the view is read with ABAP SQL.
Which annotation families should you know?
@AbapCatalog for technical settings, @AccessControl for authorisation checks, @EndUserText for labels, @Semantics for meaning such as amounts and currency keys, @ObjectModel for model behaviour, @Analytics for analytical use and @UI for Fiori elements layouts. Our SAP Fiori interview questions explain how @UI annotations drive Fiori apps.
What is the virtual data model (VDM)?
SAP's layered set of CDS views delivered with S/4HANA. Basic and composite interface views (prefix I_) sit on the tables, consumption views (prefix C_) serve specific apps, and restricted reuse views (prefix R_) are meant for reuse inside one application. Developers build custom views on released I_ views rather than directly on tables.
What are CDS projection views and custom entities?
A projection view (DEFINE VIEW ENTITY ... AS PROJECTION ON) exposes a subset of an underlying view for one service, which is how RAP separates the data model from the app. A custom entity defines only the structure; its data comes from an ABAP class that implements the query interface IF_RAP_QUERY_PROVIDER, which is useful when data must come from an API call instead of a table.
AMDP and CDS table functions
What is AMDP?
ABAP Managed Database Procedures: database procedures written in SQLScript inside methods of a normal ABAP class. The class implements the marker interface IF_AMDP_MARKER_HDB, and the method is declared BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT with a USING list of the tables it reads. ABAP manages it like any other code, including transports.
When should you use AMDP instead of a CDS view?
Only when ABAP SQL and CDS cannot do the job: when you need database-specific functions that ABAP SQL does not offer, or for large multi-step calculations that would otherwise move big data volumes between database and application server. AMDP is database-specific SQLScript, so it is harder to read, test and maintain. Use it as the last step of code pushdown, not the first.
What is a CDS table function?
A CDS entity whose result is computed by an AMDP function. You define it with DEFINE TABLE FUNCTION, listing the parameters and returned fields, and name the implementing method with IMPLEMENTED BY METHOD. The method is declared BY DATABASE FUNCTION. Other CDS views and ABAP SQL can then read it like a view.
How do you handle the client in AMDP?
AMDP has no implicit client handling, unlike ABAP SQL. SAP recommends passing the client (SY-MANDT) as an input parameter and using it in the WHERE condition; forgetting this returns data from every client.
Performance tools on HANA
Which tools do you use to analyse performance on HANA?
ST05 traces the SQL statements of one user or program, SAT measures where runtime is spent, and the SQL Monitor (SQLM) records SQL statements across a production system over days or weeks with minimal overhead. The SQL Performance Tuning Worklist (SWLT) combines SQLM runtime data with static ATC check results to show which findings matter most.
What are the main rules for fast SQL on HANA?
Keep result sets small with WHERE clauses, transfer only the columns you need, avoid repeated database calls such as SELECT in a loop, push calculations into the database, and avoid SELECT * on wide tables, because column storage makes reading unused columns more expensive.
Custom code migration to S/4HANA
How do you check custom code for an S/4HANA conversion?
With the ABAP Test Cockpit (ATC), using S/4HANA readiness check variants such as S4HANA_READINESS_2023 for a target release, often run as remote ATC from a central check system. The checks compare custom code against the Simplification Database, which lists what changed in S/4HANA. SAP recommends the Custom Code Migration Fiori app for analysis and scoping.
Why do you collect usage data before migrating code?
Because custom code that is never used can be retired instead of fixed, which is cheaper. The ABAP Call Monitor (SCMON) records which objects are called in production, and SUSG aggregates that data over a longer period. The Custom Code Migration app uses it to show which findings belong to code that is actually used.
Which S/4HANA data model changes affect custom code most often?
The material number field can be up to 40 characters instead of 18. Sales document status tables VBUK and VBUP are gone, with their fields moved to VBAK, VBAP, LIKP, LIPS and VBRK. Pricing conditions are stored in PRCD_ELEMENTS instead of KONV. Finance line items are in the universal journal, table ACDOCA. Code that reads or declares these objects directly must be checked.
ABAP Cloud, RAP and clean core
What is ABAP Cloud?
SAP's development model for cloud-ready, upgrade-stable code. It uses the restricted language version ABAP for Cloud Development, allows access only to SAP objects released for it, and is developed only in ADT, with no SAP GUI. It is mandatory in SAP BTP ABAP environment and S/4HANA Cloud Public Edition, and available in S/4HANA private cloud and on premise.
What are released APIs and release contracts?
A released API is an SAP object, such as a CDS view, class or BAdI, that SAP promises to keep stable. Release contracts define the promise: C0 for extension points, C1 for use inside the system (the one ABAP Cloud code uses), C2 for remote APIs, C3 for configuration content and C4 for use in AMDP. You can see an object's release state in ADT.
How do clean core and ABAP on HANA fit together?
Clean core means extending SAP without modifying it. In practice, custom code reads SAP data through released CDS views instead of tables and uses released classes and BAdIs. According to SAP's 2025 clean core guidance, SAP rates extensions in clean core levels from A (only released APIs) to D (not upgrade-safe, such as modifications).
How much RAP do you need for an ABAP on HANA role?
The basics: a RAP business object is built from CDS view entities, a behaviour definition and an implementation class, then exposed through a service definition and a service binding. In a managed scenario the framework handles standard create, update and delete for you. Our article on what SAP BTP is explains the BTP ABAP environment.
Scenario questions
Scenario: a report reads 5 million rows into an internal table and sums them in a loop. How do you rewrite it?
Push the aggregation into the database with SUM and GROUP BY in ABAP SQL, or build a CDS view with the aggregation and select from it. Only the totals travel to the application server. Measure before and after with SAT or ST05 to prove the gain.
Scenario: after a HANA migration, a program gives wrong results but no dump. What do you suspect?
Code that assumed a sort order. Check SELECTs without ORDER BY followed by BINARY SEARCH, DELETE ADJACENT DUPLICATES or reading the first row as the "latest" one. The ATC check for SELECT without ORDER BY finds many of these.
Scenario: users should see only data for their sales organisation in a new CDS-based report. How do you implement it?
Create a CDS role (DCL) for the view that restricts the sales organisation field using the matching PFCG authorisation object, and set @AccessControl.authorizationCheck to #CHECK. Every ABAP SQL read and every OData service on the view then applies the filter automatically.
Scenario: you need data from a standard SAP table in ABAP Cloud, but it is not released. What do you do?
Look for a released CDS view that provides the same data, usually an I_ view, in the Released Objects tree in ADT. If none exists, on premise or in private cloud you can build a wrapper class in classic ABAP and release it (C1) for cloud development, so the cloud code stays clean; document the wrapper as a deliberate exception.
How to prepare beyond these questions
ABAP on HANA interviews reward hands-on examples. Before the interview, rewrite one classic report using a CDS view entity with an association and an aggregation, add a DCL role to it, show it with ALV IDA, and write one simple AMDP. Then run ST05 on the old and new versions and note the difference. Explaining that comparison is a strong answer to "tell me about your project"; our guide on how to explain your SAP project in an interview shows how to structure it.
If you are new to how HANA relates to S/4HANA, read the difference between SAP HANA and S/4HANA. Our ABAP on S/4HANA course runs 10 to 12 weeks on S/4HANA systems with SAP system access and includes certification preparation and interview practice, and SAP RAP on BTP takes the same skills into RAP and ABAP Cloud.
Frequently asked questions
Is ABAP on HANA good for freshers?
Yes, if you already know classic ABAP basics. S/4HANA projects need developers who can write CDS views, use modern ABAP SQL and adapt old code, so these skills set a fresher apart from candidates who know only reports and BAPIs.
Should I learn classic ABAP before ABAP on HANA?
Yes. CDS, AMDP and RAP all rely on ABAP basics: data types, internal tables, ABAP SQL, classes and debugging. Converted S/4HANA systems still contain classic code you will be asked to support. Learn the basics first, then move to HANA topics.
Is AMDP still relevant if CDS views can do most things?
Yes, but for fewer cases. CDS view entities and ABAP SQL now cover most needs, and SAP recommends them first. AMDP remains the tool for complex SQLScript logic and for implementing CDS table functions, so interviewers still expect you to explain when you would use it.
Do I need Eclipse for ABAP on HANA?
Yes. CDS views, DCL roles, AMDP, RAP and ABAP Cloud development are done only in ABAP Development Tools (ADT) in Eclipse. Classic objects can still be edited in SAP GUI, but an ABAP on HANA developer works mainly in ADT.
What is the salary of an ABAP on HANA developer in India?
Certified freshers in India typically earn around 4 to 7 LPA, rising to around 9 to 15 LPA with a few years of relevant experience.
What is asked in an ABAP on HANA interview for 2 to 3 years of experience?
More of your own work: a CDS model you designed and why you used associations, a report you optimised and how you measured it, ATC findings you fixed in a conversion, and whether you have built RAP services or worked with released APIs.
Still deciding on a module?
Compare every course, or talk to a counsellor about your background.