<?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: Get Classname in static Methods in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-classname-in-static-methods/m-p/3895178#M935084</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;static methods cannot be redefined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2008 03:55:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-05T03:55:12Z</dc:date>
    <item>
      <title>Get Classname in static Methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-classname-in-static-methods/m-p/3895177#M935083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Object-Gurus,&lt;/P&gt;&lt;P&gt;i want to inherit a static factory method which contains the following  code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: lr_obj type ref to object,&lt;/P&gt;&lt;P&gt;          l_moff type i,&lt;/P&gt;&lt;P&gt;          l_classname type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  get current classname&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      FIND '=' IN sy-repid MATCH OFFSET l_moff.&lt;/P&gt;&lt;P&gt;      l_classname = sy-repid(l_moff).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    create object&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CREATE OBJECT lr_obj TYPE (l_classname).&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that when this method is started in a subclass,&lt;/P&gt;&lt;P&gt;sy-repid contains the name of the topclass. So the type of lr_obj is not the one i expected.&lt;/P&gt;&lt;P&gt;I don't want to use an attribute holding the classname, so is there a way to get the name of the subclass?&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;Patric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jun 2008 12:11:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-classname-in-static-methods/m-p/3895177#M935083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-04T12:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get Classname in static Methods</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-classname-in-static-methods/m-p/3895178#M935084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;static methods cannot be redefined.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2008 03:55:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-classname-in-static-methods/m-p/3895178#M935084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-05T03:55:12Z</dc:date>
    </item>
  </channel>
</rss>

