<?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: Need to include header in csv file while using GUI_DOWNLOAD in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161080#M120486</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 have to use GUI_DOWNLOAD twice. In the first call to GUI_DOWNLOAD, Open the file &amp;amp; pass header data internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second call to GUI_DOWNLOAD open the same file in APPEND mode &amp;amp; pass the internal table line item data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Prashant Patil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Feb 2006 06:30:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-03T06:30:15Z</dc:date>
    <item>
      <title>Need to include header in csv file while using GUI_DOWNLOAD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161078#M120484</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;Iam using GUI_DOWNLOAD for downloading certain texts,its working fine.now i need to include the header(i'e) some text say 'This is a error file'at the top.how can i do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 06:17:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161078#M120484</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T06:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need to include header in csv file while using GUI_DOWNLOAD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161079#M120485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swaminathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. use this code (just copy paste)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM t001 INTO TABLE t001.&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;P&gt;    filename = 'd:\t001.txt'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data_tab = t001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt; IMPORTANT&lt;/P&gt;&lt;P&gt;INSERT 'This is an error File'&lt;/P&gt;&lt;P&gt; INTO t001 INDEX 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 06:27:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161079#M120485</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T06:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need to include header in csv file while using GUI_DOWNLOAD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161080#M120486</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 have to use GUI_DOWNLOAD twice. In the first call to GUI_DOWNLOAD, Open the file &amp;amp; pass header data internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second call to GUI_DOWNLOAD open the same file in APPEND mode &amp;amp; pass the internal table line item data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Prashant Patil&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 06:30:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161080#M120486</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T06:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need to include header in csv file while using GUI_DOWNLOAD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161081#M120487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Swaminathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For downloading you have the std FM GU_DOWNLOAD. You can append the first line as you want followed by rest of texts. For this the internal table should have the field as one continuous char.&lt;/P&gt;&lt;P&gt;With this u have to download it only once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 06:43:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161081#M120487</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T06:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need to include header in csv file while using GUI_DOWNLOAD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161082#M120488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ZTEST12347                              .


DATA: BEGIN OF ITAB OCCURS 0,
        VBELN LIKE VBAK-VBELN,
        POSNR LIKE VBAP-POSNR,
      END OF ITAB.


SELECT VBELN
       POSNR
      FROM VBAP
      UP TO 20 ROWS
      INTO TABLE ITAB.
DATA: IT_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE.
IT_LINE-TDLINE = 'this is error file'.
append it_line.
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    FILENAME                = 'C:test.txt'
  TABLES
    DATA_TAB                = IT_LINE
  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.

CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    FILENAME                = 'C:test.txt'
    APPEND                  = 'X'
  TABLES
    DATA_TAB                = ITAB
  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.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 06:43:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161082#M120488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T06:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need to include header in csv file while using GUI_DOWNLOAD</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161083#M120489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANKS AMIT...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ITS WORKING FINE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2006 06:44:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-to-include-header-in-csv-file-while-using-gui-download/m-p/1161083#M120489</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-03T06:44:23Z</dc:date>
    </item>
  </channel>
</rss>

