Do you have any question about this error?
Message type: E = Error
Message class: OO - Class Builder/API
Message number: 087
Message text: Only C destructors are currently supported
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 theError message extract from SAP system. Copyright SAP SE.
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. METHODS: constructor, destructor. ENDCLASS. CLASS my_class IMPLEMENTATION. METHOD constructor. " Constructor logic ENDMETHOD. METHOD destructor. " Destructor logic ENDMETHOD. ENDCLASS.
Review Inheritance: If your class is inheriting from another class, check the parent class's destructor. Ensure that it is also defined correctly and adheres to the C-style destructor conventions.
Update ABAP Version: If you are using an older version of ABAP, consider updating to a newer version that may have better support for object-oriented features.
Consult Documentation: Refer to the official SAP documentation for object-oriented programming in ABAP to ensure compliance with the latest standards and practices.
Debugging: If the issue persists, use debugging tools to trace the execution and identify where the error is being triggered.
Related Information:
By following these steps, you should be able to resolve the "OO087 Only C destructors are currently supported" error in your ABAP code.
Get instant SAP help. Start your 7-day free trial now.
OO086
Constructors and destructors must be created explicitly
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
OO085
A &1 &2 has already been inherited from &3
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
OO088
There is no class, interface, or type group &1
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
OO089
Error formatting tabstrip control
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
Click on this link to search all SAP messages.