Application Development and Automation 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: 
Read only

RE:ABAP objects

alex_georgek
Associate
Associate
0 Likes
393

hi all,

what do you mean by

CALL METHOD SUPER->CONSTRUCTOR

Thanks in advance,

Alex.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
375

It will call the Super class constructor.

This is only exceptional case we use "call method " for constructor.

wheneve we create a object of the class. The Instance constructor is executed.

ex:

class c1 definition.

public section.

methods: constructor.

endclass.

class c1 implementation.

method constructor.

some code.

endmethod.

endclass.

class c2 definition inheriting from c1.

public section.

methods: constructor.

endclass.

class c2 implementation.

method constructor.

  • calling the super class constructor.

call method super->construtor.

endmethod.

endclass.

start-of-selection.

data: obj type ref to c2.

create object obj.

If it helpful rewards ponits.

Regards

Pratap.M

2 REPLIES 2
Read only

Former Member
0 Likes
376

It will call the Super class constructor.

This is only exceptional case we use "call method " for constructor.

wheneve we create a object of the class. The Instance constructor is executed.

ex:

class c1 definition.

public section.

methods: constructor.

endclass.

class c1 implementation.

method constructor.

some code.

endmethod.

endclass.

class c2 definition inheriting from c1.

public section.

methods: constructor.

endclass.

class c2 implementation.

method constructor.

  • calling the super class constructor.

call method super->construtor.

endmethod.

endclass.

start-of-selection.

data: obj type ref to c2.

create object obj.

If it helpful rewards ponits.

Regards

Pratap.M

Read only

Former Member
0 Likes
375

Hai.

CALL METHOD SUPER->CONSTRUCTOR means you are calling superclass constructure directly.

regards.

sowjanya.b