<?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 Dump when using Widening Cast in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-when-using-widening-cast/m-p/1621861#M278210</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Variable declaration&lt;/P&gt;&lt;P&gt; DATA:&lt;/P&gt;&lt;P&gt;    lo_busobj     TYPE REF TO if_reca_bus_object,&lt;/P&gt;&lt;P&gt;    lo_sub TYPE REF TO zcl_reor_rental_request_ci,&lt;/P&gt;&lt;P&gt;    lo_parent TYPE REF TO cl_reor_rental_request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the super class -&amp;gt; cl_reor_rental_request&lt;/P&gt;&lt;P&gt; this is the sub class    -&amp;gt;zcl_reor_rental_request_ci&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lo_busobj - &amp;gt; this refrence contains the reference to the object 'cl_reor_rental_request'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to call the redefined method of my class zcl_reor_rental_request_ci. so for this i assign the object of the class (zcl_reor_rental_request_ci) to the interface reference. BUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is the already assigned referance of the super class has some attributes assigned in it so I need to copy those attributes in my sub class object and then pass it to the interface reference variable so that all operation are carried out as in normal case, otherwise if i direclty assign the newly created subclass object to the interface reference variable it will call the redefined method but the nothing will happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this reason i tried to assign the super class object to the sub class object i.e WIDENING CAST but it gives a dump&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*****************Part of DUMP************************
However, the current content of the source variable does not fit into the target variable.
 source type: "CLASS=CL_REOR_RENTAL_REQUEST"
 target type: "CLASS=ZCL_REOR_RENTAL_REQUEST_CI"
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help is very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Khusro Habib&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Oct 2006 12:39:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-15T12:39:45Z</dc:date>
    <item>
      <title>Dump when using Widening Cast</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-when-using-widening-cast/m-p/1621861#M278210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Variable declaration&lt;/P&gt;&lt;P&gt; DATA:&lt;/P&gt;&lt;P&gt;    lo_busobj     TYPE REF TO if_reca_bus_object,&lt;/P&gt;&lt;P&gt;    lo_sub TYPE REF TO zcl_reor_rental_request_ci,&lt;/P&gt;&lt;P&gt;    lo_parent TYPE REF TO cl_reor_rental_request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the super class -&amp;gt; cl_reor_rental_request&lt;/P&gt;&lt;P&gt; this is the sub class    -&amp;gt;zcl_reor_rental_request_ci&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lo_busobj - &amp;gt; this refrence contains the reference to the object 'cl_reor_rental_request'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to call the redefined method of my class zcl_reor_rental_request_ci. so for this i assign the object of the class (zcl_reor_rental_request_ci) to the interface reference. BUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is the already assigned referance of the super class has some attributes assigned in it so I need to copy those attributes in my sub class object and then pass it to the interface reference variable so that all operation are carried out as in normal case, otherwise if i direclty assign the newly created subclass object to the interface reference variable it will call the redefined method but the nothing will happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this reason i tried to assign the super class object to the sub class object i.e WIDENING CAST but it gives a dump&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*****************Part of DUMP************************
However, the current content of the source variable does not fit into the target variable.
 source type: "CLASS=CL_REOR_RENTAL_REQUEST"
 target type: "CLASS=ZCL_REOR_RENTAL_REQUEST_CI"
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help is very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Khusro Habib&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Oct 2006 12:39:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-when-using-widening-cast/m-p/1621861#M278210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-15T12:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dump when using Widening Cast</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dump-when-using-widening-cast/m-p/1621862#M278211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please send the screen shot of the dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes when u create some subclasses from main clases, some components(attributes and methods) have to be redefined. &lt;/P&gt;&lt;P&gt;It might not(generally will not) show these errors while checking, activating or generating your subclass. This could be one important problem for dump.&lt;/P&gt;&lt;P&gt;So check step wise or give some detailed context of the scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if satisfied&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Sandeep Josyula&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 09:05:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dump-when-using-widening-cast/m-p/1621862#M278211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-16T09:05:54Z</dc:date>
    </item>
  </channel>
</rss>

