Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9063

Sub class constructor

$
0
0

Hi Folks,

 

I have created an exception class ZCX_SANJEEV_TEST1 which has a super class CX_STATIC_CHECK. As soon as I created the class, the following components came in automatically for the ZCX_SANJEEV_TEST1 class:

A. Two interfaces - IF_SERIALIZABLE_OBJECT and IF_MESSAGE

B. A constructor method CONSTRUCTOR and 3 other methods - IF_MESSAGE~GET_TEXT, IF_MESSAGE~GET_LONGTEXT and GET_SOURCE_POSITION.

 

As per my understanding, this constructor method is nothing but should only call Superclass's constructor, and that is exactly what it is doing. Now I have two questions over here:

1. When I inserted one more  interface IF_T100_MESSAGE in the class ZCX_SANJEEV_TEST1, the code in the constructor changed. Now along with calling the superclass constructor, there is some more code below it. Where is this code coming from? Moreover, the call to super->constructor has been changed. Now its just passing one parameter in the call rather than two as earlier.

2. I want to change this code a bit, how should I do it?

3. I want to add one more import parameter to this method. How should I do it?

 

A quick reply is appreciated.

 

Regards,

Sanjeev


Viewing all articles
Browse latest Browse all 9063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>