09-23-2008 7:29 AM
Hi,
I created a super class. In that class i created a method. That method is having 4 input parameters and 4 export parameters.
I created a sub class for that super class. I need to use only 2 input parameters in this class rather than 4 parameters. I want to delete 2 Input parameters in the sub class of the super class method. Is it possible.
If possible. can we give an simple code or pseudo code?
regards,
krishna
09-23-2008 7:35 AM
Hello Krishna
You may define the two IMPORTING parameters which are not required for the sub-class as optional in the super-class method.
Regards
Uwe
09-23-2008 7:50 AM
Hi,
I think you can not.
Because, only public attributes can be inherited and they will remain public in the subclass.
for further detail check,
http://help.sap.com/saphelp_nw70/helpdata/en/1d/df5f57127111d3b9390000e8353423/content.htm
regards,
Anirban
09-23-2008 9:10 AM
Hi Krishna,
Its not possible to delete the method parameters in the subclass of superclass method. Rather you can set the unnecessary importing parameters as OPTIONAL.
Hope this would solve your issue.
Good luck
Narin