<?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 Return/pass dynamic table in a method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-pass-dynamic-table-in-a-method/m-p/5594361#M1275138</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I retrieve a dynamic table (empty though) from a method &lt;STRONG&gt;if the structure of the dynamic table depends on the import parameters&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD zcl_aansl_util=&amp;gt;create_itab_connection
  EXPORTING
    i_name = 'FRUIT' " e.g. FRUIT or VEGETABLES and so on.
  IMPORTING
    e_dyn  = lt_dyn_table. " dynamically built table which differs for each call&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in case of 'FRUIT' I want a certain dynamic table structure which would be different when I pass 'VEGETABLES'. The method already creates the dynamic table without any problems, the only challenge lies in PASSING the dynamic table. The dyn table should be/is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I would be able to predict how the dynamic table would look like, there would be no problem. The point is, that the structure differs for each call. I browse at SDN and I didn't found any solution, I did find posts about how to create a dyn table and so on... but that is not the problem. One suggestion I was thinking of, is to pass a string (with table information).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 May 2009 07:28:17 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-04T07:28:17Z</dc:date>
    <item>
      <title>Return/pass dynamic table in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-pass-dynamic-table-in-a-method/m-p/5594361#M1275138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can I retrieve a dynamic table (empty though) from a method &lt;STRONG&gt;if the structure of the dynamic table depends on the import parameters&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD zcl_aansl_util=&amp;gt;create_itab_connection
  EXPORTING
    i_name = 'FRUIT' " e.g. FRUIT or VEGETABLES and so on.
  IMPORTING
    e_dyn  = lt_dyn_table. " dynamically built table which differs for each call&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in case of 'FRUIT' I want a certain dynamic table structure which would be different when I pass 'VEGETABLES'. The method already creates the dynamic table without any problems, the only challenge lies in PASSING the dynamic table. The dyn table should be/is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I would be able to predict how the dynamic table would look like, there would be no problem. The point is, that the structure differs for each call. I browse at SDN and I didn't found any solution, I did find posts about how to create a dyn table and so on... but that is not the problem. One suggestion I was thinking of, is to pass a string (with table information).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2009 07:28:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-pass-dynamic-table-in-a-method/m-p/5594361#M1275138</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-04T07:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Return/pass dynamic table in a method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/return-pass-dynamic-table-in-a-method/m-p/5594362#M1275139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I left out 1 line of code within my method (the assigning part).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD zcl_aansl_util=&amp;gt;create_itab_connection
    EXPORTING
      i_name      = 'FRUIT' " Just as an example
    IMPORTING
      et_newtable = lt_newtable. " .... = TYPE REF TO data.
  ASSIGN lt_newtable-&amp;gt;* TO &amp;lt;fs_collection&amp;gt;. "This part I put outside the method...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2009 11:16:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/return-pass-dynamic-table-in-a-method/m-p/5594362#M1275139</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-04T11:16:39Z</dc:date>
    </item>
  </channel>
</rss>

