<?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 can I export a table from a function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436647#M1739809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot give the field names and their types in the table type creation screen. I'm just rephrasing what Satish already told. Hope it makes it clear for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating a table with a set of fields is usually a two step process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a Structure in SE11 (let's say you named it ZSDEMO). You can give the list of filed names and their types that you want in this structure.(If you have trouble creating a structure use this link &lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/90/8d7310b1af11d194f600a0c929b3c3/content.htm" title="http://help.sap.com/saphelp_nw04s/helpdata/en/90/8d7310b1af11d194f600a0c929b3c3/content.htm"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/90/8d7310b1af11d194f600a0c929b3c3/content.htm&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Create a Table Type in SE11 (let's say you named it ZTDEMO). Here you've to give the structure you created in Step 1 (ZSDEMO) as the Line Type. (If you have trouble creating a table type use this link &lt;A class="active_link" href="http://help.sap.com/saphelp_nw04/helpdata/EN/90/8d731fb1af11d194f600a0c929b3c3/frameset.htm" title="http://help.sap.com/saphelp_nw04/helpdata/EN/90/8d731fb1af11d194f600a0c929b3c3/frameset.htm"&gt;http://help.sap.com/saphelp_nw04/helpdata/EN/90/8d731fb1af11d194f600a0c929b3c3/frameset.htm&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you've created the table type you can use them in the export tab as Satish mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 00:53:33 GMT</pubDate>
    <dc:creator>former_member196641</dc:creator>
    <dc:date>2013-04-26T00:53:33Z</dc:date>
    <item>
      <title>How can I export a table from a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436644#M1739806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know how can I export an internal table from a function module, for example, in the export tab I want to have my table called IT_DATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but for insert parameters in the export tab, I need have these objects in the ABAP DICTIONARY but I don't know how can I define this internal table into the ABAP DICTIONARY, is this possible? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, If I want to export a table from a function module. ¿Where I have to define the table? in the EXPORT tab or in&amp;nbsp; TABLES tab? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Luis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 15:09:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436644#M1739806</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-25T15:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a table from a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436645#M1739807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; For exporting the internal table you need to create an table type in SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to SE11, select 'Data Type' radio button, and enter any name and create.&lt;/P&gt;&lt;P&gt;From the Type Popup box select 'Table Type'. Ex: ZITAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Line Type, give your database table name. Save and activate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to SE37 to create function module.&lt;/P&gt;&lt;P&gt;In the Export tab, create an parameter with associated type as your table type name i.e ZITAB.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 16:36:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436645#M1739807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-25T16:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a table from a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436646#M1739808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for your fast answer but, in this option: "Table type", not allows me give the fields name and types field, how I can I do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 17:01:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436646#M1739808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-25T17:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a table from a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436647#M1739809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot give the field names and their types in the table type creation screen. I'm just rephrasing what Satish already told. Hope it makes it clear for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating a table with a set of fields is usually a two step process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a Structure in SE11 (let's say you named it ZSDEMO). You can give the list of filed names and their types that you want in this structure.(If you have trouble creating a structure use this link &lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/90/8d7310b1af11d194f600a0c929b3c3/content.htm" title="http://help.sap.com/saphelp_nw04s/helpdata/en/90/8d7310b1af11d194f600a0c929b3c3/content.htm"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/90/8d7310b1af11d194f600a0c929b3c3/content.htm&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Create a Table Type in SE11 (let's say you named it ZTDEMO). Here you've to give the structure you created in Step 1 (ZSDEMO) as the Line Type. (If you have trouble creating a table type use this link &lt;A class="active_link" href="http://help.sap.com/saphelp_nw04/helpdata/EN/90/8d731fb1af11d194f600a0c929b3c3/frameset.htm" title="http://help.sap.com/saphelp_nw04/helpdata/EN/90/8d731fb1af11d194f600a0c929b3c3/frameset.htm"&gt;http://help.sap.com/saphelp_nw04/helpdata/EN/90/8d731fb1af11d194f600a0c929b3c3/frameset.htm&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you've created the table type you can use them in the export tab as Satish mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 00:53:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436647#M1739809</guid>
      <dc:creator>former_member196641</dc:creator>
      <dc:date>2013-04-26T00:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a table from a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436648#M1739810</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;when creating table type u can use your Z structure or database table for line type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in code table type doesnt have header line so declare work area type your structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; into wa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 01:00:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436648#M1739810</guid>
      <dc:creator>tolga_polat</dc:creator>
      <dc:date>2013-04-26T01:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a table from a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436649#M1739811</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;You can either create the line type/table type and use it to define your EXPORT parameter as suggested by POLAT. Or you can directly create a custom (ZXYZ) structure in SE11 and then use that in defining your TABLE parameter ( I suggest this as this would be straight and easy).&lt;/P&gt;&lt;P&gt; Either way you will have to create a Z structure in SE11(as per the req fields) and in the Code section you have to define internal table of that structure type and have a work area to manipulate the values.&lt;/P&gt;&lt;P&gt;Please let us know if this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepak. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 03:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436649#M1739811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-26T03:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a table from a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436650#M1739812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please create it in the Tables Tab as that is the expected way of declaring for the new version of sap. You can create a structure or a line type or a table type in SE11 and declare it of that structure type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 03:49:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436650#M1739812</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-26T03:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a table from a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436651#M1739813</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;Go to &lt;STRONG&gt;SE11&lt;/STRONG&gt; (ABAP Dictionary).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Initially, create a structure (structure of the Internal Table) by selecting &lt;STRONG&gt;Datatype &lt;/STRONG&gt;radio button and give name (Z....) and click create. A popup arises and select &lt;STRONG&gt;Structure &lt;/STRONG&gt;radio button and click &lt;STRONG&gt;Ok &lt;/STRONG&gt;button. Fill the fields and data elements or predefined type needed, choose the enhancement category and activate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Then, select &lt;STRONG&gt;Datatype &lt;/STRONG&gt;radio button and give name (Z....) and click create. Now, a popup arises and choose &lt;STRONG&gt;Table Type &lt;/STRONG&gt;radio button and click &lt;STRONG&gt;Ok &lt;/STRONG&gt;button. Give the &lt;STRONG&gt;line type&lt;/STRONG&gt; name&amp;nbsp; (i.e) the structure that has been created for the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Function Module,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for the export parameters: &lt;/STRONG&gt;You can give the associated type of the parameter as&amp;nbsp; &lt;STRONG&gt;Table type &lt;/STRONG&gt;that has been created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Eg:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Parameter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Typing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Associated Type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ITAB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TYPE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Table type name&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not use &lt;STRONG&gt;Tables &lt;/STRONG&gt;since it follows &lt;STRONG&gt;with header line&lt;/STRONG&gt; concept. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use it, you must give associated type of the parameter as&amp;nbsp; &lt;STRONG&gt;Structure &lt;/STRONG&gt;that has been created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Eg:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Parameter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Typing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Associated Type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ITAB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LIKE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Structure name&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Prasanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 04:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436651#M1739813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-26T04:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I export a table from a function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436652#M1739814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luis,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code logic declare the work area and using this work area append the values to your table type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose your table type name is ZITAB and your database table( line type) is ZDBTABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use the following code for updating the values in your function module:&lt;/P&gt;&lt;P&gt;DATA: wa TYPE ZDBTABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa-field1 = value1.&lt;/P&gt;&lt;P&gt;wa-field2 = value2.&lt;/P&gt;&lt;P&gt;wa-field3 = value3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND wa TO GT_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GT_TABLE will be your exporting internal table which is of type ZITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if you want to use this GT_TABLE use the following code in your report where the function module is called:&lt;/P&gt;&lt;P&gt;LOOP AT gt_table INTO wa.&lt;/P&gt;&lt;P&gt;**** Write your logic&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 05:06:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-can-i-export-a-table-from-a-function-module/m-p/9436652#M1739814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-04-26T05:06:43Z</dc:date>
    </item>
  </channel>
</rss>

