ABAP short dumpObjectCX_SY_ITAB_LINE_NOT_FOUNDModuleABAP

CX_SY_ITAB_LINE_NOT_FOUND — CX_SY_ITAB_LINE_NOT_FOUND Dump Analysis

CX_SY_ITAB_LINE_NOT_FOUND is an uncaught class-based exception raised when a table expression, such as itab[ key ], finds no matching row and the surrounding code has no TRY/CATCH or LINE_EXISTS guard. It almost always points to either a missing TRY/CATCH after a code refactor, or a genuine data gap in the lookup table the developer assumed was always populated.

This page covers the runtime dump raised by ABAP table expression syntax when the requested line is absent, distinguishing coding defects from data gaps. It lists the ordered checks in ST22, the branching resolution path, and the common empty-CATCH reflex that hides the real defect.

Published 16 Sept 2026· 1,111 words

What the dump means

CX_SY_ITAB_LINE_NOT_FOUND is a class-based exception belonging to the CX_SY_ITAB_ERROR hierarchy. It is thrown specifically by the modern table expression syntax, for example wa = itab[ id = lv_id ] or a table expression nested inside VALUE# or COND#. Unlike classic READ TABLE, a table expression does not set sy-subrc when the line is missing. It raises this exception instead, and if no handler catches it, the runtime terminates with a short dump. The dump therefore almost never indicates a database or memory problem. It indicates that the internal table did not contain a row for the key or index requested at that exact point in the program, and the code was written assuming it always would.

Root causes that actually produce it

  • Missing exception handling after using bracket syntax: the developer wrote itab[ key ] directly instead of wrapping it in TRY/CATCH or checking LINE_EXISTS first, on the assumption the row would always be there. This is the single most frequent cause, especially in code written or refactored after ABAP 7.40 style became standard.
  • Data gap in the source lookup table: the internal table was built from a selection, a BAPI, or a customizing read that returned fewer rows than the calling logic expects, commonly because a company code, plant, or condition record combination is not maintained for the specific key being looked up.
  • Conditional population, unconditional access: the table is filled inside an IF or CASE branch and a later statement reads it by key without checking whether that branch actually executed for the current record.
  • Key value mismatch: the search key passed to the table expression does not match any row due to a type conversion issue, leading zero handling, case sensitivity, or a trailing space picked up from a screen field.
  • Refactoring regression: legacy code using READ TABLE ... WITH KEY and an explicit sy-subrc check was rewritten as a table expression during a modernization pass, and the equivalent error handling was dropped in the rewrite.
  • Enhancement or BAdI assuming standard-populated data: a customer exit reads a standard internal table by key assuming the standard framework always inserts an entry per document or item, which is not true for edge cases such as first-time postings, migrated documents, or cancelled line items.

What to inspect in ST22

  • Exception class name and short text at the top of the dump, confirming this is CX_SY_ITAB_LINE_NOT_FOUND and not a related itab dump.
  • The 'What happened' section, which usually reproduces the exact table expression statement that failed, including the internal table name and the key fields used.
  • Source code position: program, include, and line number, taken straight to SE38 or SE80 to view the statement in context.
  • The call stack in the dump, to see which function module, method, or form triggered the failing statement and under what business transaction it ran.
  • Variable values available in the dump's debugger view, specifically the content of the internal table at the time of failure and the value of the key fields used in the lookup.
  • Whether the table was populated earlier in the same call, and if so, from which selection, BAPI, or customizing read, to judge whether this is a data gap or a logic gap.
  • Re-run the same key values in SE16N or the relevant application transaction to confirm whether the underlying master or customizing data genuinely does not exist.

Resolution path

If the cause is missing exception handling around a table expression, wrap the access in TRY/CATCH INTO cx_sy_itab_line_not_found and decide the fallback behaviour explicitly, or precede the access with a LINE_EXISTS check and branch accordingly. This is a code change and requires a transport through the normal development and testing path. If the cause is a data gap, for example a missing customizing entry or master record, the fix belongs in configuration or master data maintenance, not in the program, and may still need a transport if the fix is a customizing table change. If the cause is a conditional-population bug, the logic needs correcting so the table is guaranteed populated before the read, or the read is made conditional on the same flag as the population, followed by a regression test on the affected process. If the cause is a refactoring regression, restore the equivalent error handling that existed in the pre-refactor version and add a unit test covering the empty-table case so it cannot regress silently again.

The fix people try first (and why it fails)

The reflex fix is wrapping the table expression in TRY/CATCH with an empty or near-empty CATCH block just to stop the dump. This suppresses the short dump but leaves the workarea unfilled or partially filled, and the program continues executing with stale or initial field values. The failure resurfaces downstream, usually as GETWA_NOT_ASSIGNED, an incorrect posting, or a silently wrong result that is far harder to trace back to the original missing row than the original dump was.

Prevention

Make TRY/CATCH or LINE_EXISTS mandatory around any table expression access in the coding standard, and enforce it through code review and ABAP Test Cockpit checks rather than relying on individual developer discipline. Add unit tests that exercise the empty-table and missing-key paths explicitly, not just the happy path, for any method that builds a lookup table from external data. Treat any refactor from classic READ TABLE to table expression syntax as requiring an explicit review of the old sy-subrc handling.

Whose problem this is

This is an ABAP development issue, not a Basis issue, since it is triggered by program logic rather than system resources. Functional input is needed to confirm whether the missing row reflects a genuine business scenario or a data gap that should not exist. The handover note should include the program, include, and line from the dump, the key values that failed to resolve, and the business document or transaction that triggered the run.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-abap-dumps/cx-sy-itab-line-not-foundERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.