<?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: Convert object type in another object (OO programming) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741184#M1301646</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of getting referance why don't you try like this ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

gr_acc1 = gr_acc

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And while accessing the methods , you need to sure about what kind of method you are accessing to like is it an instataneous object or a static object, and then access it accordingly.&lt;/P&gt;&lt;P&gt;Because if you are trying to access a static method by an instantaneous method call, then you are going  to have a syntax error saying method does not exists.This implies to the objects also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhinab Mishra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S : This may not be a correct solution as I am still at the learning stage of ABAP OO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2009 17:53:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-01T17:53:18Z</dc:date>
    <item>
      <title>Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741183#M1301645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Forum, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem to solve but i dont know how. I have a standar report and i need to insert some modifications...for my bussines requeriments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this type:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA gr_acc              TYPE REF TO object.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my problem is that i need to access to a method of this object ( in dinamic mode this object is this class: CL_PRWB_ACCESS_LINK_UI, and when i try to access to method, for example: GET_SELECTED_ROWS, i cant because is unkown, protected or private.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My solution is to create another object for example this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA gr_acc1            TYPE REF TO CL_PRWB_ACCESS_LINK_UI.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i try to convert to my type i cant.....&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;GET REFERENCE OF GR_ACC INTO GR_ACC1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Because &lt;U&gt;it is not compatible...&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i access to a method of this generic abap type or convert this data for my propuse¿?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Peruches on Jun 1, 2009 5:35 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 17:35:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741183#M1301645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-01T17:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741184#M1301646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of getting referance why don't you try like this ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

gr_acc1 = gr_acc

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And while accessing the methods , you need to sure about what kind of method you are accessing to like is it an instataneous object or a static object, and then access it accordingly.&lt;/P&gt;&lt;P&gt;Because if you are trying to access a static method by an instantaneous method call, then you are going  to have a syntax error saying method does not exists.This implies to the objects also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhinab Mishra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S : This may not be a correct solution as I am still at the learning stage of ABAP OO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 17:53:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741184#M1301646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-01T17:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741185#M1301647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you already have reference of class &lt;EM&gt;CL_PRWB_ACCESS_LINK_UI&lt;/EM&gt; in &lt;EM&gt;gr_acc&lt;/EM&gt; you can access its method dynamically with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: method_name(17) type c value 'GET_SELECTED_ROWS'.

"you call method as it would be static call, only difference is that you determine methods name during runtime 
call method gr_acc-&amp;gt;(method_name)
    exporting ...
    importing ...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or statically with&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA gr_acc              TYPE REF TO object.
DATA gr_acc1            TYPE REF TO CL_PRWB_ACCESS_LINK_UI.

gr_acc1 ?= gr_acc.  "here you never know what real type of OBJECT is therefore you have to use down cast ?= operator

"now you can call the method statuically as gr_acc1 us typed with your class and system recognize it during syntax check
call method gr_acc1-&amp;gt;get_selected_rows
      exporting ..
      importing....
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here some explanation. An &lt;EM&gt;object&lt;/EM&gt; class is a root class in inheritance hierarchy (which means all subordinate classes inherit from that one), therefore if you want to assing its reference to any of subordinate class you need to use &lt;EM&gt;down cast&lt;/EM&gt; operator (?=).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now some explanations:&lt;/P&gt;&lt;P&gt;Image that you have a VEHICLE (our &lt;EM&gt;object&lt;/EM&gt; class). Now you have subordinate class - a PLAIN (here our CL_PRWB_ACCESS_LINK_UI class).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when you do assignment between classes you have to take following under consideration:&lt;/P&gt;&lt;P&gt;1) is PLAIN always a VEHICLE ?&lt;/P&gt;&lt;P&gt;2) is VEHICLE always a PLAIN ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First question is easy. It is always true. But the second not necessarly. The VEHICLE can be i.e. a CAR, a TRUCK, a SHIP etc. This is how we do an assignment:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data: r_vehicle type ref to vehicle,
         r_plain type ref to plain.

create object r_plain.

"first case 
r_vehicle = r_plain.   

"second case
r_plain ?= r_vehicle. "static type of r_vehicle is VEHICLE, but dynamica type is PLAIN, so the assignment is possible

"but if you do such thing
data: r_car type ref to car.

r_vehicle = r_car.
r_plain ?= r_vehicle.  "the system will dump out, because dynamic type of r_vehicle is CAR, not a PLAIN
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is why we need to use &lt;EM&gt;down cast&lt;/EM&gt; operator. BTW: what we did here&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
r_vehicle = r_plain.   
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is called &lt;EM&gt;up cast&lt;/EM&gt; which is swithing from more detail view to more general one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Castng is one of basics of polimorphism, which is the most powerful methodology in OO programing. I recommend you go through some SAP documentation to deepen the topic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2009 21:58:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741185#M1301647</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-01T21:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741186#M1301648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I donot think so that u would be able to use this bcoz this is private.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can only call a method or attribute of Private/Protected class only by the instance of the class which uses/instantiate  ur private class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way to do this is to call some method of another class which instantiate this object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajiv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 04:25:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741186#M1301648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-02T04:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741187#M1301649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  Abhinab Mishra, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to asign directly this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;gr_acc1 = gr_acc.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and dont work. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 07:54:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741187#M1301649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-02T07:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741188#M1301650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally I use yoy solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dinamic mode:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data: method_name(17) type c value 'GET_SELECTED_ROWS'.
 
"you call method as it would be static call, only difference is that you determine methods name during runtime 
call method gr_acc-&amp;gt;(method_name)
    exporting ...
    importing ...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 07:56:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741188#M1301650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-02T07:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741189#M1301651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One question more. How can i access to an attribute?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;data attribute(15) type c value 'GV_SOURCE_GUID'.
gr_acc1 ?= gr_acc.

** guid:
guid1 = gr_acc1-&amp;gt;(attribute). " not work&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and thanks.&lt;/P&gt;&lt;P&gt;Mon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 08:31:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741189#M1301651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-02T08:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741190#M1301652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you should use static access, as no dynamic one for attributes exists. So litte correction:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
gr_acc1 ?= gr_acc.
 
guid1 = gr_acc1-&amp;gt;GV_SOURCE_GUID. " now should work:)
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that you can address it statically because you use gr_acc1 whose static type is your class cl_... &lt;/P&gt;&lt;P&gt;So the compilator recognizes it during syntax check. But during runtime, gr_acc1 can contain different dynamic type.&lt;/P&gt;&lt;P&gt;Generally: for compilator &lt;EM&gt;static&lt;/EM&gt; type is important, for runtime environment &lt;EM&gt;dynamic&lt;/EM&gt; one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Marcin Pciak on Jun 2, 2009 11:16 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 09:16:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741190#M1301652</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-02T09:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741191#M1301653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, i cant...error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Access to protectd attribute "GV_SOURCE_GUID" is not allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 09:32:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741191#M1301653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-02T09:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741192#M1301654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If an attribute is proteced you can't access it from outside the class, but you can create your custom class which inherits from this class and here all protected attributes are visible. &lt;/P&gt;&lt;P&gt;This is a trick which allows you to enlarge visibility section outside the class itself, but is not a good practise. &lt;/P&gt;&lt;P&gt;If an attribute is &lt;EM&gt;protected&lt;/EM&gt; it means it was intended not to be changed form outside. It is most likely that there is some method which allows to change this attribute, but not directly by accessing it - so please first look for one. &lt;/P&gt;&lt;P&gt;This is important, as the state of your object can become inconsistent when you just change attributes from outside.&lt;/P&gt;&lt;P&gt;If you just want to read it and don't find appropriate method for this task, use the approach explained above. This could be coded like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"you class which inherits from the above one
class lcl_myclass definition inheriting from CL_PRWB_ACCESS_LINK_UI.
   public section.
     "to read attribute we will use functional method (so the one which returns some value)
     methods: read_attribute  importing class_ref   "we pass reference to above class here
                                             returning value(attr_value).   "parameter must be returned by VALUE not REFERENCE (which is by default)
 
endclass.

"now implementation
class lcl_myclass implementation.
   method read_attribute.
      "here you can access PROTECTED attributes of cl_... class
      if class_ref is bound. "check if contains some object reference
             attr_value = class_ref-&amp;gt;GV_SOURCE_GUID.  "this way our method returns attribute value
     endif.
   endmethod.
endclass.

"now how we call it

"first create your object normaly
gr_acc1 ?= gr_acc.

"then create an object of our new class
data: gr_myclass type ref to lcl_myclass.

create object gr_myclass.

"and get attribute by means of our new method
guid1 = gr_myclass-&amp;gt;read_attribute( class_ref = gr_acc1 ).  "we pass gr_acc1 reference so inside the method we read its attribute
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's all you need&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 09:51:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741192#M1301654</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-02T09:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741193#M1301655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin again, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry to border you again...but when i try to define the firts class it apears an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The final class "CL_PRWB_ACCESS_LINK_UI" cannot have any subclasses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and thanks...&lt;/P&gt;&lt;P&gt;Mon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 10:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741193#M1301655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-02T10:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert object type in another object (OO programming)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741194#M1301656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again Mon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunatelly if the class is final, you can't derive any new classes from it, therefore there is no way you can access this &lt;EM&gt;protected&lt;/EM&gt; attribute. You must look for a method which allows that. Otherwise you can't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I recommend you is go to se24-&amp;gt;type in your class-&amp;gt;Display-&amp;gt;Attributes-&amp;gt;place cursor on GV_SOURCE_GUID -&amp;gt; choose WHERE USED icon in application toolbar -&amp;gt;. leave only selection &lt;EM&gt;Classes&lt;/EM&gt; . Now you have listed all classes and methods where it is used. Review them (only methods of your class) and try to deduct which might return value of that attribute. It can also be that,  none of them do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, as I told you. Classes in order to stay consistent musn't be handled from the outside. The solution I gave you in last post, is just and overcoming way, though is not a good practice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 11:08:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-object-type-in-another-object-oo-programming/m-p/5741194#M1301656</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-06-02T11:08:01Z</dc:date>
    </item>
  </channel>
</rss>

