cancel
Showing results for 
Search instead for 
Did you mean: 

casting

Former Member
0 Kudos

Hi guys,

. What is the difference between narrowing cast and widening cast?

Thanks

Dinesh90

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Go to this website you will have a good idea about it

[CASTING|http://help-abap.zevolving.com/2008/09/abap-objects-narrowing-cast/]

Thanks

Karthik.R

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Following links will be useful for getting your answer.

Narrow casting : http://help-abap.zevolving.com/2008/09/abap-objects-narrowing-cast/

Widening Cast : http://help-abap.zevolving.com/2008/09/abap-objects-widening-cast/

Former Member
0 Kudos

Hi,

Narrow casting also called as 'upcasting' and wide casting also called as 'down casting' are concepts related to inheritance in object oriented prgramming.

Check the links which will give detailed explanation bout the same:

http://www.saptechnical.com/Tutorials/OOPS/Casting/Index.htm

http://allsapabap.blogspot.com/2008/12/abap-objects-narrowing-cast-upcasting.html

Thank you

Former Member
0 Kudos

can u say me in detail

Dinesh90

Former Member
0 Kudos

hi,

If we copy an instance of sub class to super class its called narrowing cast and the vise versa of it is widening cast.

Thanks

Karthik.R