The fundamentals an interview usually opens with, one or two per topic, each with its full answer.
easyDebugging
1. What is a watchpoint in the ABAP debugger and how is it different from a normal breakpoint?
A watchpoint stops program execution when a specified variable or field-symbol changes to a particular value or meets a logical condition, rather than stopping at a fixed line of code like a normal breakpoint does. Watchpoints are set inside the new ABAP debugger by specifying the variable name and a comparison condition, and they are extremely useful when you know a variable is getting corrupted or overwritten somewhere in a long program but you do not know exactly which line is responsible. Unlike a line breakpoint, which is tied to source code position, a watchpoint is tied to data, so it can catch changes that happen deep inside a called subroutine, function module, or method that you did not anticipate. A common project use case is tracking down where an internal table or a global variable gets unexpectedly cleared or overwritten with a wrong value during a long-running program.
easyInternal Tables
2. What is the difference between LOOP AT itab INTO wa and LOOP AT itab ASSIGNING <fs>? Why does this distinction matter for performance?
LOOP AT itab INTO wa physically copies each row's data from the internal table into the work area's separate memory area on every iteration; any change to wa does not automatically reflect back into the table unless you explicitly issue a MODIFY itab FROM wa statement. LOOP AT itab ASSIGNING <fs> does not copy data - the field symbol becomes a direct alias pointing to the actual memory of that row inside the internal table, so any change made through <fs> immediately updates the table in place, with no separate MODIFY needed. For large internal tables processed in tight loops, avoiding the row copy by using ASSIGNING can meaningfully reduce CPU and memory overhead, especially when the work area/structure is wide (many fields) or when the loop runs for hundreds of thousands of iterations. This is a standard performance optimization technique in production-grade ABAP code, particularly for reports and interfaces processing large data volumes.
easyInternal Tables
3. What does the BINARY SEARCH addition do in a READ TABLE statement, and what precondition must be met for it to work correctly?
By default, READ TABLE ... WITH KEY on a standard table performs a linear scan through the rows, checking each one until a match is found, which is O(n) in the worst case. Adding BINARY SEARCH tells the runtime to instead perform a binary search on the table, achieving O(log n) complexity, which is significantly faster for large tables. However, BINARY SEARCH only produces correct results if the internal table is actually sorted by the key fields used in the WITH KEY condition, in the correct sort sequence - if the table isn't sorted on those fields (or is sorted on different fields), BINARY SEARCH can silently return a wrong row or no row at all, because the algorithm assumes ordering and simply won't find data correctly otherwise. Because of this fragile precondition, many senior developers prefer to declare the internal table as a SORTED table type from the start (which guarantees the order automatically) rather than relying on a standard table with a manual SORT plus BINARY SEARCH, since the manual approach is easy to break if someone modifies the table later without re-sorting.
easyABAP Core
4. What is the difference between a Function Module and a Method of a Class? When would you choose one over the other in a new development?
A Function Module is a procedural, standalone reusable unit stored in a function group with its own global data (function group's top include) shared among the function modules of that group; it has typed IMPORTING, EXPORTING, CHANGING, TABLES and EXCEPTIONS parameters, and can be made RFC-enabled for external calls. A Method belongs to a Class or Interface, follows Object-Oriented principles (encapsulation, inheritance, polymorphism), can raise class-based exceptions, and works with instance or static data depending on whether it's an instance method or a static method. In new developments, most modern ABAP projects prefer Class-based design because it supports better encapsulation, testability (unit testing with ABAP Unit), reduced global-data side effects, and easier reuse through interfaces. Function Modules are still commonly created when RFC-enabled communication is required (e.g., BAPI-style modules called from external systems, or when integrating with legacy code/BDC), or for very simple utility routines. A senior consultant would choose classes as the default approach for new business logic and only fall back to function modules when RFC/BAPI exposure is explicitly required or for enhancement framework requirements (e.g., certain exits are FM-based).
easyEnhancements
5. Explain the difference between classical customer enhancements and the modern Enhancement Framework. Why might SMOD/CMOD still be used in an ECC system?
Classical customer enhancements are predefined extension options delivered by SAP, such as function exits, screen exits and menu exits, grouped in enhancements that can be displayed in SMOD and implemented through a CMOD project. They keep customer code outside the SAP standard object, usually in customer includes generated for the enhancement component. The modern Enhancement Framework adds enhancement spots, BAdIs, explicit enhancement points/sections and implicit enhancement options, and is generally more flexible and better suited to new development. In an ECC system, SMOD/CMOD may still be the correct choice when SAP's standard application explicitly provides a classical customer exit and no released BAdI offers the required context. The choice must be based on the enhancement options actually available in that release, not on familiarity. For new S/4HANA development, prefer released BAdIs, released APIs and clean-core compliant extension points wherever possible. Do not modify SAP standard code merely because a classical exit is unavailable.
easyABAP Core
6. What is the difference between a Data Dictionary structure, a TYPE created in ABAP program, and a database table? When would you use each in a real project?
A database table (SE11, table maintenance) is a physical object stored in the database with a technical settings, delivery class, and buffering options - it actually holds persistent data. A DDIC structure is a logical grouping of fields with no data of its own; it is used to define the shape of internal tables, function module interfaces, or work areas and can be reused across programs. A local TYPE defined inside a program using TYPES statement is only visible within that program (or include) and is used when the structure is very specific to one piece of logic and not meant to be reused elsewhere. In real projects, DDIC structures are preferred whenever a structure is used in more than one program (interfaces, BAPIs, RFC-enabled function modules) because it centralizes maintenance - if a field changes, you change it once in DDIC. Local types are used for throwaway or program-specific structures, especially in reports where reusability isn't a concern.
easyDebugging
7. What is the difference between an external breakpoint and a session breakpoint in ABAP debugging, and when would you use each in a real project?
An external breakpoint is user-specific and works across all sessions and application servers for that user ID for a limited time (typically until midnight or logoff), which makes it useful when debugging a background job, RFC call, or update task triggered by your own user, or when a colleague needs to hit a breakpoint that you set remotely on a test system. A session breakpoint (set with Shift+F12 or by clicking the breakpoint icon in SE38/SE80) is only active in the current debugging session/dialog window and is lost once you leave the transaction or session, but it does not need special authorization and is the default choice for straightforward foreground debugging of your own program. In real project work, session breakpoints are used for quick, local dialog debugging, while external breakpoints are essential when the code path is triggered by a different work process, such as update tasks (V1/V2), background jobs, RFC-enabled function modules called from another system, or when someone else needs to trigger the transaction for you to observe it live.
easyOpen SQL
8. Describe the ORDER BY clause in Open SQL. What is the default sort order, and how do you specify descending order for specific fields? What are the performance implications?
ORDER BY sorts result rows by specified fields. Default sort order is ASCENDING (A) for all fields. To reverse for specific fields, use DESCENDING (D). Example: SELECT * FROM orders ORDER BY order_date DESCENDING, line_number ASCENDING retrieves orders newest first, then by line number within each order. Performance-wise, ORDER BY at the database level is efficient if the database has an index matching the ORDER BY sequence (covering index). If no matching index exists, the database performs an in-memory sort, which is fast for small result sets but can be expensive for large result sets. In S/4HANA, database pushdown is optimized for ORDER BY, so the sort typically happens at the database. Use ORDER BY only when ordering is semantically necessary; avoid sorting large result sets in ABAP when the database can do it more efficiently. Sorting after SELECT INTO TABLE in ABAP (using SORT statement) is an alternative but less efficient for large volumes. If no ORDER BY is specified, do not rely on the physical database return sequence; explicitly order when business logic depends on sequence.
easyOpen SQL
9. Write an Open SQL SELECT INTO TABLE statement that fetches material master header data from MARA for a list of materials. Include proper field selection, WHERE clause, and no-data handling.
A clean example is: SELECT matnr, mtart, meins FROM mara INTO TABLE @lt_mara WHERE matnr IN @lr_matnr AND mtart IN @lr_mtart. IF sy-subrc = 0. SORT lt_mara BY matnr. ELSE. MESSAGE 'No materials found for the given selection' TYPE 'I'. ENDIF. The important points are to fetch only the fields required instead of SELECT *, push filters into the WHERE clause, and keep the selection table/range validated before the SELECT. Open SQL automatically handles the client for normal client-dependent transparent tables, so you normally do not select or filter MANDT manually. If material descriptions are required, they are not in MARA; join or separately read MAKT using MATNR and SPRAS, because MAKTX belongs to MAKT. In S/4HANA, for reusable material queries or authorization-aware consumption, a released CDS view may be preferable.
easyEnhancements
10. What are SMOD and CMOD, and what is the correct workflow for implementing a classical customer enhancement?
SMOD is used to display and research SAP-delivered classical enhancements and their components. CMOD is used to create a customer project, assign one or more enhancement definitions, implement the available components and activate the project. A typical workflow is: identify the business transaction and underlying program/package; search for an appropriate enhancement in SMOD or the Repository Information System; review its documentation and function/screen/menu components; create a Z-named CMOD project; assign the enhancement; open the component and implement the customer include or subscreen/menu function generated by SAP; activate the include and project; then test the exact business scenario. Function exits use SAP-delivered EXIT_* function modules whose source typically delegates to a customer include such as ZX*. The developer implements the customer include; the signature of the SAP function module must not be changed.
easyOOP ABAP
11. Explain the CREATE OBJECT and NEW operator for instantiating objects. What are the differences, and when would you use each in modern ABAP?
CREATE OBJECT is the traditional ABAP syntax for instantiation, available since ABAP OO inception. NEW is a functional alternative (ABAP 7.4+) providing a more concise syntax. CREATE OBJECT: lref_emp TYPE REF TO lcl_employee. CREATE OBJECT lref_emp. NEW: lref_emp = NEW lcl_employee(). NEW supports inline constructor parameters: lref_emp = NEW lcl_employee( id = 123 name = 'John' ). Differences: CREATE OBJECT requires separate reference declaration and instantiation; NEW combines both. NEW is more concise, supports method chaining, and aligns with modern ABAP style. CREATE OBJECT is still valid but considered legacy in ABAP 7.4+. Constructor parameters: CREATE OBJECT lref_emp EXPORTING id = 123. NEW lcl_employee( id = 123 ) is equivalent. Exception handling: both can raise exceptions if constructor validation fails; use TRY-CATCH. Real project: new code uses NEW; legacy systems still use CREATE OBJECT. Performance: negligible difference; both compile to same bytecode. When NOT: CREATE OBJECT remains necessary in older SAP systems (pre-7.4); avoid mixing syntax in the same codebase for consistency. Best practice: use NEW in new development; migrate legacy CREATE OBJECT in refactoring. Interview tip: mention both for compatibility awareness; prefer NEW for modern ABAP style.
easyOOP ABAP
12. Explain the difference between a local class and a global class in ABAP OO. When would you use each, and what are the implications for maintainability and reusability?
Local classes are defined within a program (report, function module, or class) using CLASS...ENDCLASS and are scoped to that program only. Global classes are defined in the class repository (SE24) and are visible across the entire SAP system. Local classes are suitable for single-program utility logic (e.g., helper classes in a report); they reduce repository clutter and are easier to modify without affecting other programs. Global classes are used for reusable business logic accessed by multiple programs, BAdIs, function modules, or web services. Maintainability implications: local classes are tightly coupled to their program; changes are isolated but duplication occurs if multiple programs need the same logic. Global classes enable centralized maintenance; one change benefits all consumers but requires more rigorous testing. Reusability: global classes are inherently reusable; local classes require duplication or refactoring to share. Design practice: use local classes for report-specific utilities, global classes for domain logic (materials, orders, customers). Example: a utility class to format dates locally in a report; a material master class globally for SD/MM/FI processes. Performance: no difference at runtime; both compile to the same bytecode. When NOT to use global classes: avoid creating a global class for trivial single-use logic; use local classes first, promote to global only if reuse is proven.
easyIDoc
13. What is a partner profile?
A partner profile is the WE20 configuration that tells SAP how to exchange IDocs with a specific trading partner or internal system. First you check which partner type and partner number are maintained, then define the inbound and outbound parameters, including message types, process codes, ports from WE21 and any packaging or control settings needed. This is important because SAP uses the partner profile to know where an IDoc should go, how it should be processed, and how communication should be handled. A strong candidate adds that it is part of the overall IDoc interface setup and must align with the logical system and port configuration so messages are routed and processed correctly.
easyALV Reports
14. What are the main differences between CL_SALV_TABLE and REUSE_ALV_GRID_DISPLAY?
REUSE_ALV_* is the older function-module-based ALV; it is verbose and less object-oriented, but supports editable cells. CL_SALV_TABLE is a modern OO wrapper that is simpler to build, supports full-screen and container display, functions, sort/filter, top-of-page, and event handling via CL_SALV_EVENTS_TABLE. It does NOT support editable ALV out of the box; for editable use CL_GUI_ALV_GRID with SET_TABLE_FOR_FIRST_DISPLAY.
easyIDoc
15. What is an IDoc?
An IDoc, or Intermediate Document, is SAP’s standard container for asynchronous data exchange between systems. The first thing to check is that it consists of a control record and one or more data segments, with the structure defined by a basic type such as MATMAS05 and, where needed, extended through an optional extension. This matters because the control record carries the routing and processing information, while the segments hold the business data. A strong candidate also adds that IDocs are commonly used for integration and are designed to transfer structured messages reliably without requiring immediate synchronous processing.
easyUser Exits
16. A header-level check in a sales order user exit read VBAP and gave wrong results for orders with several items. Why, and what should it use?
In SAPMV45A, VBAP is a work area holding the item currently or last processed — in a header-level exit such as USEREXIT_SAVE_DOCUMENT_PREPARE it contains just one item, often the last one. The full item list is in the internal table XVBAP (new state, with UPDKZ I/U/D) and YVBAP (old state in change mode).
The check must loop over XVBAP, skipping deleted items (UPDKZ = 'D'), and evaluate each item or aggregate them. I would also add a guard on order type and T180-TRTYP, and keep the logic in a Z FORM or class for testing.
easyALV Reports
17. A finance ALV shows technical field names as headers and amounts converted to text columns, so totals and currency formatting don't work. How do you fix the field catalog?
Technical headers mean the catalog lacks texts — usually because the output structure uses generic types instead of DDIC data elements, or the catalog was built manually without texts. I would type the output structure with data elements (or ref_table/ref_field in the catalog) so headers and F1 help come from DDIC, and set coltext only where a different label is needed.
Amounts must stay numeric (CURR/packed) in the output table, not converted to text; then do_sum works and cfieldname links each amount to its currency column (WAERS) so decimals are correct per currency. Quantities get qfieldname for the unit. Result: correct headers, sums, subtotals and currency formatting, and Excel export keeps numbers.
easyPerformance Tuning
18. A report reads 900,000 order rows with SELECT * and then filters and sums them in ABAP. How do you improve it?
I apply the database-first rules: move the filters into the WHERE clause (dates, order types, sales org) so the database returns only relevant rows; replace SELECT * with the few fields needed; and if the report only shows totals, let the database aggregate with SUM … GROUP BY (grouped by currency where amounts are summed).
Then the report transfers thousands instead of hundreds of thousands of rows. I verify with ST05 (records, duration) and compare totals with the old version to ensure identical results.
easyPerformance Tuning
19. A slow finance report is blamed on the ALV display. How do you prove where the time really goes?
I measure instead of guessing. STAD for the report's dialog step or job shows the response time split: database time, CPU (ABAP) time, RFC and wait time. If DB time dominates, the ALV isn't the issue — ST05 then shows which SELECTs cost most (executions, records, identical statements, explain plan). If ABAP time dominates, SAT's hit list shows whether time is in data processing (loops, internal table reads) or in ALV preparation.
Typically the ALV is a small part; the cost is a SELECT inside a loop or a large read. I document the numbers before and after each change.
easyAdobe Forms
20. A tax invoice used a very high-resolution logo, making each emailed PDF several megabytes. How do you fix it?
The embedded image is stored in every PDF. I would replace it with an appropriately sized and compressed image (right resolution for print, e.g. 300 dpi at actual print size), preferably referenced via a context graphic node (SE78 or MIME repository) so it's managed centrally.
Then I compare PDF sizes and print quality, and check other static images or fonts embedded unnecessarily. For many forms, a shared master page/template with the optimised logo keeps all forms consistent.