<?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 optimize GUI_DOWNLOAD function I am using... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233747#M480894</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I think I am trying to be too much ambitious. I wanted the name of the internal table to get populated in the .txt name and I don't have to write it. I was trying to do this because I have 54 internal tables, hence if I do the way you guys are suggesting then I have to mention name of the internal tables 54 timesbecause I ma using the name of internal table as file name, every time i concatenate....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 May 2007 00:01:55 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-02T00:01:55Z</dc:date>
    <item>
      <title>How to optimize GUI_DOWNLOAD function I am using...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233741#M480888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have got 54 internal tables populated at the end of the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using GUI_DOWNLOAD Function to download the data in flat files each corresponding to one internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in GUI_DOWNLOAD Function, I know I have to mention name of file and name of table as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BIN_FILESIZE                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    FILENAME                        = filenam&lt;/P&gt;&lt;P&gt;    WRITE_FIELD_SEPARATOR           = ' '&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILETYPE                        = 'ASC'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  APPEND                          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                        = ITAB1.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I do not want to code GUI_DOWNLOAD 54 times since there are 54 internal tables and I have to mention the name of table always in DAT_TAB parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 23:13:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233741#M480888</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T23:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize GUI_DOWNLOAD function I am using...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233742#M480889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can simply wrap the GUI_DOWNLOAD into a subroutine(FORM) and call this FORM over and over.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form download tables itab
                      using file_name type string.

CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
FILENAME = file_name
WRITE_FIELD_SEPARATOR = ' '
* FILETYPE = 'ASC'
* APPEND = ' '
TABLES
DATA_TAB = ITAB.


endform.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now just call this FORM with the parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;perform download tables itab1
                        using file_name1.

perform download tables itab2
                        using file_name2.


perform download tables itab3
                        using file_name3.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 23:17:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233742#M480889</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-05-01T23:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize GUI_DOWNLOAD function I am using...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233743#M480890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you could use a macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;define macro_download.

CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
FILENAME = &amp;amp;1
WRITE_FIELD_SEPARATOR = ' '
* FILETYPE = 'ASC'
* APPEND = ' '
TABLES
DATA_TAB = &amp;amp;2.
 
 
end-of-definition.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then simply call it like so.  I think this will work when passing an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

macro_download file1 itab1[].
macro_download file2 itab2[].
macro_download file3 itab3[].
macro_download file4 itab4[].

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 23:27:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233743#M480890</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-05-01T23:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize GUI_DOWNLOAD function I am using...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233744#M480891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I stuck here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF PTRVTGPER[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;Concatenate '&lt;BR /&gt;bma-files-06\redirectedfolders$\tushar.shah\Desktop\TREATY_TABLE_DATA\' 'PTRVTGPER.txt' into FNAME.&lt;/P&gt;&lt;P&gt;perform download tables PTRVTGPER&lt;/P&gt;&lt;P&gt;                        using FNAME.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to put 'PTRVTGPER.txt' in concatenate function, I want that name to be dynamcially taken when I am doing concatenation of string after initial check of internal table ?????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 23:46:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233744#M480891</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T23:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize GUI_DOWNLOAD function I am using...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233745#M480892</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;Probably have three parameters for the subroutine..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform download tables PTRVTGPER&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;* Folder - File path&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;                          using 'Concatenate '&lt;BR /&gt;bma-files-06\redirectedfolders$\tushar.shah\Desktop\TREATY_TABLE_DATA\'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;* File name&amp;lt;/b&amp;gt;                                   &lt;/P&gt;&lt;P&gt;                                   'PTRVTGPER.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM download tables itab&lt;/P&gt;&lt;P&gt;                         using  folder&lt;/P&gt;&lt;P&gt;                                   fname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT ITAB[] IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;  Concatenate folder fname INTO fname.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the FM GUI_DOWNLOAD..&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you want??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 23:56:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233745#M480892</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T23:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize GUI_DOWNLOAD function I am using...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233746#M480893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok,  if you path is constant, then just pass the filename and concatenate inside the FORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[code]IF PTRVTGPER[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;fname = 'ptrvtgper.txt'.&lt;/P&gt;&lt;P&gt;perform download tables PTRVTGPER&lt;/P&gt;&lt;P&gt;using FNAME.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download tables itab using fname type string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate '&lt;BR /&gt;bma-files-06\redirectedfolders$\tushar.shah\Desktop\TREATY_TABLE_DATA\'  fname&lt;/P&gt;&lt;P&gt;                    into FNAME.&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;/P&gt;&lt;P&gt;Endform.[/code]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RIch Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 23:59:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233746#M480893</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-05-01T23:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize GUI_DOWNLOAD function I am using...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233747#M480894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I think I am trying to be too much ambitious. I wanted the name of the internal table to get populated in the .txt name and I don't have to write it. I was trying to do this because I have 54 internal tables, hence if I do the way you guys are suggesting then I have to mention name of the internal tables 54 timesbecause I ma using the name of internal table as file name, every time i concatenate....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 00:01:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233747#M480894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T00:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to optimize GUI_DOWNLOAD function I am using...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233748#M480895</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;As mentioned pass the internal table name in the subroutine parameter..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 00:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-optimize-gui-download-function-i-am-using/m-p/2233748#M480895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T00:04:28Z</dc:date>
    </item>
  </channel>
</rss>

