Message type: E = Error
Message class: OO - Class Builder/API
Message number: 118
Message text: Methods cannot be both abstract and final
Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of messages in the SAP system have a message text, however this is frequently insufficient to comprehend or resolve the problem.
To make things easier, more detailed information is frequently added to describe the issue, how to fix it, and the necessary steps or configuration modifications.
Unfortunately, there isn't any extra information in this error notice.
First, use our AnswerBot below to get a possible cause and solution (requires a premium subscription).
Also, review the in-depth Common Questions & Answers listed below; you could discover a solution there or be able to connect with others who have faced similar challenges.
You can also try searching the SAP support portal (support.sap.com) but you need a special user ID to access it. It is possible that an SAP support note exists that provides additional details about the mistake or even steps for fixing it.
OO118
- Methods cannot be both abstract and final ?The SAP error message OO118, which states "Methods cannot be both abstract and final," typically occurs in ABAP Object-Oriented programming when there is a conflict in the method definition of a class. Specifically, it indicates that a method is being declared as both ABSTRACT and FINAL, which is not allowed in ABAP.
Cause: Abstract Method: An abstract method is a method that is declared without an implementation. It must be implemented in any subclass that inherits from the class containing the abstract method. Final Method: A final method is a method that cannot be overridden in any subclass. It has a complete implementation and is intended to be used as is. Since an abstract method is meant to be overridden and a final method is not, declaring a method as both creates a logical contradiction, leading to this error.
Solution: To resolve this error, you need to modify the method declaration in your class. You should
Get instant SAP help. Sign up for our Free Essentials Plan.
OO117
Type & cannot be referenced using LIKE
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
OO116
For event-handling methods the event must be fully specified.
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
OO119
Protected methods should not be final
Self-Explanatory Message Since SAP believes that this specific error message is 'self-explanatory,' no more information has been given.The majority of...
OO120
A private method cannot be final (they are not inherited by subclasses)
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.