ABAP on HANA is one of the most in-demand SAP skills. Interviewers expect developers to know code pushdown, CDS views, AMDP, and the new ABAP SQL syntax — not just classical ABAP. Here are 30 commonly asked SAP ABAP on HANA interview questions with interview-ready answers.
Q1. What is ABAP on HANA and how is it different from classical ABAP?
Answer: ABAP on HANA refers to developing ABAP applications that leverage the in-memory SAP HANA database. In classical ABAP, most data processing happened on the application server. In ABAP on HANA, data-intensive operations are pushed down to the database layer (code pushdown) using CDS views, AMDP, and enhanced Open SQL, so large data volumes are processed in-memory at the database level instead of being transferred to the application server row by row.
Q2. What is code pushdown in ABAP on HANA?
Answer: Code pushdown is the practice of moving data-intensive logic from the ABAP application server down to the HANA database. Instead of fetching thousands of rows into ABAP internal tables and looping over them, you express the logic in CDS views or database procedures so the database engine — which is optimized for set-based, in-memory operations — does the heavy lifting. This reduces data transfer, improves performance dramatically, and is the central design principle of ABAP on HANA development.
Q3. What are Core Data Services (CDS) views?
Answer: Core Data Services (CDS) views are data models defined in the ABAP Data Dictionary using DDL source code. A CDS view defines a SELECT over database tables with joins, associations, aggregations, and calculations, enriched with annotations that control UI behavior, analytics, and access control.
Q4. What are the different types of CDS views?
Answer: CDS views are categorized by purpose. Basic (interface) views model a single business object, composite views combine multiple basic views, and consumption views serve a specific consumer such as a Fiori UI or analytical query. Analytical views carry measure and dimension annotations; CDS table functions, implemented in AMDP, handle logic plain CDS DDL cannot express.
Q5. What are annotations in CDS views?
Answer: Annotations are metadata added to CDS view definitions using the @ syntax (for example, @AccessControl.authorizationCheck). They control behavior beyond the SELECT itself: access control, search capabilities, UI rendering in Fiori elements, analytical semantics (defining dimensions and measures), and OData exposure. Annotations are a key reason CDS views are more powerful than classical database views.
Q6. What is AMDP and when would you use it?
Answer: AMDP stands for ABAP Managed Database Procedure. It lets you write database procedures (for example, in SQLScript for SAP HANA) inside an ABAP class method marked with BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT. Use it when logic is too complex for a CDS view — procedural loops, complex calculations, or logic that must run close to the data.
Q7. How do you call an AMDP method from ABAP?
Answer: You call an AMDP method like a regular static or instance method of the ABAP class that contains it. The ABAP runtime detects the database-procedure implementation and executes it on the database. The method signature uses importing, exporting, and changing parameters mapped to database types, and the caller in ABAP simply passes internal tables or scalar values and receives the result — the database execution is transparent to the caller.
Q8. What are inline declarations in new ABAP syntax? Give an example.
Answer: Inline declarations let you declare a variable where it is first used, with DATA(…) or FIELD-SYMBOL(…) syntax, instead of a separate DATA statement. Example: SELECT … INTO TABLE @DATA(lt_result). The compiler derives the type from context.
Q9. What are table expressions in ABAP?
Answer: Table expressions provide a concise way to read a single row from an internal table without a READ TABLE statement, using square-bracket syntax. For example, ls_row = lt_orders[ 1 ] reads the first row, and lv_amount = lt_orders[ kunnr = ‘1000’ ]-netwr reads a field from the row whose key field matches. Table expressions also support secondary keys and handle the “row not found” case with exceptions or default values, making code shorter and more readable.
Q10. What are constructor expressions in ABAP? Name a few.
Answer: Constructor expressions create values or objects inline without helper variables: VALUE for tables and structures, REF for data references, CORRESPONDING for mapping between structures, CONV for conversions, and NEW for instantiation. They are heavily used in modern ABAP on HANA code.
Q11. How has Open SQL changed for HANA? What is ABAP SQL?
Answer: Open SQL was enhanced and renamed ABAP SQL to support modern database capabilities. Key enhancements include strict syntax (host variables prefixed with @, commas in the select list), joins with explicit ON conditions, UNION, string and date functions, and direct SELECTs from CDS views. Writing strict, modern ABAP SQL is essential for HANA-optimized code.
Q12. What performance techniques matter most for ABAP on HANA?
Answer: The most important techniques are: push data-intensive logic to the database with CDS views or AMDP instead of looping in ABAP; select only needed columns instead of SELECT *; avoid nested SELECTs and SELECT SINGLE inside loops (use FOR ALL ENTRIES or joins); use secondary keys and sorted/hashed internal tables appropriately; and minimize data transfer between database and application server. Measure with SAT and ST05 before and after tuning.
Q13. What is the difference between classical and HANA-optimized SELECT?
Answer: A classical SELECT often pulls wide rows into the application server for ABAP-side filtering and aggregation. A HANA-optimized SELECT pushes filtering, joins, and aggregation into the database using CDS views or precise ABAP SQL, transferring only the needed columns and final results. The rule: filter early, aggregate in the database.
Q14. What are SAT and ST05 used for in performance analysis?
Answer: SAT (ABAP Trace) records the runtime behavior of ABAP programs, showing which statements and database accesses consume the most time. ST05 (Performance Trace) records database accesses, including the exact SQL sent to the database and its execution time. Together they help identify expensive database round-trips, missing indexes, and ABAP-side loops that should be pushed down — the standard toolkit for ABAP on HANA performance tuning.
Q15. What is the ABAP Test Cockpit (ATC) and why does it matter for HANA?
Answer: The ABAP Test Cockpit is the central static code-check tool in ABAP. For HANA projects it matters because ATC provides check variants that find code patterns problematic on HANA or in S/4HANA — such as database operations that cannot be pushed down, use of obsolete statements, or dependencies on tables that were simplified away. Running ATC checks is a standard step before migrating custom code to HANA or S/4HANA.
Q16. What kinds of findings does an ATC HANA check report?
Answer: Typical findings include SELECTs reading more data than needed, native SQL bypassing the ABAP SQL layer, pool/cluster access patterns that no longer exist in S/4HANA, direct access to tables replaced by compatibility views, and constructs that block the database optimizer. Each finding carries a priority and remediation advice.
Q17. What is a CDS table function and how is it implemented?
Answer: A CDS table function is a CDS entity whose logic is implemented procedurally rather than as a declarative SELECT. You define the table function’s parameters and result structure in CDS DDL, then implement it in an AMDP class method. It is used when the required logic — complex calculations, procedural branching, or multi-step transformations — cannot be expressed in plain CDS view DDL.
Q18. How do associations differ from joins in CDS views?
Answer: A join in a CDS view eagerly combines tables in the SELECT, always executing the join. An association defines a reusable relationship between entities that is only resolved when a field from the associated entity is actually requested (on-demand join). Associations make views more flexible and reusable: consumers can navigate to related data without paying the cost of joins they do not use.
Q19. What is the virtual data model (VDM) in S/4HANA?
Answer: The virtual data model is SAP’s layered CDS view architecture for S/4HANA. It organizes CDS views into layers — basic/interface views close to the database tables, composite views combining them, and consumption views tailored for transactional Fiori apps or analytical queries. The VDM lets applications read simplified S/4HANA tables (like MATDOC and ACDOCA) through stable, semantically rich views instead of raw tables.
Q20. What should developers know about MATDOC and ACDOCA?
Answer: MATDOC is the S/4HANA material document table that replaces the old MKPF (header) and MSEG (item) tables with a single document table. ACDOCA is the Universal Journal that stores financial line items, replacing the old BKPF/BSEG split along with many aggregate and index tables. Custom code that reads the old tables must be adapted, often via the compatibility views SAP provides. See our guide on S/4HANA simplified tables.
Q21. What is the custom code analyzer for S/4HANA?
Answer: The custom code analyzer (part of the ATC framework, often run via the Simplification Item Check) scans customer ABAP code for usage of objects affected by the S/4HANA simplification — removed tables, changed data types, obsolete function modules. It reports which custom developments need adaptation before or during an S/4HANA conversion, making it a mandatory tool in conversion projects.
Q22. What are simplification items in an S/4HANA conversion?
Answer: Simplification items are SAP’s documented list of functional and technical changes between ECC and S/4HANA — removed transactions, replaced tables, changed field lengths, new data models. Each item describes what changed, the business impact, and the required follow-up. ABAP developers focus on the technical simplification items affecting custom code, such as table replacements (for example, the move to MATDOC and ACDOCA).
Q23. Why are pooled and cluster tables a problem in S/4HANA?
Answer: In ECC, some data was stored in pooled tables (like BSEG-related pools) or cluster tables, which required special handling. S/4HANA on HANA uses transparent tables throughout, so pooled and cluster tables were converted. Custom code that relied on pool/cluster-specific behavior or on the old storage structure must be adapted, and ATC checks flag such patterns.
Q24. What is the difference between a CDS view and a classical DDIC database view (SE11)?
Answer: A classical SE11 database view is a simple join/projection over tables. A CDS view adds associations, parameters, aggregations, built-in functions, annotations for UI/analytics/access control, and direct consumption in ABAP SQL and OData. New data models should be built as CDS views; SE11 views remain for compatibility.
Q25. How do you expose a CDS view as an OData service?
Answer: A CDS view annotated for OData exposure can be published as an OData service, which Fiori UIs consume. In practice you add the @OData.publish annotation (or define a service definition in newer approaches), activate the view, and register the resulting service. This is the standard path for building Fiori apps over CDS-based data models without hand-writing service implementations.
Q26. What is DCL in the CDS world?
Answer: DCL stands for Data Control Language. It defines row-level access control for CDS views — which records a user is allowed to see based on authorization checks. A CDS view declares its access control with the @AccessControl.authorizationCheck annotation, and DCL sources implement the actual access conditions. DCL is central to secure CDS-based applications.
Q27. What are some new ABAP SQL features developers should know?
Answer: Beyond strict syntax, ABAP SQL supports explicit JOIN syntax with ON conditions, UNION of select statements, host variables with the @ escape, built-in SQL functions for strings/dates/calculations, common table expressions (WITH), and direct SELECT from CDS views including parameterized views. Knowing these lets you write database-efficient code without dropping to native SQL.
Q28. When is native SQL still justified on HANA?
Answer: Native SQL is justified only when ABAP SQL or CDS cannot express what the database must do — for example, calling HANA-specific database procedures. Isolate it in AMDP or dedicated classes, since native SQL bypasses ABAP syntax checks, buffering logic, and client handling, harming testability.
Q29. How do you debug an AMDP procedure?
Answer: Set breakpoints in the ABAP class method wrapping the AMDP implementation and debug the call from the ABAP side, inspecting parameters in and results out. For the SQLScript logic itself, HANA database-side tools can trace procedure execution. Most issues surface at the ABAP boundary first.
Q30. What is your approach to adapting custom ABAP code for S/4HANA?
Answer: A proven approach is: 1) run the ATC simplification-item and HANA-readiness checks over the custom code; 2) prioritize findings by business criticality; 3) replace direct reads of simplified tables with the new tables or compatibility views; 4) refactor row-by-row logic into CDS views or AMDP where performance matters; 5) re-run ATC and functional tests. This systematic flow is what interviewers want to hear.
Frequently Asked Questions
Is ABAP on HANA different from S/4HANA ABAP?
ABAP on HANA is the development paradigm for the HANA database (code pushdown, CDS, AMDP), while S/4HANA ABAP additionally involves adapting to the simplified data model and Fiori programming model. S/4HANA development assumes ABAP on HANA skills as a foundation.
Do I need to learn SQLScript for AMDP interviews?
You should understand what SQLScript is and when AMDP uses it, plus the structure of an AMDP method (BY DATABASE PROCEDURE FOR HDB LANGUAGE SQLSCRIPT). Deep SQLScript coding is usually tested only for HANA-modeling roles.
What is the single most important ABAP on HANA concept for interviews?
Code pushdown. Almost every performance or design question traces back to it: move data-intensive logic to the database with CDS views and AMDP instead of processing rows in ABAP.
Are classical ABAP skills still relevant?
Yes. Dictionary, modularization, debugging, and transports remain essential. ABAP on HANA adds new tools on top; interviewers expect both.
How should I prepare practically for an ABAP on HANA interview?
Build a small CDS view with associations, write one AMDP method, convert a classical report to use inline declarations and table expressions, and run ATC checks on sample code. Hands-on examples beat memorized definitions.
Which related topics should I study next?
After ABAP on HANA, study the essential ABAP transaction codes and the S/4HANA simplified tables that changed the data model you code against.