<?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 access a class instance variable from ABAP Callstack. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-a-class-instance-variable-from-abap-callstack/m-p/7263861#M1529298</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;I don't think you'll be able to access the class directly! This will impact the encapsulation design of OOPs, you'll be able to access the PRIVATE &amp;amp; PROTECTED attributes of that class!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should try to access the Object Reference variable defined in the program. Suppose you've an obj. ref. variable defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: OBJ_REF TYPE REF TO CL_SOMECLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try to access the variable OBJ_REF from the call stack:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;OBJ&amp;gt; TYPE OBJECT.
ASSIGN ('OBJ_REF') TO &amp;lt;OBJ&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i'm clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Oct 2010 06:58:22 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2010-10-04T06:58:22Z</dc:date>
    <item>
      <title>How to access a class instance variable from ABAP Callstack.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-a-class-instance-variable-from-abap-callstack/m-p/7263860#M1529297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to access a varable in one of the method in ABAP stack&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Event Type_____Event____________________________Program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;METHOD______IF_EX_ME_GUI_PO_CUST~EXECUTE__ZCL_IM_PTP_PO_CUSTM_FLDS======CP  &lt;STRONG&gt;--&amp;gt;&lt;/STRONG&gt;  I am here&lt;/P&gt;&lt;P&gt;METHOD______IF_EX_ME_GUI_PO_CUST~EXECUTE__CL_EX_ME_GUI_PO_CUST==========CP&lt;/P&gt;&lt;P&gt;METHOD______EXECUTE________________________SAPLMEGUI&lt;/P&gt;&lt;P&gt;METHOD______EXECUTE________________________CL_COMPOSITE_SCREEN_VIEW_MM===CP  &lt;STRONG&gt;--&amp;gt;&lt;/STRONG&gt; need to access here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to access using the below code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: LV type string.
FIELD-SYMBOLS: &amp;lt;FS&amp;gt; TYPE ANY.

LV = '(CL_COMPOSITE_SCREEN_VIEW_MM===CP)WA-VIEW'.
ASSIGN (LV) TO &amp;lt;FS&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the field symbol is unassigned. Is there any other way to access the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vipin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Oct 2010 17:25:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-a-class-instance-variable-from-abap-callstack/m-p/7263860#M1529297</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-10-01T17:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to access a class instance variable from ABAP Callstack.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-a-class-instance-variable-from-abap-callstack/m-p/7263861#M1529298</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;I don't think you'll be able to access the class directly! This will impact the encapsulation design of OOPs, you'll be able to access the PRIVATE &amp;amp; PROTECTED attributes of that class!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should try to access the Object Reference variable defined in the program. Suppose you've an obj. ref. variable defined like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: OBJ_REF TYPE REF TO CL_SOMECLASS.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try to access the variable OBJ_REF from the call stack:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS: &amp;lt;OBJ&amp;gt; TYPE OBJECT.
ASSIGN ('OBJ_REF') TO &amp;lt;OBJ&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i'm clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Oct 2010 06:58:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-a-class-instance-variable-from-abap-callstack/m-p/7263861#M1529298</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-10-04T06:58:22Z</dc:date>
    </item>
  </channel>
</rss>

