<?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: ABAP pointer typing for e.g. a linked list in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-pointer-typing-for-e-g-a-linked-list/m-p/406110#M10580</link>
    <description>&lt;P&gt;Maybe Meshes can solve your problem?&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenabap_meshes.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenabap_meshes.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jul 2017 10:12:13 GMT</pubDate>
    <dc:creator>fabianlupa</dc:creator>
    <dc:date>2017-07-14T10:12:13Z</dc:date>
    <item>
      <title>ABAP pointer typing for e.g. a linked list</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-pointer-typing-for-e-g-a-linked-list/m-p/406109#M10579</link>
      <description>&lt;P&gt;does ABAP allow linked lists,&lt;BR /&gt;with forward declaration of typed pointers?&lt;BR /&gt;&lt;BR /&gt;I tried like so:&lt;BR /&gt;&amp;gt;&amp;gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;types: begin of t_elem1,&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;  kunnr type kunnr,&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;  next  type ref to t_elem1,&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;end of t_elem1.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&amp;lt;&amp;lt;&lt;BR /&gt;This gives Syntax Error: Type "T_ELEM1" is unknown&lt;BR /&gt;(at the penultimate line: "next type ref to t_elem1")&lt;BR /&gt;&lt;BR /&gt;I guess it's a circular logic within this structure, &lt;BR /&gt;(which however worked in Pascal/C/Java, IIRC)&lt;BR /&gt;&lt;BR /&gt;So I tried a logic like shown there:&lt;BR /&gt;&lt;A href="https://archive.sap.com/discussions/thread/1512042" target="test_blank"&gt;https://archive.sap.com/discussions/thread/1512042&lt;/A&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;types: begin of t_elem1,&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;  kunnr type kunnr,&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;  next  type ref to data,&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;end of t_elem1.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;disadvantage e.g. field "next" is not "upfront type-compatible" &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;("full" Syntax-Checks won't be there, auto-filler in se80 missing, etc.)&lt;BR /&gt;&lt;BR /&gt;Now, I got that idea:&lt;/P&gt;
  &lt;P&gt;with Unit-Testing "definition deferred" can be used&lt;BR /&gt;to solve a circular logic of classes referring to one another;&lt;BR /&gt;as discussed there:&lt;BR /&gt;&lt;A href="https://archive.sap.com/discussions/thread/1458598" target="test_blank"&gt;https://archive.sap.com/discussions/thread/1458598&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Is there some "forward typing" or "type deferred" thing, to get this going&lt;BR /&gt;with structures (like this), too?&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;types: begin of t_elem1,&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;  kunnr type kunnr,&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;  next  type ref to t_elem1,&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;PRE&gt;&lt;CODE&gt;end of t_elem1.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;AHGA&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 09:01:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-pointer-typing-for-e-g-a-linked-list/m-p/406109#M10579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-07-14T09:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP pointer typing for e.g. a linked list</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-pointer-typing-for-e-g-a-linked-list/m-p/406110#M10580</link>
      <description>&lt;P&gt;Maybe Meshes can solve your problem?&lt;/P&gt;
  &lt;P&gt;&lt;A href="https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenabap_meshes.htm" target="test_blank"&gt;https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenabap_meshes.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2017 10:12:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-pointer-typing-for-e-g-a-linked-list/m-p/406110#M10580</guid>
      <dc:creator>fabianlupa</dc:creator>
      <dc:date>2017-07-14T10:12:13Z</dc:date>
    </item>
  </channel>
</rss>

