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 |
how to debug a screen without using /h,break-point,debuging,stop.
What are the types of table fields in the sap abap?
What all are the differences did you find in hr module between 4.7 and ECC6 versions
I have 100 records and 75th record contains error,if i use call transaction how many records will update the data base and if i use session method how many will update?
what is itcsy structure? what is the importance of it? give me the detailed information of it ?
If BDC is developed in Development system with no data , where do we do the recording?
How many primary keys can be created for a table?
can any one tell me the following question's answer 1. How can we create PUSH Botton in presentation layer. 2.How can we print the record. 3.If database has nor records & if we write 'for all entries' in select statement then what will be happen.
What are internal tables? How do you get the number of lines in an internal table?
how u define that idoc is generated for ale or edi method ?
what is the difference between view and join
What are the events used for logical database?