<?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: Reference type in Data Element in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414030#M1996673</link>
    <description>&lt;P&gt;In programs you might have something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA a_line_of_t100 TYPE REF TO t100.
LOOP AT t100_Records REFERENCE INTO a_line_of_t100.
   a_line_of_t100-&amp;gt;text = to_upper( a_line_of_t100-&amp;gt;text ).
ENDLOOP. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can define z_ref_to_a_line_of_t100 in the DBIC to be a reference to t100. Then you can use&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA a_line_of_t100 TYPE z_ref_to_a_line_of_t100.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I use references to pass around data without copying it.  &lt;/P&gt;</description>
    <pubDate>Sat, 19 Jun 2021 12:51:32 GMT</pubDate>
    <dc:creator>matt</dc:creator>
    <dc:date>2021-06-19T12:51:32Z</dc:date>
    <item>
      <title>Reference type in Data Element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414026#M1996669</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt; I am having confusion about How to use the Reference type in Data Element? and when we have to use this Reference type?&lt;/P&gt;
  &lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;
  &lt;P&gt;Thanks in Advance,&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 13:28:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414026#M1996669</guid>
      <dc:creator>prabukannans</dc:creator>
      <dc:date>2021-06-18T13:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reference type in Data Element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414027#M1996670</link>
      <description>&lt;P&gt;When you declare data into a program, you could use two syntax:  TYPE   or   TYPE REF TO ..  &lt;/P&gt;&lt;P&gt;You screenshot is like if you are using TYPE REF TO &lt;/P&gt;&lt;P&gt;Most of the time, it is used, when you need to reference an instance of a class. &lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 13:39:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414027#M1996670</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-06-18T13:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reference type in Data Element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414028#M1996671</link>
      <description>&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;frdric.girod&lt;/SPAN&gt; This is worth an answer !&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jun 2021 16:56:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414028#M1996671</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-06-18T16:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reference type in Data Element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414029#M1996672</link>
      <description>&lt;P&gt;TYPE and TYPE REF TO in report program level. but in DDIC 'TYPE REF TO' how can we use?. I am using a class name in a data element but activating the database table is throwing an error.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1947569-reference-data-element.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Jun 2021 06:32:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414029#M1996672</guid>
      <dc:creator>prabukannans</dc:creator>
      <dc:date>2021-06-19T06:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reference type in Data Element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414030#M1996673</link>
      <description>&lt;P&gt;In programs you might have something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA a_line_of_t100 TYPE REF TO t100.
LOOP AT t100_Records REFERENCE INTO a_line_of_t100.
   a_line_of_t100-&amp;gt;text = to_upper( a_line_of_t100-&amp;gt;text ).
ENDLOOP. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You can define z_ref_to_a_line_of_t100 in the DBIC to be a reference to t100. Then you can use&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA a_line_of_t100 TYPE z_ref_to_a_line_of_t100.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I use references to pass around data without copying it.  &lt;/P&gt;</description>
      <pubDate>Sat, 19 Jun 2021 12:51:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414030#M1996673</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2021-06-19T12:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reference type in Data Element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414031#M1996674</link>
      <description>&lt;P&gt;You cannot use a Reference Type (TYPE REF TO) in a Database Table ! If you want to store a reference, one solution is to make the reference serializable (IF_SERIALIZABLE_OBJECT in its class), define a RAWSTRING column, and serialize the reference to the database column (CALL TRANSFORMATION), and deserialize it when you read it later (CALL TRANSFORMATION in the other direction). But you have other more simple workarounds.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jun 2021 06:06:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414031#M1996674</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-06-20T06:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Reference type in Data Element</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414032#M1996675</link>
      <description>&lt;P&gt;Ref Types itself doesn't contains data. It's only a pointer to a data object or class instance.&lt;/P&gt;&lt;P&gt;It's reference to the memory of a dataobject.&lt;/P&gt;&lt;P&gt;Therefore, it doesn't make sense to use reference types in database tables, because you want to persist data.&lt;/P&gt;&lt;P&gt;You can use references to modify variable (like an internal table) values indirectly.&lt;/P&gt;&lt;P&gt;For example :&lt;/P&gt;&lt;P&gt;loop at it_data references into r_data.&lt;/P&gt;&lt;P&gt;r_data-&amp;gt;field1 = "new value".&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abaploop_at_itab_result.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abaploop_at_itab_result.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or similar to&lt;/P&gt;&lt;P&gt;loop at it_data assigning field-symbol(&amp;lt;wa_data&amp;gt;).&lt;/P&gt;&lt;P&gt;&amp;lt;wa_data&amp;gt;-field1 = "new value".&lt;/P&gt;&lt;P&gt;endloop&lt;/P&gt;&lt;P&gt;in both cases you modify the content in the table at the current row position.&lt;/P&gt;&lt;P&gt;For further information, please check the ABAP Help&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abendata_references.htm" target="test_blank"&gt;https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abendata_references.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jun 2021 07:30:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reference-type-in-data-element/m-p/12414032#M1996675</guid>
      <dc:creator>ThorstenHoefer</dc:creator>
      <dc:date>2021-06-20T07:30:49Z</dc:date>
    </item>
  </channel>
</rss>

