ERPClimb logoERPClimb

SAP ABAP Interview Questions and Answers

Core ABAP, Open SQL, debugging, enhancements and performance tuning.

379
Questions
16
Topics
6
Experience levels

Sample Questions

Full questions with full answers — no sign-in required.

mediumOpen SQL

1. After executing a SELECT statement in Open SQL, your SY-SUBRC is 0 but the result set is logically empty (e.g., all rows filtered out in your application logic). How does this differ from a true database 'no rows found' scenario, and what debugging approach would you take?

SY-SUBRC = 0 after SELECT means the query executed successfully and at least one row was returned by the database. If your application logic then filters all rows away, SY-SUBRC remains 0 because it reflects database execution status, not application filtering. True 'no rows found' occurs when the WHERE clause matches zero rows at the database level (SY-SUBRC = 4). To debug, inspect the actual fetched row count before and after application filtering. Use ST05 (SQL Trace) to see the exact SELECT statement and row count returned by the database. Alternatively, capture the internal table's line count immediately after SELECT (DESCRIBE TABLE it LINES lv_count) to see how many rows the database actually returned before application filtering. Check your WHERE clause logic to ensure it's pushing the right filters down to the database rather than fetching excessive rows in ABAP.
hardEnhancements

2. Explain the execution sequence when multiple customer exits and user exits are active for the same function. Can this create problems? Provide a real scenario.

There is no generic SAP rule that all customer exits run first or that numbered EXIT_* function modules define a universal sequence. Each enhancement runs where the standard program calls it. To determine the real order, inspect the standard source and call stack, set breakpoints in every relevant user exit, function exit and BAdI, then execute the same business scenario. Multiple enhancements can conflict when they modify the same structures, assume different intermediate states, issue contradictory messages or perform duplicate database access. Prevent this by assigning one responsibility to each enhancement, centralizing shared logic in reusable classes, documenting dependencies and avoiding direct updates. If order is business-critical but not contractually guaranteed by SAP, redesign to remove that dependency.
hardOpen SQL

3. A report queries purchase orders from multiple vendors. You have a list of 800 vendor IDs and need to fetch orders for all of them efficiently. Compare FOR ALL ENTRIES vs. JOIN approaches and recommend based on your experience.

FOR ALL ENTRIES approach: SELECT * FROM orders INTO TABLE lt_orders FOR ALL ENTRIES IN lt_vendors WHERE vendor_id = lt_vendors-vendor_id. Results in 2 queries if driver table (lt_vendors) is not empty. If lt_vendors is empty, the FOR ALL ENTRIES condition can be ignored and the query may return a much larger result set than intended, so handle it separately with IF lt_vendors IS NOT EMPTY. JOIN approach: SELECT o~*, v~vendor_name FROM orders AS o INNER JOIN vendors AS v ON o~vendor_id = v~vendor_id INTO TABLE lt_result WHERE o~vendor_id IN @lt_vendor_ids. Results in 1 query. FOR ALL ENTRIES is beneficial if: orders table has few columns or selective field fetch is preferred, or if vendors table is very large (JOIN might be inefficient). JOIN is preferred if: relationship is well-defined, need vendor details in one fetch, and both tables have good indexes on join fields. In S/4HANA, JOINs are often optimized by the database and CDS Views; prefer JOIN if semantic. For 800 vendors, either works, but JOIN (1 query) outperforms FOR ALL ENTRIES (2 queries) in network latency and database connection overhead. Always run ST05 on both approaches with actual data volume to confirm.
mediumWorkflow

4. Explain the core building blocks of SAP Business Workflow architecture and how they interact to execute a workflow instance.

SAP Business Workflow is built on several key components that work together. The Business Object Repository (BOR) or ABAP classes (via BOR-compatible interfaces) define business objects with their key fields, attributes, methods, and events - these represent the real-world entities like Purchase Requisition or Leave Request. Workflow Templates (transaction SWDD/PFTC) contain the workflow definition built from steps such as Activity steps (calling BOR methods or tasks), Decision steps (user decisions), Condition steps (branching logic), and Fork/Join for parallel processing. Tasks (TS) are single-step tasks that wrap a BOR method or class method call, while Workflow Templates (WS) orchestrate multiple tasks. The Workflow Runtime System, exposed largely through the Workflow Engine, manages the actual execution, maintaining Work Items (business objects representing activities to be performed) and Work Item Containers holding runtime data. Agent Determination Rules define who gets work items in their inbox, using either responsibility rules, role resolution, or organizational assignment via HR org structure. Events (raised by application programs via SWE_EVENT_CREATE or ABAP class events) trigger the start of workflows or activate waiting steps, linked through the Event Linkage table maintained via SWETYPV. Container operations pass data between steps using bindings. Together, when a business event fires, the linkage triggers workflow start, the engine interprets the definition, resolves agents, creates work items, and processes them through SAP Business Workplace or the Fiori My Inbox, tracking status via the workflow log (SWI1) until completion.
hardOpen SQL

5. A SELECT statement into an internal table takes 30 seconds. After analyzing the code, you realize the WHERE clause doesn't use any indexed fields, and a full table scan is occurring. How would you refactor this, and what tools would you use to verify improvement?

Root cause: full table scan on a large table due to WHERE clause not matching available indices. Refactoring steps: (1) Analyze indices on the table (SE11 > Indices tab) to understand what indices exist. (2) Review WHERE clause fields and rewrite to use leading index fields if possible. Example: old WHERE status = 'OPEN', new WHERE created_date BETWEEN @v_start AND @v_end AND status = 'OPEN' (if index exists on created_date). (3) If no suitable index exists, propose one through normal SE11/index governance on WHERE clause fields in the correct order. (4) Use ST05 to baseline current performance (full table scan, execution time). (5) Deploy refactored code with new WHERE clause or index. (6) Re-run ST05 to compare: access pattern should change from Full Table Scan to Index Access, execution time should drop significantly. (7) If results are still poor, apply PACKAGE SIZE to batch-fetch or consider CDS View. Expected outcome: 30 seconds → 2-3 seconds with proper index. Before/after ST05 comparison is the proof point. Document the index creation and WHERE clause refactoring in your code comments for maintenance.
hardOpen SQL

6. Design a robust error handling and monitoring strategy for a production Open SQL batch job that processes 10 million rows. Include recovery, logging, and performance tracking.

A production Open SQL batch job processing 10 million rows needs controlled package design, audit logging, and restartability. First, define package boundaries by key range, date range, or a checkpoint sequence so each package can be selected, processed, written, and committed independently. Use TRY...CATCH around database and processing sections, catching relevant exceptions such as cx_sy_open_sql_db and logging the technical message, package key range, row counts, user, timestamp, and job name. After each successful package, write a checkpoint record and COMMIT WORK so restart can begin from the last completed package. Do not commit inside an active database cursor; ensure the package SELECT has completed before commit. Monitoring should include SM37 job logs, ST05 for SQL traces during performance tests, SM50 for active work process observation, SM12 for lock/enqueue issues if updates are involved, ST22 for dumps, and an application log/custom log table for business status. Track rows per second and package duration, and alert if the rate drops below threshold. Recovery should be idempotent: re-running a package should not duplicate records, either by using unique keys/upsert logic, processed flags, or a staging table with status.

Core SAP ABAP interview questions and answers

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.

Browse by Topic

Focused SAP ABAP interview topics

Dedicated pages for the searches candidates run most often, each with the full question set and answers on the page.

SAP ABAP interview questions by experience level

The same question set, grouped by the depth each interview actually goes to.

SAP ABAP — Fresher / 1-3 yrs

Core concepts, configuration basics and the process flow an interviewer expects you to explain end to end.

easyOOP ABAP

1. Explain visibility modifiers (PUBLIC, PROTECTED, PRIVATE) in ABAP OO. How do they enforce encapsulation, and what is the impact on inheritance hierarchies?

PUBLIC members are accessible from anywhere (same class, subclasses, external programs). PROTECTED members are accessible within the class and its subclasses but NOT from external programs. PRIVATE members are accessible only within the class itself. Encapsulation rationale: SAP designed visibility to prevent external dependencies on internal implementation details. PUBLIC attributes/methods form a contract; changing them breaks all consumers. PRIVATE attributes hide implementation; expose behavior via methods. PROTECTED members are available to subclasses, but exposing mutable state as PROTECTED should still be used carefully because it couples subclasses to the parent's implementation. Prefer protected methods or carefully controlled attributes when extension is genuinely intended. Example: CLASS lcl_employee DEFINITION. PUBLIC SECTION. METHODS display. PRIVATE SECTION. DATA salary TYPE p. ENDCLASS. External code cannot access salary directly; only display() method can expose it. Inheritance impact: if Employee subclass (e.g., Manager) needs salary, make it PROTECTED, not PUBLIC, to prevent accidental modification by unrelated code. When NOT: avoid PRIVATE in simple utility classes where flexibility is valued. Avoid PUBLIC for data attributes; use methods to enforce validation. Interview tip: explain encapsulation as a contract; PUBLIC = promise to maintain; PROTECTED = inheritance pact; PRIVATE = implementation detail. Real project: a material service exposes public query methods while keeping cached data and mutable state private.
hardIDoc

2. IDoc processing floods the system at month-end. How do you handle it?

First I would confirm whether the flood is caused by a genuine business spike or by avoidable technical retries, because that changes the fix. For high month-end volumes, I would process inbound IDocs in controlled batches with RBDAPP01 and size the packages so they stay within available dialog or background capacity. If throughput is still insufficient, I would enable parallel processing carefully and watch SM66 and SM50 to avoid starving other work. I would also review database performance and relevant indexes on EDIDC and EDIDS, since poor access there can slow status updates and selection. A strong candidate also coordinates delivery windows and payload frequency with the source system so the load is spread out before it reaches the SAP system.
easyIDoc

3. What is the difference between IDoc message type and basic type?

First check the business context: the message type describes what the IDoc is for, for example ORDERS or INVOIC, so it represents the business meaning and the document being exchanged. The basic type then defines how that message is technically built, including the segment structure, such as ORDERS05 or INVOIC02. A strong answer also makes clear that one message type can be linked to different basic types depending on release or process needs, so the message type stays business-focused while the basic type is the structural blueprint.
easyABAP Core

4. What are the different types of internal tables in ABAP (Standard, Sorted, Hashed) and what access performance characteristics does each have?

A Standard table is an unordered internal table where records are stored in the sequence they are inserted; reading by index is fast (direct offset), but reading with a key requires a linear scan unless a secondary index is built, giving O(n) complexity. A Sorted table maintains records in ascending or descending order of a defined key; reading by key uses binary search giving O(log n) complexity, and inserts maintain sort order automatically which has a cost. A Hashed table has no linear index access at all - it is accessed only via a unique key using a hash algorithm giving near O(1) access time regardless of table size, but it cannot be accessed by index (no LOOP ... FROM x TO y using index makes sense the same way and READ TABLE ... INDEX is not supported). In real projects, hashed tables are chosen for large master data lookups (like a lookup of customer master into memory) where key-based access is frequent and table size is large; sorted tables are chosen when data must remain ordered and frequent key reads happen; standard tables are the default for general processing, especially when index-based access or appending is the primary operation.

Browse by Experience

12+ years8-12 years4-7 years1-3 yearsFresherArchitect

Why ERPClimb

Built and reviewed by a senior SAP architect with 19 years of production experience. Every answer is written against how the process actually behaves in a live system, not copied from documentation, and each question is tagged by topic, difficulty and experience level so you can practise at the depth your next interview will use.

SAP ABAP interview FAQ

What ABAP topics come up most in interviews?

Internal tables, Open SQL and HANA-aware SELECTs, the debugger, enhancement techniques (BAdI, user exits, implicit enhancements), ALV, SmartForms and performance tuning dominate real interview rounds.

Do I need OOP ABAP for mid-level roles?

Yes. From 3 years upwards most interviewers expect global classes, interfaces, exception classes and a working understanding of why procedural reports are being retired in favour of classes and CDS.

How are ABAP performance questions usually asked?

Usually as a scenario: a report runs slow, and you are asked how you would analyze it. Expect SQL trace, runtime analysis, index usage, avoiding SELECT inside loops and pushing logic down to the database.

Is classic ABAP still relevant on S/4HANA?

Yes, but with constraints. Interviews increasingly test clean core thinking: released APIs over direct table access, CDS and RAP over classic dialog programming.

Next practice step

Related SAP interview topics

Focused SAP interview guides