What is up-casting and down casting? with example

Answer Posted / naresh bammidi

The assignment of a subclass instance to a reference
variable of the type "reference to super class" is
described as a narrowing cast, because you are switching
from a more detailed view to a one with less detail. It is
also called as up-casting.

Is This Answer Correct ?    12 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

1.why dont use top of page. wat is the use? 2. wat is sub screen? 3. why u select the session method in bdc ? how many records wil be updated on that time? 4.why dont use start form in script? 5.wat is difference b/w dilldown and interactive report? 6. wat is pf status interactine report?

2573


What is the difference between the exits created in M.M and S&D?

1810


I am trying to automate a manual processing of iDOCs in BD87. I used the following code to pass idoc-id to global variable 'DCN' and then skip the first screen of BD87 to go to processing directly. After running this code SET PARAMETER ID 'DCN' FIELD itabhdr-idoc_id. CALL TRANSACTION 'BD87' AND SKIP FIRST SCREEN. it takes me to the first screen because it cannot recognize my idoc-id. How I can pass idoc-id to global? I have used the above code to goto VA02 with VBELN and it worked perfectly.

1996


What is asynchronous and synchronous update?

751


What are internal tables? : abap hr

712






What is the function module for INDIAN PAYROLL to read table cluster for given cluster table and sequence number?

2056


Explain how data is stored in cluster table?

879


Explain the differences between sap memory and abap memory?

713


Can we specify the next screen number with a variable?

722


How do we assign dynamic views while creating material master and generating bdc? : abap bdc

866


What is PS structure

1824


Explain how to create any functions?

786


Differentiate between the uline and write: sy-uline statements if any?

923


Have you printed any report?

1950


How do you get the number of lines in an internal table? How to use a specific number occurs statement?

689