How To Fix OO087 - Only C destructors are currently supported


SAP Error Message - Details

  • Message type: E = Error

  • Message class: OO - Class Builder/API

  • Message number: 087

  • Message text: Only C destructors are currently supported

  • Show details Hide details
  • What causes this issue?

    A destructor is a special method that is automatically called when an
    object is deleted. You can use destructors to destroy resources that
    are used by the object but not taken into account by the garbage
    collector. There is not currently a destructor in ABAP Objects in which
    you can program a normal ABAP processing block.

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

    For special cases, and only for internal use, you can create the
    special predefined instance method DESTRUCTOR in the public section
    of the class.
    The implementation of the method DESTRUCTOR may currently only
    contain this one statement:
    SYSTEM-CALL C-DESTRUCTOR 'name' USING attr.

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message OO087 - Only C destructors are currently supported ?
    The SAP error message "OO087 Only C destructors are currently supported" typically occurs in the context of ABAP Object-Oriented programming when there is an attempt to use a destructor that is not compatible with the current implementation of the ABAP runtime environment.
    
    Cause: Non-C Destructor Usage: The error indicates that the destructor being defined or used is not a C-style destructor. In ABAP, destructors should be defined in a specific way that adheres to the C-style conventions. Incorrect Class Definition: The class might be defined in a way that is not compatible with the expected destructor format. Inheritance Issues: If the class is inheriting from another class that has a non-C destructor, it may lead to this error.
    Solution: Check Destructor Definition: Ensure that the destructor is defined correctly in your class. The destructor should be defined using the DESSTRUCTOR keyword and should not have any parameters. For example: CLASS my_class DEFINITION. PUBLIC SECTION.

    Already have an account? Login here!




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