<?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 comparing two objects if they belong to same class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-objects-if-they-belong-to-same-class/m-p/7005029#M1495830</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;do we have any way of determining this? like what we have in java&lt;/P&gt;&lt;P&gt;instance.getClass().getName(); &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;AS...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jun 2010 12:11:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-22T12:11:03Z</dc:date>
    <item>
      <title>comparing two objects if they belong to same class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-objects-if-they-belong-to-same-class/m-p/7005029#M1495830</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;do we have any way of determining this? like what we have in java&lt;/P&gt;&lt;P&gt;instance.getClass().getName(); &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;AS...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2010 12:11:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-objects-if-they-belong-to-same-class/m-p/7005029#M1495830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-22T12:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: comparing two objects if they belong to same class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-objects-if-they-belong-to-same-class/m-p/7005030#M1495831</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;thanks...got the solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;posting code here for someone else looking for the same thing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data obj1 type ref to ZCL_OO_TEST.
data obj2 type ref to ZCL_WORKLOAD_TEXTS.
create object obj1.
create object obj2.

ref_descr ?=
    cl_abap_typedescr=&amp;gt;describe_by_object_ref( obj1 ).
    class_name = ref_descr-&amp;gt;get_relative_name( ).

    ref_descr ?=
    cl_abap_typedescr=&amp;gt;describe_by_object_ref( obj2 ).
    class_name2 = ref_descr-&amp;gt;get_relative_name( ).

    write: class_name,
           class_name2.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AS....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2010 12:35:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/comparing-two-objects-if-they-belong-to-same-class/m-p/7005030#M1495831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-22T12:35:46Z</dc:date>
    </item>
  </channel>
</rss>

