How to type casting in OOPS ABAP and ABAP ?
Answers were Sorted based on User's Feedback
Answer / rs agarwal
1. Narrow casting
2. Wide casting
Demo on "Narrow Casting" Parent class->M1 , Child class-
>M1,M2
Attributes of super class can only be accessed.
Methods defined at Super class(M1) can only be accessed.
Methods with REDEFINED Logic(M1) will be called
Methods in child class (M2) cannot be accessed
Demo on "Wide Casting" Parent class->M1 , Child class->M1,M2
Assign address of PARENT to CHILD Class object
Methods defined at child class(M2) can also be accessed
with Parent reference.
Methods with REDEFINED Logic (M1) will be called
The cast is only possible if the object was instantiated as
the child and then it was casted to the parent object and
then back again to the child object. The child has
everything the parent has so there is no problem with this
path.
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / anil kumar
two types of casting
1.narrow casting
2.wide casting
it will comes under inheritance concepts.
like creating object for subclass by using that object we
will call super class methods
Is This Answer Correct ? | 3 Yes | 2 No |
can labels generate in smartforms?if yes how?
What are Views, how they were useful. Types of Views
What is the role of an abapper in developement process? What is the process of technical specification and how it is carried out?
what are obsolete function modules FROM version 4.5b to ECC 6.
MY DOMAIN IS SAP-ABAP COMPARE TO WEBDYNPRO AND CRM-TECHNICAL WHICH IS BEST?
how to genernate 21 sencondary index
what is template in smartform?
How will you find manager of an employee
How can u transfer the data from one itab to another without using move & write statements?
what is a ticket?
SAP ABAP Training Bangalore-Course Content Outline
Explain about sap fico testing and the tools used? : abap bdc