Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

reg. oops...implementation of abstract method in se24...have ur ponts..

Former Member
0 Kudos

Hi all,

In SE24 i made an abstract class & made a method abstract successfully.

Now i made another class that inherited my abstract class, it is showing my abstract method there.

Now when i want to give implementation to that method, but when i double click on that system is showing "method is abstract & has not yet redefined".

Pleas let me know..how i implement it..

Thanx in advance..

<b>Have ur point.s</b>

1 ACCEPTED SOLUTION

Former Member
0 Kudos

in sub class....goto utilities->settings> check checkbox 'display inhereted components too>highlight the method > select redefine button ( which is after find next button)> now u will be taken to implementation part where u can write code.

Regards

Vasu

5 REPLIES 5

Former Member
0 Kudos

hi,

Better to post ur forum in abab object.

thanks in advance.

seema

former_member480923
Active Contributor
0 Kudos

With regard to their declaration, interfaces in ABAP Objects play the same role as classes. Just like classes, interfaces are object types that reside in the namespace of all types. While a class describes all aspects of a class, an interface only describes a partial aspect. As mentioned above, standalone interfaces can be regarded as special abstract classes without implementation that can be used in multiple classes.

Just include the interface into ur standard class.

Hope Thats Helps

Anirban M.

Former Member
0 Kudos

in sub class....goto utilities->settings> check checkbox 'display inhereted components too>highlight the method > select redefine button ( which is after find next button)> now u will be taken to implementation part where u can write code.

Regards

Vasu

0 Kudos

g8 vashu!!!

thank u very much yaar...

Former Member
0 Kudos

Hi

Inheritance Inheritance defines the implementation relationship between classes, in which one class (the subclass) shares the structure and the behavior defined in one or more other classes (superclasses). Note: ABAP Objects only allows single inheritance.

Inheritance is a relationship, in which one class (the subclass) inherits all the main characteristics of another class (the superclass). The subclass can also add new components (attributes, methods, and so on) and replace inherited methods with its own implementations.

<b>Single Inheritance</b>

ABAP Objects only has single inheritance.

A class may only have one direct superclass, but it can have more than one direct subclass. The empty class OBJECT is the root node of every inheritance tree in ABAP Objects.

<b>Relationship between Superclasses and Subclasses</b>

Common components only exists in the superclass

new components in the supercalss are automatically available in subclass

amount of new coding is reduced ( programing by difference)

Subclass are extremely dependent on superclases

white box reuse – subclass must possess detailed knowledge of the implementation of the superclass

<b>Inheritance: Syntax</b>

Normally the only other entry required for subclasses is what has changed in relation to the direct superclass. Only additions are permitted in ABAP Objects, that is, in a subclass you can "never take something away from a superclass". All components from the superclass are automatically present in the subclass.

<b>Class name defination.

public section.

methods. First name importing some type some type

returning value(value) type some type.

private section

data : make type string..

Endclass.

Class name1 definition inheriting name

public section

method. : get returning value ( value) type get.

Priavte section.

data : max type some type

endclass</b>

<b> Redefining methods</b>

The REDEFINITION statement for the inherited method must be in the same SECTION as the definition of the original method.

If you redefine a method, you do not need to enter its interface again in the subclass, but only the name of the method.

In the case of redefined methods, changing the interface (overloading) is not permitted; exception: Overloading is possible with the constructor.

Within the redefined method, you can access components of the direct superclass using the SUPER reference.

The pseudo-reference super can only be used in redefined methods.

reward if usefull