Stop googling SAP errors. Use our Free Essentials plan instead - no credit card needed. Start Now

Close

How To Fix WZ086 - Object reference could not be created


SAP Error Message - Details

  • Message type: E = Error

  • Message class: WZ - Workflow: Model objects

  • Message number: 086

  • Message text: Object reference could not be created

  • Show details Hide details
  • What causes this issue?

    Report &V1& can only be executed in background processing with a
    variant.

    System Response

    The job/step scheduling is aborted and the job is deleted.

    How to fix this error?

    Schedule report &V1& with a variant.

    Procedure for System Administrators

    The system issues an error message and will not allow you to continue with this transaction until the error is resolved.


    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message WZ086 - Object reference could not be created ?

    SAP Error Message:
    WZ086 - Object reference could not be created


    Cause:

    The error message WZ086 typically occurs when the SAP system tries to create an object reference in ABAP code but fails. This usually happens because:

    • The object class is not properly instantiated.
    • The constructor method of the class is not called or fails.
    • There is an issue with the object reference variable (e.g., it is not declared or initialized).
    • The system cannot allocate memory or resources for the object.
    • The object creation logic is incorrect or incomplete in the custom code or standard SAP program.

    In short, the system tries to create an object reference but the reference remains NULL or invalid.


    Solution:

    To resolve the WZ086 error, consider the following steps:

    1. Check the ABAP Code:

      • Verify that the object reference variable is declared correctly.
      • Ensure the object is instantiated using the CREATE OBJECT statement.
      • Example:
        DATA: lo_object TYPE REF TO zcl_my_class.
        CREATE OBJECT lo_object.
      • Make sure the constructor (CONSTRUCTOR) of the class does not raise exceptions or fail.
    2. Debug the Program:

      • Use the ABAP debugger to check where the object reference is supposed to be created.
      • Confirm if the CREATE OBJECT statement is executed successfully.
      • Check if the object reference variable is still initial (IS INITIAL) after the creation attempt.
    3. Check Class and Method Implementations:

      • Review the class definition and constructor method for any errors.
      • Ensure that all required parameters for object creation are passed correctly.
    4. Check for System or Memory Issues:

      • Although rare, insufficient memory or system resource issues can cause object creation to fail.
      • Check system logs (SM21) or short dumps (ST22) for related errors.
    5. Apply SAP Notes or Patches:

      • If this error occurs in standard SAP code, check SAP Support Portal for relevant SAP Notes.
      • Sometimes, this error is known and fixed in patches or support packages.

    Related Information:

    • Transaction Codes:

      • SE38 / SE80 - To check and debug the ABAP program.
      • ST22 - To check for any runtime dumps related to object creation.
      • SM21 - System log for any system-level errors.
    • Common ABAP Concepts:

      • Object references in ABAP are pointers to instances of classes.
      • CREATE OBJECT is mandatory to instantiate an object before using it.
      • Accessing methods or attributes of an uninstantiated object reference leads to runtime errors.
    • Example Scenario:

      DATA: lo_obj TYPE REF TO zcl_example.
      
      " Incorrect: no CREATE OBJECT
      lo_obj->method( ). " This will cause an error because lo_obj is initial
      
      " Correct:
      CREATE OBJECT lo_obj.
      lo_obj->method( ).

    Summary:

    • Cause: Object reference variable is not instantiated properly.
    • Solution: Ensure CREATE OBJECT is called successfully before using the object.
    • Check: ABAP code, constructor logic, debugger, system logs, and SAP Notes.

    If you provide the specific program or context where this error occurs, I can help you analyze the code in more detail.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Sign up for our Free Essentials Plan.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
ERPlingo simplifies finding the accurate answers to SAP message errors. I now use every week. A must have tool for anyone working with SAP! Highly recommended!
Rate 1
Kent Bettisworth
Executive SAP Consultant