<?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: Reading internal table with references to objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-internal-table-with-references-to-objects/m-p/11942597#M1965722</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about having a field called CAR ID in the internal table apart from the ref object? This way you can read the internal table with the field CAR ID and the second variable in the internal table would give you the instance of the car class?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF car,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; car_id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE car_id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; car_instance TYPE REF TO class_name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END OF car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: car_it TYPE TABLE OF car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vikram.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Sep 2016 14:39:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2016-09-26T14:39:33Z</dc:date>
    <item>
      <title>Reading internal table with references to objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-internal-table-with-references-to-objects/m-p/11942596#M1965721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I came across a thought. Imagine example of object oriented design of a car garage. As we know, in garage, cars are parked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Garage would be represented as object of class Garage. Cars as objects of class Car. In Garage I would have an internal table &lt;STRONG&gt;type table of ref to &lt;/STRONG&gt;Car. So far, everything good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But what if I need to retrieve a car with ID &lt;STRONG&gt;45&lt;/STRONG&gt; I would need to loop through all objects in internal table and check ID until I find &lt;STRONG&gt;45&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;My question is: Is there any chance not to do that with &lt;STRONG&gt;loop&lt;/STRONG&gt; but with &lt;STRONG&gt;read&lt;/STRONG&gt;? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 14:26:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-internal-table-with-references-to-objects/m-p/11942596#M1965721</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-26T14:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading internal table with references to objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-internal-table-with-references-to-objects/m-p/11942597#M1965722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about having a field called CAR ID in the internal table apart from the ref object? This way you can read the internal table with the field CAR ID and the second variable in the internal table would give you the instance of the car class?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF car,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; car_id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE car_id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; car_instance TYPE REF TO class_name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END OF car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: car_it TYPE TABLE OF car.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vikram.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 14:39:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-internal-table-with-references-to-objects/m-p/11942597#M1965722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-26T14:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Reading internal table with references to objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-internal-table-with-references-to-objects/m-p/11942598#M1965723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;gt;I came across a thought&amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ouch.&amp;nbsp; Did it hurt ?? &lt;SPAN __jive_emoticon_name="silly" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/108/images/emoticons/silly.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I agree with Vikram.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And technically,&amp;nbsp; a Garage is a Collection of Cars.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 15:18:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-internal-table-with-references-to-objects/m-p/11942598#M1965723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-26T15:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reading internal table with references to objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-internal-table-with-references-to-objects/m-p/11942599#M1965724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm aware of that solution, I was thinking about more generic approach to read by any attribute, but that's something for functional programming&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 20:00:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-internal-table-with-references-to-objects/m-p/11942599#M1965724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-09-26T20:00:46Z</dc:date>
    </item>
  </channel>
</rss>

