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 |
Explain what is sap script?
What is Set Screen and Leave screen?
Hello All, Requesting to all user of this site. Please post your Questions in Proper sub Category of chosen category. Some users post the questions in common category whether sub category for that is available ..like some users still post the SAP Script & ALE Related questions in common ABAP Category. Due to this it becomes very difficult to find the topic wise Questions. Please cooperate with the site & to other users. Thanks & Regards Tamseel
How do you write a squential file
Explain the advantage of structures?
what are the Uploading tools you have used?
What is the use of the raising exception?
explaine about factory calender.
What is the difference between free and refresh?
Hi Everyone, Can one any explain the situation where we can exactly use the events and also explain the diff. between LIKE AND TYPE. Am new one of sap-abap. Thanks in advance Jaya DS
what is result set of an inner join at database level ?
Can you set up background processing using call transaction?