<?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: Problem with generic interface parameter in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-generic-interface-parameter/m-p/9176870#M1712604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Freed stack means - the resources of the program are freed after completion of the program stack. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your scenario, you take an exporting parameter of type ANY TABLE and do the assignment inside the method and export the internal table data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Dec 2012 10:11:09 GMT</pubDate>
    <dc:creator>Kiran_Valluru</dc:creator>
    <dc:date>2012-12-31T10:11:09Z</dc:date>
    <item>
      <title>Problem with generic interface parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-generic-interface-parameter/m-p/9176869#M1712603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my custom class, I have a method which has a generic exporting parameter ( type ref to data). This method is supposed to return an internal table in the form of this generic parameter. Inside the method, I am taking the reference of the actual internal table and assigning to the exporting parameter. &lt;/P&gt;&lt;P&gt;However , when I try to call this method from my program, this parameter is returning nothing. It shows 'FREED STACK:{A:2*\TYPE=%_T00004S00000039O0000002888}'. what could be the problem here? Any suggestions will be helpful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in the method: &lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;types &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;BEGIN &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;ty_employee&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;no &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;i&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;char30&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; age &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;i&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;END &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;ty_employee&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;data &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;it_employee &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STANDARD &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;ty_employee&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;data &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;wa_employee &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;ty_employee&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; wa_employee&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;no &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; wa_employee&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;name &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'Tom'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; wa_employee&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;age &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;29&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;append&amp;nbsp; &lt;/SPAN&gt;wa_employee &lt;SPAN class="L0S52"&gt;to &lt;/SPAN&gt;it_employee&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; wa_employee&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;no &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;2&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; wa_employee&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;name &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'Henk'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; wa_employee&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;age &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;23&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;append&amp;nbsp; &lt;/SPAN&gt;wa_employee &lt;SPAN class="L0S52"&gt;to &lt;/SPAN&gt;it_employee&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;get &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REFERENCE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;it_employee &lt;SPAN class="L0S52"&gt;into &lt;/SPAN&gt;ex_data&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Ex_data is the exporting parameter(type ref to data). &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;This is how I am calling this method. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;data &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;im_data &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;data&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;FIELD-SYMBOLS &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;&amp;lt;fs_table&amp;gt; &lt;SPAN class="L0S52"&gt;type &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;any &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;table&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;call &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;METHOD &lt;/SPAN&gt;ZCL_test&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;TEST&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;IMPORTING &lt;/SPAN&gt;ex_data &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;im_data&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;assign &lt;/SPAN&gt;im_data&lt;SPAN class="L0S70"&gt;-&amp;gt;&lt;/SPAN&gt;* &lt;SPAN class="L0S52"&gt;to &lt;/SPAN&gt;&amp;lt;fs_table&amp;gt; &lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;write &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;' ' &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Here the data reference variable im_data gets 'FREED STACK:{A:2*\TYPE=%_T00004S00000039O0000002888}'. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Thanks &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Ajith C&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2012 06:58:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-generic-interface-parameter/m-p/9176869#M1712603</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-31T06:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with generic interface parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-generic-interface-parameter/m-p/9176870#M1712604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Freed stack means - the resources of the program are freed after completion of the program stack. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your scenario, you take an exporting parameter of type ANY TABLE and do the assignment inside the method and export the internal table data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2012 10:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-generic-interface-parameter/m-p/9176870#M1712604</guid>
      <dc:creator>Kiran_Valluru</dc:creator>
      <dc:date>2012-12-31T10:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with generic interface parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-generic-interface-parameter/m-p/9176871#M1712605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ajith, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like Kiran had mentoned above, Freed stack refers to a completed program stack or a completed program unit popped from a program stack . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Error you are getting is due to the following reason. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;get &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;REFERENCE &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;it_employee &lt;SPAN class="L0S52"&gt;into &lt;/SPAN&gt;ex_data&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are getting the reference of a local&amp;nbsp; varaible into an Exporting parameter ex_data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EX_DATA now &lt;STRONG&gt;points to &lt;/STRONG&gt;IT_EMPLOYEE. EX_DATA has not allocated any memory, rather points to an alllocated memory of a local variable, IT_EMPLOYEE. Once the method is completed, all Local variables are freed and hence you get the Freed Stack reference message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To correct this, you need EX_DATA to allocate its own memory. The below code snippet within the method , should solve your issue. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;FIELD-SYMBOLS : &amp;lt;fs_data&amp;gt; like it_employee &lt;SPAN class="L0S52"&gt; . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;create data ex_data LIKE it_employee.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ASSIGN ex_data-&amp;gt;* to &amp;lt;fs_data&amp;gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&amp;lt;fs_data&amp;gt; = it_employee.&lt;/SPAN&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;I hope this helps. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;Thanks, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;Venkat.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Venkat Gowrishankar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Dec 2012 15:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-generic-interface-parameter/m-p/9176871#M1712605</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-12-31T15:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with generic interface parameter</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-generic-interface-parameter/m-p/9176872#M1712606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vankat, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. I figured where the problem was. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jan 2013 04:58:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-generic-interface-parameter/m-p/9176872#M1712606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-01-01T04:58:19Z</dc:date>
    </item>
  </channel>
</rss>

