GETWA_NOT_ASSIGNED¶
A field-symbol was accessed but has never been assigned to a memory area.
The field-symbol was declared with FIELD-SYMBOLS but no ASSIGN statement has pointed it at actual data — or it was explicitly unassigned with UNASSIGN.
Symptom¶
ST22 shows:
Runtime Errors GETWA_NOT_ASSIGNED
Exception CX_SY_GETWA_NOT_ASSIGNED
Short text Field symbol has not yet been assigned.
The dump line is the first statement that reads or writes through the <field_symbol>.
Cause¶
A field-symbol is a pointer — it holds no data of its own. It must be pointed at an existing variable or table row before it can be used. Common triggers:
FIELD-SYMBOLS: <fs> TYPE ...declared at the top but never reached anASSIGNstatement before being accessed.- A conditional
ASSIGN COMPONENTsucceeded only for some rows but the field-symbol was used unconditionally after the loop. UNASSIGN <fs>was called and the symbol was then accessed again in the same scope.- A method received a field-symbol via
TYPE ANYand the caller forgot to assign it first.
Reproduce¶
Loop variant — the bug is in the rows where ASSIGN fails:
DATA lt_data TYPE STANDARD TABLE OF string.
FIELD-SYMBOLS: <line> TYPE string.
LOOP AT lt_data ASSIGNING <line>.
" <line> is assigned in every iteration — safe here
ENDLOOP.
" Outside the loop, <line> may still be assigned to the last row
" but IS ASSIGNED is the only safe check:
IF <line> IS ASSIGNED.
WRITE <line>.
ENDIF.
Fix¶
IS ASSIGNED vs IS INITIAL
IS INITIAL on a field-symbol checks whether the pointed-at value is initial — it does not check whether the field-symbol is assigned at all. A non-assigned field-symbol with IS INITIAL still dumps. Always use IS ASSIGNED.
Prevention¶
- After every
ASSIGNorASSIGN COMPONENT, immediately checkIS ASSIGNEDbefore reading the field-symbol. - Prefer
LOOP AT ... ASSIGNING <fs>overASSIGNinside loops — the loop handles assignment automatically per iteration. - For modern code, prefer
DATA(lo_ref)inline declarations and object references over field-symbols where possible; they start asINITIALand can be checked withIS BOUND. - Enable the Extended Program Check (
SLIN) — it flags many unguarded field-symbol usages statically.
See also¶
OBJECTS_OBJREF_NOT_ASSIGNED— the equivalent dump for object referencesCX_SY_REF_IS_INITIAL— exception class for null object references- Transaction ST22 — ABAP runtime error analysis
- Transaction SLIN — extended program check