ABAP is the programming language of SAP. These SAP ABAP interview questions cover data dictionary, internal tables, reports and modularisation for freshers, then BAPIs, BADIs, enhancements, OData, CDS views, performance tuning and ABAP on HANA for experienced ABAP developers.
30 questions · Updated
Reading answers is not the same as saying them.Practise SAP ABAP questions out loud and get a score, what you missed and a model answer for each one.
Practise free with AISAP ABAP Interview Questions: 30 questions with model answers on this page.
Basic SAP ABAP interview questions
Fundamentals, definitions and simple scenarios. Good for freshers and warm-ups.
1. What is the ABAP Data Dictionary?
The Data Dictionary (transaction SE11) centrally defines database objects and data types used across SAP: transparent tables, views, data elements (business meaning and labels), domains (technical type and allowed values), structures, table types, search helps and lock objects. Because programs refer to these definitions, a change in one place applies everywhere.
2. What is an internal table, and what types are there?
Answer flow · 5 steps
1
An internal table holds rows of data in memory while a program runs.
2
Standard tables are accessed by index or linear search and allow duplicates.
3
Sorted tables are always sorted by a key and use binary search.
4
Hashed tables use a unique key with constant-time access, which suits large lookups.
5
I choose the type based on how the table will be read.
3. What are the types of ABAP reports?
Answer flow · 4 steps
1
Classical reports write a simple list using WRITE statements.
2
Interactive reports allow drilling down from a basic list into detail lists using events like AT LINE-SELECTION.
3
ALV (ABAP List Viewer) reports display data in a grid with built-in sorting, filtering, totals and export, using classes such as CL_SALV_TABLE.
4
Modern apps use Fiori instead.
4. How do you declare data and types in ABAP?
TYPES defines local types, and DATA declares variables based on built-in types (i, p, c, n, string, d, t), Data Dictionary types (such as a data element or table structure) or local types, for example DATA lv_count TYPE i. Structures group fields, and internal tables are declared with TYPE STANDARD TABLE OF, SORTED or HASHED with a key. Modern ABAP prefers inline declarations such as DATA(lv_total) = ....
5. How does Open SQL work?
ABAP SQL (Open SQL) reads and changes database tables in a database-independent way, for example SELECT matnr, maktx FROM makt WHERE spras = @sy-langu INTO TABLE @DATA(lt_texts). It supports joins, aggregates, subqueries and CASE expressions, and is checked against the Data Dictionary. sy-subrc shows whether rows were found, and sy-dbcnt shows how many.
6. What modularisation techniques does ABAP offer?
Answer flow · 5 steps
1
Includes split source code into separate parts.
2
Subroutines (FORM ... ENDFORM) are older and now obsolete for new development.
3
Function modules live in function groups, have defined interfaces and can be called remotely.
4
Methods in classes are the recommended approach for new code.
5
Macros exist but should be avoided because they are hard to debug.
7. What are the events in a classical ABAP report?
LOAD-OF-PROGRAM runs when the program loads, INITIALIZATION sets default values before the selection screen appears, AT SELECTION-SCREEN validates input, START-OF-SELECTION contains the main processing (and is the default event), END-OF-SELECTION runs after processing, and TOP-OF-PAGE and END-OF-PAGE format list headers and footers. Interactive lists add AT LINE-SELECTION.
8. How do you build a selection screen?
PARAMETERS creates single input fields, such as a company code or a checkbox, and SELECT-OPTIONS creates ranges with multiple values, intervals and exclusions, stored in a range table used in WHERE clauses with IN. Blocks, frames and text elements organise the screen, and variants save common input combinations.
9. What are transport requests and packages?
Answer flow · 3 steps
1
Development objects belong to packages, which group related objects and determine the transport layer.
2
Changes are recorded in transport requests (managed in SE09 or SE10): workbench requests for cross-client objects such as programs, and customising requests for client-specific configuration.
3
Requests are released and imported from development to quality to production through the transport management system.
10. How do you debug ABAP programs?
Answer flow · 3 steps
1
Set breakpoints in the editor (session or external breakpoints for web and RFC calls), or enter /h before running a transaction.
2
In the debugger you step through code (F5, F6, F7 and F8), inspect and change variables, view internal tables, set watchpoints that stop when a variable changes, and use layer-aware debugging to skip standard code.
3
ST22 shows short dumps from runtime errors.
11. What message types are there in ABAP?
MESSAGE statements use types: E (error, stops processing and lets the user correct input), W (warning, can continue), I (information popup), S (success, shown in the status bar), A (abort, terminates the transaction) and X (exit, causes a short dump). Messages are defined in message classes (SE91) with numbers and placeholders for values.
Intermediate SAP ABAP interview questions
Applied problems, trade-offs and questions about your own projects.
12. What is the difference between a BAPI and an RFC function module?
Answer flow · 3 steps
1
An RFC-enabled function module can be called remotely from another system.
2
A BAPI is a standardised RFC function module that represents a method of a business object in the Business Object Repository, such as BAPI_SALESORDER_CREATEFROMDAT2, with a stable interface and a RETURN table for messages.
3
BAPIs need BAPI_TRANSACTION_COMMIT to save changes.
13. What are user exits, BADIs and enhancement points?
Answer flow · 5 steps
1
They let you add custom logic to standard SAP without modifying it.
2
User exits and customer exits are older include or function-module based hooks.
3
BADIs (Business Add-Ins) are object-oriented, with an interface you implement, and can have multiple implementations and filters.
4
The enhancement framework adds implicit and explicit enhancement points and sections in standard code.
5
I prefer BADIs where available.
14. What is the difference between SAPscript, Smart Forms and Adobe Forms?
Answer flow · 4 steps
1
All three create printed output such as invoices and purchase orders.
2
SAPscript is the oldest, client-dependent and harder to maintain.
3
Smart Forms is client-independent with a graphical designer and generates a function module.
4
Adobe Forms (Interactive Forms by Adobe) uses Adobe LiveCycle Designer, supports interactive PDFs and is the recommended option, especially in S/4HANA.
15. How do you improve the performance of an ABAP program?
Answer flow · 3 steps
1
I find the problem with SQL Trace (ST05) and runtime analysis (SAT).
2
Then I select only the fields and rows I need using a proper WHERE clause on indexed fields, avoid SELECT inside loops, use JOINs or FOR ALL ENTRIES (checking the driver table is not empty), read internal tables with sorted or hashed keys, and use field symbols to avoid copying data.
3
On HANA I push calculations down to the database.
16. What is the difference between BDC, BAPI and LSMW?
Answer flow · 4 steps
1
BDC (batch data communication) simulates screen input by recording transactions, which is fragile when screens change.
2
BAPIs are stable APIs that create business objects directly with full validation and are preferred.
3
LSMW (Legacy System Migration Workbench) was a tool for migrating data using BDC, BAPIs, IDocs or direct input.
4
In S/4HANA, the Migration Cockpit replaces LSMW for data migration.
17. What are lock objects?
Answer flow · 4 steps
1
Lock objects, defined in SE11, protect data from being changed by two users at once.
2
Activating one generates function modules ENQUEUE_<name> to set a lock and DEQUEUE_<name> to release it, managed by the enqueue server.
3
Programs should lock data before changing it and release it afterwards.
4
SM12 shows current locks.
18. How does object-oriented ABAP work?
Classes are defined with sections for public, protected and private components, with attributes, methods, events and constructors, and can be global (SE24 or Eclipse) or local in a program. ABAP supports inheritance, interfaces, abstract and final classes, polymorphism, and class-based exceptions raised with RAISE EXCEPTION TYPE and handled with TRY ... CATCH ... ENDTRY.
19. How do you build an ALV report with CL_SALV_TABLE?
Fill an internal table with the data, call cl_salv_table=>factory to create the ALV object, then configure columns (headings, hiding, optimised widths), functions (toolbar buttons), sorting, aggregations and events through its methods, and call display(). For editable grids, CL_GUI_ALV_GRID is used instead, as SALV is read-only.
20. What is the table maintenance generator?
Answer flow · 3 steps
1
The table maintenance generator (SE11 > Utilities) creates screens for maintaining entries of a custom table, so users can add, change and delete records through SM30 without writing a program.
2
You choose an authorisation group, a function group and one- or two-step screens.
3
Events can add custom logic, such as filling the user and date when a record is saved.
21. What are update tasks and COMMIT WORK?
Answer flow · 4 steps
1
Database changes inside an SAP logical unit of work can be bundled using update function modules called IN UPDATE TASK, which run when COMMIT WORK is executed.
2
V1 updates are time-critical and run first, V2 updates are less critical, such as statistics.
3
ROLLBACK WORK cancels pending changes.
4
SM13 shows failed updates.
22. What are IDocs?
Answer flow · 3 steps
1
An IDoc (intermediate document) is SAP's standard format for exchanging data asynchronously with other systems through ALE or EDI, such as purchase orders, invoices and master data.
2
It has a control record, data records based on segments, and status records.
3
Configuration includes message types, IDoc types, partner profiles (WE20) and ports, and WE02 or WE05 monitors IDocs.
High level SAP ABAP interview questions
System design, deep internals, leadership and tough follow-ups.
23. What are CDS views?
Core Data Services views are defined in ABAP Development Tools (Eclipse) and create database views with rich semantics: joins, associations, calculated fields, annotations for UI and analytics, and access control with DCL. They push logic to the HANA database, are the basis of the virtual data model in S/4HANA, and can be exposed as OData services for Fiori apps.
24. What is the ABAP RESTful Application Programming Model (RAP)?
Answer flow · 3 steps
1
RAP is the current model for building Fiori apps and APIs in S/4HANA and SAP BTP.
2
You define data with CDS views, describe behaviour (create, update, delete, validations, determinations and actions) in a behaviour definition, implement it in ABAP classes, and expose it through service definitions and bindings as OData V2 or V4.
3
It replaces older approaches like SEGW-based gateway services.
25. What changes for ABAP developers in S/4HANA and ABAP Cloud?
Answer flow · 3 steps
1
Code should push work to the database with CDS views and AMDP, use new Open SQL syntax and inline declarations, and adapt to data model changes such as ACDOCA and Business Partner.
2
Custom code is checked with the ATC for compatibility.
3
ABAP Cloud uses only released APIs and a restricted language version, following the clean core principle so upgrades do not break custom code.
26. What is AMDP?
Answer flow · 3 steps
1
ABAP Managed Database Procedures let developers write database procedures in SQLScript inside ABAP class methods, so complex calculations run directly in SAP HANA.
2
They are managed and transported like ABAP code and can be used as the implementation of CDS table functions.
3
They suit performance-critical logic that ABAP SQL and CDS cannot express.
27. How do you create OData services in SAP?
Answer flow · 3 steps
1
The older approach uses the Gateway Service Builder (SEGW) to model entities, generate classes and implement methods such as GET_ENTITYSET.
2
Another approach exposes CDS views with the @OData.publish annotation.
3
The current approach is RAP: define CDS views, behaviour definitions, service definitions and service bindings to publish OData V2 or V4 services for Fiori and external consumers.
28. Which modern ABAP syntax features do you use?
Inline declarations (DATA(...) and FIELD-SYMBOL(...)), constructor expressions (VALUE, NEW, CONV, CORRESPONDING, COND, SWITCH, REDUCE and FILTER), FOR loops inside expressions, string templates with |...{ variable }...|, table expressions such as lt_tab[ id = 5 ], LINE_EXISTS, and new ABAP SQL syntax with host variables escaped by @ and comma-separated field lists.
29. How do you unit test ABAP code?
Answer flow · 3 steps
1
ABAP Unit tests are local test classes marked FOR TESTING, with setup and teardown methods and assertions from CL_ABAP_UNIT_ASSERT.
2
Dependencies are replaced with test doubles using interfaces, the ABAP test double framework, CDS test environments and the SQL test double framework so database access can be simulated.
3
Tests run from the editor or in ATC checks.
30. What is the clean core approach to extensibility?
Answer flow · 3 steps
1
Clean core means keeping the S/4HANA core standard so upgrades are smooth.
2
Extensions use released APIs and extension points: key user extensibility (custom fields and logic in Fiori apps), developer extensibility on-stack with ABAP Cloud, and side-by-side extensions built on SAP Business Technology Platform that communicate through APIs and events.
3
Modifications to SAP code are avoided.
Ready to test yourself?Pick your topics and level, answer by voice or text, and get instant feedback. Free.