<?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: Exporting table from methode in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777334#M1463947</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;just define a table-type for your structure in the datadictionary and use it in your method.&lt;/P&gt;&lt;P&gt;Otherwise you could use the return type "table" and create a dynamic table based on your&lt;/P&gt;&lt;P&gt;structure in the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;dsp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Apr 2010 09:32:32 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-21T09:32:32Z</dc:date>
    <item>
      <title>Exporting table from methode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777333#M1463946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I handle it to exporting a table from a structure from a methode?&lt;/P&gt;&lt;P&gt;At the moment I export the structure in the methode but I need to export a table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the moment:&lt;/P&gt;&lt;P&gt;Parameter    Type           Typing Methode  Associated Type&lt;/P&gt;&lt;P&gt;param_1      Exporting    Type                    structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need something like that:&lt;/P&gt;&lt;P&gt;Parameter    Type           Typing Methode  Associated Type&lt;/P&gt;&lt;P&gt;param_1      Exporting    Type Table of      structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... but that is not possible&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 08:26:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777333#M1463946</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-21T08:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting table from methode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777334#M1463947</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;just define a table-type for your structure in the datadictionary and use it in your method.&lt;/P&gt;&lt;P&gt;Otherwise you could use the return type "table" and create a dynamic table based on your&lt;/P&gt;&lt;P&gt;structure in the method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;dsp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 09:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777334#M1463947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-21T09:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting table from methode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777335#M1463948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no Return Type "Table". Only Type: "Importing", "Exporting", "Changing" and "Returning" and as Typing Method only "Like", "Type" and "Type Ref To" ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 10:39:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777335#M1463948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-21T10:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting table from methode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777336#M1463949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DSP is right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All you need is:&lt;/P&gt;&lt;P&gt;- go to ABAP Dictionary and create &lt;EM&gt;table type&lt;/EM&gt; using structure you have as its line type&lt;/P&gt;&lt;P&gt;- then in your method use &lt;EM&gt;exporting&lt;/EM&gt; parameter, give &lt;EM&gt;type&lt;/EM&gt; as typeing method and &lt;EM&gt;table_type&lt;/EM&gt; you just created as the type itself&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should then be able to export object which is typed as a table, having a line typed as the structure you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 10:43:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777336#M1463949</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-04-21T10:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting table from methode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777337#M1463950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Otherwise you could use the return type "table" and create a dynamic table based on your&lt;/P&gt;&lt;P&gt;structure in the method.&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How Can I handle this suggestion in detail?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 10:46:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777337#M1463950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-21T10:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting table from methode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777338#M1463951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think he meant something like this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS lcl_test DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS: get_tab EXPORTING gen_table TYPE table.
ENDCLASS.                   


CLASS lcl_test IMPLEMENTATION.
  METHOD get_tab.

    SELECT * FROM sflight INTO TABLE gen_table UP TO 10 ROWS.
  ENDMETHOD.                    
ENDCLASS.                    

START-OF-SELECTION.
  DATA: it_sflight TYPE TABLE OF sflight.

  lcl_test=&amp;gt;get_tab( IMPORTING gen_table = it_sflight ).
  "here IT_SFLIGHT holds what you want
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Of course you could make it more generic, meaning query dynamic DB table inside &lt;EM&gt;get_tab&lt;/EM&gt; and create dynamic table outside the method call to get returned data to that table. But basically it shows the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 10:56:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exporting-table-from-methode/m-p/6777338#M1463951</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2010-04-21T10:56:35Z</dc:date>
    </item>
  </channel>
</rss>

