<?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: Create file from internal table and save in Presentation Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744303#M637856</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its as easy as this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: it001 type table of t001 with header line.

select * into table it001 from t001.

call function 'GUI_DOWNLOAD'
     exporting
          filename              = 'C:test.xls'
          write_field_separator = 'X'
     tables
          data_tab              = it001.

&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>Wed, 29 Aug 2007 12:46:00 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-08-29T12:46:00Z</dc:date>
    <item>
      <title>Create file from internal table and save in Presentation Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744301#M637854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a internal table with some data in it. Now i want to create a file with the contents of internal table and store in presentation server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 12:42:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744301#M637854</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T12:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create file from internal table and save in Presentation Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744302#M637855</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;this is the example which i created &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if usefull&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  zsd_excel1.

tables : lfa1.


data : it_lfa1 type lfa1 occurs 1,
       wa_lfa1 type lfa1.


select-options : ven_no for lfa1-lifnr.



select lifnr
       name1
       ort01
       ort02
       begru  from lfa1 into corresponding fields of table it_lfa1 where lifnr in ven_no.


CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
*   BIN_FILESIZE                    =
    filename                        = 'C:sashisecel.xls'
*   FILETYPE                        = 'ASC'
*   APPEND                          = ' '
   WRITE_FIELD_SEPARATOR           = 'X'
*   HEADER                          = '00'
*   TRUNC_TRAILING_BLANKS           = ' '
*   WRITE_LF                        = 'X'
*   COL_SELECT                      = ' '
*   COL_SELECT_MASK                 = ' '
*   DAT_MODE                        = ' '
*   CONFIRM_OVERWRITE               = ' '
*   NO_AUTH_CHECK                   = ' '
*   CODEPAGE                        = ' '
*   IGNORE_CERR                     = ABAP_TRUE
*   REPLACEMENT                     = '#'
*   WRITE_BOM                       = ' '
*   TRUNC_TRAILING_BLANKS_EOL       = 'X'
*   WK1_N_FORMAT                    = ' '
*   WK1_N_SIZE                      = ' '
*   WK1_T_FORMAT                    = ' '
*   WK1_T_SIZE                      = ' '
* IMPORTING
*   FILELENGTH                      =
  tables
    data_tab                        = it_lfa1
*   FIELDNAMES                      =
* EXCEPTIONS
*   FILE_WRITE_ERROR                = 1
*   NO_BATCH                        = 2
*   GUI_REFUSE_FILETRANSFER         = 3
*   INVALID_TYPE                    = 4
*   NO_AUTHORITY                    = 5
*   UNKNOWN_ERROR                   = 6
*   HEADER_NOT_ALLOWED              = 7
*   SEPARATOR_NOT_ALLOWED           = 8
*   FILESIZE_NOT_ALLOWED            = 9
*   HEADER_TOO_LONG                 = 10
*   DP_ERROR_CREATE                 = 11
*   DP_ERROR_SEND                   = 12
*   DP_ERROR_WRITE                  = 13
*   UNKNOWN_DP_ERROR                = 14
*   ACCESS_DENIED                   = 15
*   DP_OUT_OF_MEMORY                = 16
*   DISK_FULL                       = 17
*   DP_TIMEOUT                      = 18
*   FILE_NOT_FOUND                  = 19
*   DATAPROVIDER_EXCEPTION          = 20
*   CONTROL_FLUSH_ERROR             = 21
*   OTHERS                          = 22
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


if sy-subrc = 0.
 message i001(zsd_mes).
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 12:44:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744302#M637855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T12:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create file from internal table and save in Presentation Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744303#M637856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its as easy as this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

data: it001 type table of t001 with header line.

select * into table it001 from t001.

call function 'GUI_DOWNLOAD'
     exporting
          filename              = 'C:test.xls'
          write_field_separator = 'X'
     tables
          data_tab              = it001.

&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>Wed, 29 Aug 2007 12:46:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744303#M637856</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-08-29T12:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create file from internal table and save in Presentation Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744304#M637857</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;check the function module&lt;/P&gt;&lt;P&gt;gui_download&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Navneeth K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 12:46:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744304#M637857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T12:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create file from internal table and save in Presentation Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744305#M637858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;To do this you need to use FM.&lt;/P&gt;&lt;P&gt;File Type is ASC for Text File&lt;/P&gt;&lt;P&gt;As i want it tab seperated i used WRITE_FIELD_SEPARATOR.&lt;/P&gt;&lt;P&gt;if you comment it it will be space seperated.&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                             = 'c:\test.txt'&lt;/P&gt;&lt;P&gt;             FILETYPE                         = 'ASC'&lt;/P&gt;&lt;P&gt;             WRITE_FIELD_SEPARATOR           = 'X'&lt;/P&gt;&lt;UL&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                        = it_student&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 12:47:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744305#M637858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T12:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create file from internal table and save in Presentation Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744306#M637859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use GUI_DOWNLOAD  function moduel to have internal table contents onto presentation server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link for code.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_updownpop.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_updownpop.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2007 12:50:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-file-from-internal-table-and-save-in-presentation-server/m-p/2744306#M637859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-29T12:50:33Z</dc:date>
    </item>
  </channel>
</rss>

