OBJECTS_OBJREF_NOT_ASSIGNED

medium

Object Reference Is Initial — Null Pointer Dereference

Module: ABAP OO

What this means

OBJECTS_OBJREF_NOT_ASSIGNED is the ABAP equivalent of a null pointer exception. It occurs when code attempts to access an attribute or call a method on an object reference variable that has not been instantiated (i.e., it is still INITIAL). In ABAP Objects, declaring a reference variable with DATA: lo_obj TYPE REF TO cl_example does not create an object — it just creates a reference that points to nothing. If code then calls lo_obj->some_method( ) without a preceding CREATE OBJECT or factory call, this dump fires.

Recommended Fix

In ST22, the call stack will show exactly which variable was initial and which method was called. Add an IS BOUND or IS NOT INITIAL check before the method call. If the object is supposed to have been created earlier in the call chain, trace back through the call stack to find where the factory or CREATE OBJECT call should have been made but was skipped — often due to an early RETURN or a missed error branch.

Quick Info

ModuleABAP OO
Severitymedium
Diagnose in
ST22