<?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: Accesing  attribute from caller class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accesing-attribute-from-caller-class/m-p/7787783#M1586104</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Suhas, Piotrzym&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With your tips i know now just what i needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Apr 2011 17:16:31 GMT</pubDate>
    <dc:creator>former_member425121</dc:creator>
    <dc:date>2011-04-13T17:16:31Z</dc:date>
    <item>
      <title>Accesing  attribute from caller class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accesing-attribute-from-caller-class/m-p/7787780#M1586101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to acces in some class wich i enhanced the attribute from other class wich is some levels up in the executing route.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mean:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS_A   calls    CLASS_B   calls    MY_ENHANCED_CLASS-&amp;gt;methodX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLASS_A is wich has the attribute i need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in  MY_ENHANCED_CLASS-&amp;gt;methodX   i need to acces the CLASS_A-&amp;gt;attribute  (but it's a instance private attribute).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to make this acces in code ?  or because the attribute is private this is not possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be usefull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 01:39:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accesing-attribute-from-caller-class/m-p/7787780#M1586101</guid>
      <dc:creator>former_member425121</dc:creator>
      <dc:date>2011-04-13T01:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Accesing  attribute from caller class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accesing-attribute-from-caller-class/m-p/7787781#M1586102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; So in  MY_ENHANCED_CLASS-&amp;gt;methodX   i need to acces the CLASS_A-&amp;gt;attribute  (but it's a instance private attribute).&lt;/P&gt;&lt;P&gt;&amp;gt; Is there any way to make this acces in code ?  or because the attribute is private this is not possible ?&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this is a continuation to your previous question &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you must be knowing cannot access the pvt attribute directly so need some "dirty" workaround. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like exporting the value of this attribute to ABAP memory by enhancing the class &amp;amp; accessing the ABAP memory in your method!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I say "dirty" workaround because Private attributes are not meant to be shared outside of the classes. Of course "Friend" classes can access the pvt elements as well &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 04:23:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accesing-attribute-from-caller-class/m-p/7787781#M1586102</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-04-13T04:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Accesing  attribute from caller class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accesing-attribute-from-caller-class/m-p/7787782#M1586103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the other way to work this around is to create a method in Class A, which will return the desired attribute. Then, you just call it in the place, you want to have the attribute value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might need to pass the instance of Class A to the method, so it isn't the nicest solution though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 09:29:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accesing-attribute-from-caller-class/m-p/7787782#M1586103</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-13T09:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Accesing  attribute from caller class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accesing-attribute-from-caller-class/m-p/7787783#M1586104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Suhas, Piotrzym&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With your tips i know now just what i needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Apr 2011 17:16:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accesing-attribute-from-caller-class/m-p/7787783#M1586104</guid>
      <dc:creator>former_member425121</dc:creator>
      <dc:date>2011-04-13T17:16:31Z</dc:date>
    </item>
  </channel>
</rss>

