<?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: How to get all class elements? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566862#M21934</link>
    <description>&lt;P&gt;Independently from what the OP meant, you cannot clear &lt;STRONG&gt;all&lt;/STRONG&gt; attributes by garbage collection but only instance attributes. Since he said "all elements from class", it is justified to assume that he meant all attributes including static attributes.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;The terms for your reference are defined in the &lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenabap_glossary.htm"&gt;ABAP Glossary&lt;/A&gt;, e.g. &lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenglobal_data_glosry.htm"&gt;global data&lt;/A&gt;, which, alas, are seldom use here .&lt;/P&gt;</description>
    <pubDate>Wed, 16 Aug 2017 05:19:32 GMT</pubDate>
    <dc:creator>retired_member</dc:creator>
    <dc:date>2017-08-16T05:19:32Z</dc:date>
    <item>
      <title>How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566846#M21918</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;
  &lt;P&gt;How to get all elements from class. &lt;/P&gt;
  &lt;P&gt;I want to clear all global variables. But I don't know, how I get all global elements from my Abap class.&lt;/P&gt;
  &lt;P&gt;I hope, you could help me.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 08:11:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566846#M21918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-08-15T08:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566847#M21919</link>
      <description>&lt;P&gt;An ABAP class doesn't have any global variables. All attributes are local to the class.&lt;/P&gt;
  &lt;P&gt;RTTI services can provide you all components of a class, use CL_ABAP_CLASSDESCR.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 08:27:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566847#M21919</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2017-08-15T08:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566848#M21920</link>
      <description>&lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenrtti.htm"&gt;CL_ABAP_CLASSDESCR&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;Loop over the attribute table, dynamic assign to field symbol (attribute must be visible), CLEAR field symbol. &lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 08:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566848#M21920</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-08-15T08:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566849#M21921</link>
      <description>&lt;P&gt;If you mean how to clear all statics in a class - write a method to do it and call that.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 10:16:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566849#M21921</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-08-15T10:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566850#M21922</link>
      <description>&lt;P&gt;I want to do this dynamic and don't want to clear every variable by hand.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 11:59:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566850#M21922</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-08-15T11:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566851#M21923</link>
      <description>&lt;P&gt;and how i could clear all these components or is it not possible?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 12:29:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566851#M21923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-08-15T12:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566852#M21924</link>
      <description>&lt;P&gt;I'd just create a new reference, let the garbage collector do the rest for you...&lt;/P&gt;
  &lt;P&gt;(after clearing all public and private variables the whole class is initial, isn't it? Or am I missing something?)&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 12:31:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566852#M21924</guid>
      <dc:creator>UweFetzer_se38</dc:creator>
      <dc:date>2017-08-15T12:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566853#M21925</link>
      <description>&lt;P&gt;@OP: What is your motivation for clearing the attributes of the instance? &lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 12:56:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566853#M21925</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2017-08-15T12:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566854#M21926</link>
      <description>&lt;P&gt;Loop over the attribute table, dynamic assign to field symbol, CLEAR field symbol. Basic stuff.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 13:09:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566854#M21926</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-08-15T13:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566855#M21927</link>
      <description>&lt;P&gt;How I get these attribute table. I don't manually used the CL_ABAP_CLASSDESCR before.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 13:37:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566855#M21927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-08-15T13:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566856#M21928</link>
      <description>&lt;P&gt;If you haven't done this before, then I would ask why you think you need to do it this way? &lt;/P&gt;
  &lt;P&gt;See answers from Uwe and Suhas. &lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 14:12:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566856#M21928</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2017-08-15T14:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566857#M21929</link>
      <description>&lt;P&gt;Have you even looked at it?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 14:19:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566857#M21929</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-08-15T14:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566858#M21930</link>
      <description>&lt;P&gt;OK for instance attributes. But I think the OP means static attributes by saying global variables.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 16:48:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566858#M21930</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-08-15T16:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566859#M21931</link>
      <description>&lt;P&gt;Then I would use a structure instead of single variables.&lt;/P&gt;
  &lt;P&gt;Dynamic programming just to clear variables would be "mit Kanonen auf Spatzen schießen" IMO. But possible of course.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 16:57:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566859#M21931</guid>
      <dc:creator>UweFetzer_se38</dc:creator>
      <dc:date>2017-08-15T16:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566860#M21932</link>
      <description>&lt;P&gt;If it's your class ...&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 17:07:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566860#M21932</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-08-15T17:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566861#M21933</link>
      <description>&lt;P&gt;Does that mean a public instance attribute is less global than a private static attribute? &lt;/P&gt;
  &lt;P&gt;Is there a globality ranking published somewhere I can use for future reference? &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 20:19:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566861#M21933</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2017-08-15T20:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566862#M21934</link>
      <description>&lt;P&gt;Independently from what the OP meant, you cannot clear &lt;STRONG&gt;all&lt;/STRONG&gt; attributes by garbage collection but only instance attributes. Since he said "all elements from class", it is justified to assume that he meant all attributes including static attributes.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;The terms for your reference are defined in the &lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenabap_glossary.htm"&gt;ABAP Glossary&lt;/A&gt;, e.g. &lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenglobal_data_glosry.htm"&gt;global data&lt;/A&gt;, which, alas, are seldom use here .&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 05:19:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566862#M21934</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-08-16T05:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566863#M21935</link>
      <description>&lt;P&gt;It was a joke. You assumed he meant static, but if someone inaccurately calls attributes global, which they clearly aren't (as I said in my first response), then they would not necessarily have the same view. &lt;/P&gt;
  &lt;P&gt;If we try to define the globularity (globulosity?) of scope vs lifetime, one could argue that that which is visible to the outside looks 'global', making a public 'more global' than a private static, even though it has a shorter lifetime. &lt;/P&gt;
  &lt;P&gt;But, just in case someone draws any conclusions, all of this is nonsense of course &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 08:19:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566863#M21935</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2017-08-16T08:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566864#M21936</link>
      <description>&lt;P&gt;Clearing &lt;EM&gt;all &lt;/EM&gt;the static attributes of a class indicates that your design is poor. I can't see why the complexity of doing it dynamically could be preferable. I've never written a class where this was needed, and I've written thousands.&lt;/P&gt;
  &lt;P&gt; Consider using the singleton pattern instead. Then you can have a static method that creates and new instance, and returns that (clearing the old one).&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 09:23:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566864#M21936</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-08-16T09:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to get all class elements?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566865#M21937</link>
      <description>&lt;P&gt;Your question is bit poor. Rather than ask how to implement your chosen solution to the programming problem, you should explain what you are trying to achieve in general. Then you may get other solutions that are better than your preferred one (dynamic clearing of static attributes, it seems). Furthermore, it means people don't have to guess at your intentions, thereby increasing the quality of the answers.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 09:25:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-get-all-class-elements/m-p/566865#M21937</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2017-08-16T09:25:18Z</dc:date>
    </item>
  </channel>
</rss>

