Comprehensive and Detailed Explanation From Exact Extract:
To redefine a component in a subclass:
The component (method) in the superclass must be defined with the FOR REDEFINITION addition.
In the subclass, you use the REDEFINITION clause in the method declaration and implement the method in the subclass to override the superclass behavior.
Thus:
Option A is correct because the method declaration in sub1 must include the REDEFINITION addition.
Option D is correct because the actual redefined method implementation must be provided in the subclass sub1.
Option B is incorrect because the component is not re-implemented in the superclass.
Option C is incorrect because REDEFINITION is not added in the superclass, but FOR REDEFINITION is.
[Reference: SAP Help 2, section on object-oriented ABAP programming with class-based components and redefinitions in inheritance structures., ===========]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit