Do you have any question about this error?
Message type: E = Error
Message class: 28 - Configuration
Message number: 036
Message text: Object variable expected
The syntax check found an error. An object variable is expected at the
cursor.
In preconditions, selection conditions, procedures, and actions, you
can use the following object variables:
$ROOT for the highest level object in a multi-level configuration
$SELF for the object currently being processed
$PARENT for the object immediately above current object $SELF in a
multi-level configuration
The object variable is separated from the characteristic by a period:
$ROOT.COLOR
In constraints, you can define object variables under OBJECTS.
T IS_A (300)TABLE
You can also define your own variables for characteristics in
constraints. You then use these variables to refer to the
characteristics.
If you have not defined object variables for the characteristics of the
object, you must define which object the characteristic belongs to. In
this case, the system expects an object variable before the
characteristic.
T.Material = 'oak'
The system issues an error message and will not allow you to continue with this transaction until the error is resolved.
Check your entry and correct it as appropriate. Please note also other
possible causes of error (messages).
Error message extract from SAP system. Copyright SAP SE.
28036
- Object variable expected ?The SAP error message "28036 Object variable expected" typically occurs in the context of SAP ABAP programming, particularly when dealing with object-oriented programming. This error indicates that the program is trying to use an object reference that has not been properly instantiated or is set to
NULL
.Cause:
Uninitialized Object Reference: The most common cause is that an object variable has been declared but not instantiated. For example, if you declare an object of a class but do not create an instance of that class using the
CREATE OBJECT
statement.Incorrect Object Assignment: If you are trying to assign an object reference from another variable that is not properly initialized, this can also lead to this error.
Scope Issues: The object might have gone out of scope, or it might not be accessible in the current context.
Solution:
Instantiate the Object: Ensure that you have created an instance of the object before using it. For example:
DATA: lo_object TYPE REF TO your_class. CREATE OBJECT lo_object.
Check Object Initialization: Before using the object, check if it is initialized:
IF lo_object IS NOT BOUND. CREATE OBJECT lo_object. ENDIF.
Review Object Assignments: Make sure that any assignments to object references are done correctly and that the source object is properly instantiated.
Debugging: Use the debugger to step through your code and check the state of your object references at runtime. This can help identify where the object is not being initialized.
Scope Management: Ensure that the object is within the correct scope and is not being destroyed or going out of scope before you attempt to use it.
Related Information:
By following these steps, you should be able to resolve the "28036 Object variable expected" error in your SAP ABAP programs.
Get instant SAP help. Start your 7-day free trial now.
28035
Key expected
What causes this issue? In the source code of the dependency, a key is expected. However, you did not enter a valid key. A valid key comprises alphan...
28034
Boolean expression expected
What causes this issue? A boolean expression is an expression that is evaluated as true or false. The syntax check found an error. A boolean expressi...
28037
Logical expression required
What causes this issue? The syntax check found an error. A logical expression, such as a value comparison, is expected at the cursor.System Response ...
28038
Numeric expression required
What causes this issue? The system check found a syntax error. At the cursor, the system expects a numeric expression, such as a figure, a numeric ch...
Click on this link to search all SAP messages.