<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Casting operator ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/casting-operator/m-p/1442905#M210447</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is used in ABAP objects.  It is uses when moving an object refernce from one to another.  For example.  Lets say tht you have an object vehicle and and object car.  Car is a vehicle, so the casting would be successful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vehicle ?= car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it was reverse the casting would fail, because vehicle is not car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;car ?= vehicle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Spread the wor(l)d!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jul 2006 17:30:58 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2006-07-19T17:30:58Z</dc:date>
    <item>
      <title>Casting operator ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/casting-operator/m-p/1442904#M210446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;Im reading the documentation on =? operator, and dont really understand how it works, can any body tell me its functionality?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajesh Thomas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 17:22:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/casting-operator/m-p/1442904#M210446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-19T17:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Casting operator ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/casting-operator/m-p/1442905#M210447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is used in ABAP objects.  It is uses when moving an object refernce from one to another.  For example.  Lets say tht you have an object vehicle and and object car.  Car is a vehicle, so the casting would be successful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vehicle ?= car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it was reverse the casting would fail, because vehicle is not car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;car ?= vehicle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Spread the wor(l)d!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 17:30:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/casting-operator/m-p/1442905#M210447</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-07-19T17:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Casting operator ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/casting-operator/m-p/1442906#M210448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This operator is used when ur widening the cast. i.e., assigning a reference of a superclass to a subclass.&lt;/P&gt;&lt;P&gt;for eg:&lt;/P&gt;&lt;P&gt;u have 3 classes airplane, cargo_airplane1, cargo_airplane2; airplane being the superclass and the other 2 being its subclasses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create object cargo_airplane1.&lt;/P&gt;&lt;P&gt;airplane = cargo_airplane1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cargo_airplane2 ?= airplane.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The type of case described above is known as a widening cast because it changes the view to one with more details. The instance assigned (a cargo plane in the above example) must correspond to the object reference (cargo_airplane1 in the above example), that is, the instance must have the details implied by the reference&lt;/P&gt;&lt;P&gt;The widening cast in this case does not cause an error because the reference airplane actually points to an instance in the subclass lcl_cargo_airplane. The dynamic type is therefore &amp;#145;REF TO lcl_cargo_airplane&amp;#146;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if u try creating an object of airplane and assign it to cargo_airplane1 directly -&lt;/P&gt;&lt;P&gt;cargo_airplane ?= airplane&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this would result in runtime error.&lt;/P&gt;&lt;P&gt;Here the widening cast produces the MOVE_CAST_ERROR  runtime error that can be caught with &amp;#147;CATCH ... ENDCATCH&amp;#148;, because the airplane reference does not point to an instance in the subclass lcl_cargo_airplane, but to a &amp;#147;general airplane object&amp;#148;. Its dynamic type is therefore &amp;#145;REF TO lcl_airplane&amp;#146; and does not correspond to the reference type cargo_airplane. &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hope it is clear now.&lt;/P&gt;&lt;P&gt;-Aarthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2006 06:15:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/casting-operator/m-p/1442906#M210448</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-20T06:15:47Z</dc:date>
    </item>
  </channel>
</rss>

