<?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 Accessing Objects from a Class in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700695#M625419</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 have a process that calls a method from a class, at runtime, the object creates a reference and in the reference I need to access an object, basically this is what I have at run time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Object: WA_OBJECT&lt;/P&gt;&lt;P&gt;Reference: &lt;SPAN __jive_macro_name="O"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I double click on my object I get the following sub objects:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CL_PT_REQ_HEADER&lt;/P&gt;&lt;P&gt;   IF_PT_REQ_HEADER~CURRENT_VERSION&lt;/P&gt;&lt;P&gt;   IF_PT_REQ_HEADER~MAX_VERSION_NO&lt;/P&gt;&lt;P&gt;   IF_PT_REQ_HEADER~MY_REQUEST&lt;/P&gt;&lt;P&gt;   ITEM_TAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I double click on any of those items, it is fine in debugging, I can see the values, but in my program, I need to access the ITEM_TAB internal table, now I cannot use WA_OBJECT-ITEM_TAB. If I double click on the ITEM_TAB, now the main object becomes &lt;SPAN __jive_macro_name="O"&gt;&lt;/SPAN&gt;-ITEM_TAB[1], so cannot reference to that object in my program, so the question is how do I access the table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2007 21:12:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-28T21:12:54Z</dc:date>
    <item>
      <title>Accessing Objects from a Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700695#M625419</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 have a process that calls a method from a class, at runtime, the object creates a reference and in the reference I need to access an object, basically this is what I have at run time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Object: WA_OBJECT&lt;/P&gt;&lt;P&gt;Reference: &lt;SPAN __jive_macro_name="O"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I double click on my object I get the following sub objects:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CL_PT_REQ_HEADER&lt;/P&gt;&lt;P&gt;   IF_PT_REQ_HEADER~CURRENT_VERSION&lt;/P&gt;&lt;P&gt;   IF_PT_REQ_HEADER~MAX_VERSION_NO&lt;/P&gt;&lt;P&gt;   IF_PT_REQ_HEADER~MY_REQUEST&lt;/P&gt;&lt;P&gt;   ITEM_TAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I double click on any of those items, it is fine in debugging, I can see the values, but in my program, I need to access the ITEM_TAB internal table, now I cannot use WA_OBJECT-ITEM_TAB. If I double click on the ITEM_TAB, now the main object becomes &lt;SPAN __jive_macro_name="O"&gt;&lt;/SPAN&gt;-ITEM_TAB[1], so cannot reference to that object in my program, so the question is how do I access the table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 21:12:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700695#M625419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T21:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Objects from a Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700696#M625420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Enrique&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITEM_TAB is a &amp;lt;i&amp;gt;public &amp;lt;/i&amp;gt;instance attribute of class CL_PT_REQ_HEADER. Thus, you can directly access them using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA:
  ls_item    TYPE PTREQ_ITEMS_STRUC,
  lo_item    TYPE IF_PT_REQ_ITEM.

  LOOP AT wa_object-&amp;gt;item_tab INTO ls_item.
    lo_item = ls_item-item.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 21:55:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700696#M625420</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-08-28T21:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Objects from a Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700697#M625421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Uwe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your prompt answer. Now that you mention it, I forgot to specify the fact that only the first Items are public, but the table is protected and I cannot do a simple loop at it the way you mentioned. That is the first thing I tried but wa_object-&amp;gt;item_tab is not recognized when I ckeck syntax. I should have also mentioned that WA_OBJECT gets referenced ar runtime.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 22:01:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700697#M625421</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T22:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Objects from a Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700698#M625422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hopefully there is a method of WA_OBJECT which can give you the information you need.&lt;/P&gt;&lt;P&gt;Trying to directly read the contents of a private table is defeating the whole philosophy of object oriented programming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 04:23:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700698#M625422</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T04:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Objects from a Class</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700699#M625423</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 would like to add that you are dealing with a &amp;lt;b&amp;gt;persistence class&amp;lt;/b&amp;gt;. Perhaps the following thread may be of use since persistence classes require a specific logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="306044"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 07:17:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-objects-from-a-class/m-p/2700699#M625423</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-08-29T07:17:14Z</dc:date>
    </item>
  </channel>
</rss>

