<?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 return REF TO ITAB from Static Method? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-ref-to-itab-from-static-method/m-p/12471101#M2000999</link>
    <description>&lt;P&gt;All local variables are freed from memory when the procedure ends. If you get its Data Reference while the method is running and you return the Data Reference (whatever you use an exporting, changing or returning parameter, and even through an importing parameter if it's itself a reference), accessing it after the method has ended will produce a "freed" error.&lt;/P&gt;&lt;P&gt;The only solution is to create an Independent Data Reference which points to an Anonymous Data Object (CREATE DATA).&lt;/P&gt;&lt;P&gt;NB: note that you can also return a reference to a data object which exists outside of the procedure, like an instance attribute (as long as its instance keeps existing), static attribute, global variable, etc.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Aug 2021 14:29:16 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2021-08-23T14:29:16Z</dc:date>
    <item>
      <title>How to return REF TO ITAB from Static Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-ref-to-itab-from-static-method/m-p/12471098#M2000996</link>
      <description>&lt;P&gt;Good day to you, All!&lt;/P&gt;
  &lt;P&gt;is it possible to return (or exporting/changing) an internal table from STATIC method as a ref to?&lt;/P&gt;
  &lt;P&gt;At the moment I creating an instance of the class, copying itab to a class attribitute and getting this gt_itab via class instance in my program.&lt;/P&gt;
  &lt;P&gt;All previous attepmtions to get reference to returnings itab ended up with a freed stack message (so I worked with a local variable).&lt;/P&gt;
  &lt;P&gt;Any tips will be appreciated.&lt;/P&gt;
  &lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 13:05:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-ref-to-itab-from-static-method/m-p/12471098#M2000996</guid>
      <dc:creator>mithun1950</dc:creator>
      <dc:date>2021-08-23T13:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to return REF TO ITAB from Static Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-ref-to-itab-from-static-method/m-p/12471099#M2000997</link>
      <description>&lt;P&gt;Thank you for visiting SAP
Community to get answers to your questions. Since you are new, I recommend that
you familiarize yourself with our &lt;A href="https://developers.sap.com/tutorials/community-qa.html"&gt;Q&amp;amp;A &lt;/A&gt;&lt;A href="https://developers.sap.com/tutorials/community-qa.html"&gt;Tutorial&lt;/A&gt;. It
provides tips for preparing questions that draw responses from our members.
Should you wish, you can revise your question by selecting Actions, then
Edit.&lt;/P&gt;&lt;P&gt;By adding a &lt;U&gt;&lt;A href="https://www.youtube.com/watch?v=46bt1juWUUM"&gt;Picture&lt;/A&gt;&lt;/U&gt;to
your profile you encourage readers to respond.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 13:05:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-ref-to-itab-from-static-method/m-p/12471099#M2000997</guid>
      <dc:creator>former_member751591</dc:creator>
      <dc:date>2021-08-23T13:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to return REF TO ITAB from Static Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-ref-to-itab-from-static-method/m-p/12471100#M2000998</link>
      <description>&lt;P&gt;I think you cannot, as you do not have instance, you do not have memory area allocated for your class. So when you finished to use it, the memory is free and everything is lost. &lt;/P&gt;&lt;P&gt;Why do you need absolutly a static method ? &lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 13:09:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-ref-to-itab-from-static-method/m-p/12471100#M2000998</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2021-08-23T13:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to return REF TO ITAB from Static Method?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-ref-to-itab-from-static-method/m-p/12471101#M2000999</link>
      <description>&lt;P&gt;All local variables are freed from memory when the procedure ends. If you get its Data Reference while the method is running and you return the Data Reference (whatever you use an exporting, changing or returning parameter, and even through an importing parameter if it's itself a reference), accessing it after the method has ended will produce a "freed" error.&lt;/P&gt;&lt;P&gt;The only solution is to create an Independent Data Reference which points to an Anonymous Data Object (CREATE DATA).&lt;/P&gt;&lt;P&gt;NB: note that you can also return a reference to a data object which exists outside of the procedure, like an instance attribute (as long as its instance keeps existing), static attribute, global variable, etc.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 14:29:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-return-ref-to-itab-from-static-method/m-p/12471101#M2000999</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2021-08-23T14:29:16Z</dc:date>
    </item>
  </channel>
</rss>

