SAP ABAP Internal Tables Interview Questions
Internal Tables is a standard block in SAP ABAP interviews. It is rarely asked as a definition; it is asked as a situation you have to talk your way through.
Master standard, sorted and hashed internal tables with real ABAP performance, debugging and interview scenarios.
This page carries 35 reviewed SAP ABAP internal tables interview questions, each with a complete written answer and no sign-in required. The set breaks down into 7 foundational, 13 mid-level and 15 advanced questions, so you can start at the top for a first interview or skip ahead to the scenario-based items for a senior round.
Treat the answers as a starting structure, not a script. Interviewers in SAP ABAP rounds follow up on whatever you sound least certain about, so the value is in being able to keep going after the first answer.
35 Internal Tables questions with answers
2. What does the BINARY SEARCH addition do in a READ TABLE statement, and what precondition must be met for it to work correctly?
3. What are the three types of internal tables in ABAP (Standard, Sorted, Hashed) and how do they differ in terms of key definition and access?
4. What is the purpose of a secondary key (secondary index) on an internal table, and how do you define one?
5. What is the difference between APPEND, INSERT, and COLLECT when adding rows to an internal table?
6. When do you use a work area, a field symbol or a data reference to access table rows?
7. An upload changes a work area inside LOOP INTO but the table is not updated. Why, and what is the fix?
8. You need to build an internal table structure to hold sales order header data along with a variable number of item lines per order (a nested/hierarchical structure). How would you model this using internal tables?
9. A program uses APPEND to add rows into what was declared as a SORTED table, and it throws a runtime error intermittently only for certain input data. What's happening and how would you fix it?
10. A custom program compares two internal tables (an 'old' snapshot and a 'new' snapshot of the same business data) to identify inserted, deleted, and changed records for a delta interface. How would you design this comparison efficiently using internal tables?
11. Your program builds an internal table of open purchase order items and needs to compute a running total per vendor, then also needs the final list sorted by vendor with a subtotal line after each vendor's items. How would you design the internal table structures and logic for this?
12. A report using SELECT ... FOR ALL ENTRIES IN lt_driver sometimes returns fewer rows than expected, and investigation shows lt_driver had duplicate key values before the SELECT. What internal-table-related behavior explains this and how would you fix the underlying program?
13. In a debugging session, you find that a program modifies rows of an internal table inside a LOOP using MODIFY itab FROM wa, but some rows are not getting updated as expected even though the logic looks correct. What internal-table-specific issues would you investigate?
14. A colleague wrote code that builds a RANGES-style selection table dynamically to filter a SELECT statement based on user input from a selection screen, but sometimes the filter behaves unexpectedly (returns too many or too few records). What internal table design aspects would you check?
15. You're building a report that reads sales order items and needs to look up the corresponding material description for each line. The material table has around 80,000 entries and the sales item table has around 30,000 lines. How would you design the internal table lookups to avoid performance problems?
16. A pricing lookup table of 80,000 rows is read by condition key for every item. Which table type do you choose and why?
17. A bulk material lookup built a FOR ALL ENTRIES driver table without removing duplicates or checking emptiness. What problems arise and how do you fix them?
18. A report scans 200,000 items for every sales order header. How do you fix the lookup design?
19. An order-validation loop first calls line_exists( ) and then reads the same row with a table expression. What would you improve?
20. A report sorts a standard table inside a loop before every BINARY SEARCH. What is wrong and what is the fix?
21. A background job processes a large internal table and occasionally dumps with a short dump related to memory exhaustion, but only when run against certain company codes with more data. What internal-table-specific patterns would you look for in the code as likely culprits?
22. How would you design internal table processing for a framework method that must merge data from multiple heterogeneous sources (different internal tables with overlapping but not identical structures) into one consolidated result table, while keeping the design extensible for future new sources?
23. Your team is designing a reusable class method that accepts an internal table as an importing parameter and must work regardless of whether the caller passes a standard, sorted, or hashed table. What design considerations are important here?
24. You inherited a program where a field symbol is assigned inside a loop using ASSIGN COMPONENT idx OF STRUCTURE wa TO <fs>, and occasionally the program dumps with an 'unassigned field symbol' error only for certain input files. How would you debug this?
25. A high-throughput interface program processes internal tables with several hundred thousand rows and needs to remove duplicate rows based on a subset of fields, not the full row. What internal table techniques would you use to do this efficiently, and what pitfalls exist with the standard DELETE ADJACENT DUPLICATES approach?
26. You are asked to redesign a poorly performing report that builds an ALV output by looping over a header internal table and, for each header, looping over a full standard items internal table using a WHERE condition to find matching items (LOOP AT items WHERE vbeln = header-vbeln). What internal table redesign would you propose and why?
27. You need to build a highly reusable internal table-based caching mechanism inside a long-running framework class, where thousands of different keys will be looked up repeatedly across many method calls without re-querying the database each time. What internal table design would you use and what pitfalls would you guard against?
28. How would you decide between using a standard internal table with SORT + BINARY SEARCH versus declaring the table directly as a SORTED or HASHED table type, from a design and maintainability perspective?
29. You need to process 2 million material master records in a background report, applying business logic per record and writing results to a Z-table. Reading all 2 million rows into a single internal table at once causes memory pressure. How would you redesign the internal table handling for this?
30. You're mentoring a team on writing production-grade internal table code. Summarize, as a senior/architect-level answer, the key principles you would enforce for choosing table types, keys, and access patterns to prevent recurring performance issues in custom ABAP code, focusing purely on internal-table-level decisions.
31. A performance-critical program uses table expressions heavily. What pitfalls do you check in a review?
32. Explain the memory and performance implications of internal table choices in large background jobs.
33. Two large tables (employees and payroll results) must be combined in memory for an interface. How do you design it?
34. A pricing report uses several nested loops over large standard tables. How do you optimize it?
35. A reconciliation job holds raw, enriched and output copies of the same line items and dumps with memory errors. What do you change?
Related lesson
Internal Tables Part 9: Nested LOOP Optimization and Parallel CursorRelated topics
Next practice step
Go deeper on this topic
- Internal Tables — lessons, mock tests and code lab
- ABAP Core
- Open SQL
- Modularization
- OOP ABAP
- ALV Reports
- Enhancements
- SAP ABAP Modularization interview questions
- SAP ABAP OOP ABAP interview questions
- SAP ABAP SmartForms interview questions
- SAP ABAP User Exits interview questions
- SAP ABAP on HANA Interview Questions
- SAP ABAP Performance Tuning Interview Questions