<?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: Dumping data from internal table to local file. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111795#M106443</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA : BEGIN OF itab OCCURS 0 ,&lt;/P&gt;&lt;P&gt;carrid LIKE sflight-carrid,&lt;/P&gt;&lt;P&gt;connid LIKE sflight-connid,&lt;/P&gt;&lt;P&gt;fldate LIKE sflight-fldate,&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT carrid connid fldate&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;FROM sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*loop at itab.&lt;/P&gt;&lt;P&gt;*write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; itab-carrid,itab-connid,itab-fldate.&lt;/P&gt;&lt;P&gt;*endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\test.txt'&lt;/P&gt;&lt;P&gt;FILETYPE = 'ASC'&lt;/P&gt;&lt;P&gt;MODE = ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FIELDNAMES =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 1&lt;/P&gt;&lt;P&gt;FILE_WRITE_ERROR = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jan 2006 07:30:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-12T07:30:18Z</dc:date>
    <item>
      <title>Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111781#M106429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the sample code with which I am trying to write the contents of an internal table to a local file using ws_download function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error it shows is : error when opening the download file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please check the code and tell where i am going wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  zv_ittable_localfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF itab OCCURS 0 ,&lt;/P&gt;&lt;P&gt;       carrid LIKE sflight-carrid,&lt;/P&gt;&lt;P&gt;       connid LIKE sflight-connid,&lt;/P&gt;&lt;P&gt;       fldate LIKE sflight-fldate,&lt;/P&gt;&lt;P&gt;       END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT   carrid connid fldate&lt;/P&gt;&lt;P&gt;  INTO   CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;  FROM   sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*loop at itab.&lt;/P&gt;&lt;P&gt;*write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; itab-carrid,itab-connid,itab-fldate.&lt;/P&gt;&lt;P&gt;*endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;    FILENAME                      = 'C:/Documents and&lt;/P&gt;&lt;P&gt;                                     Settings/nsi/Desktop/vijay'&lt;/P&gt;&lt;P&gt;   FILETYPE                      = 'ASC'&lt;/P&gt;&lt;P&gt;   MODE                          = ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    data_tab                      = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELDNAMES                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   FILE_OPEN_ERROR               = 1&lt;/P&gt;&lt;P&gt;   FILE_WRITE_ERROR              = 2&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&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;points will be awarded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:36:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111781#M106429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T16:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111782#M106430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give an extension to the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt; Close the file when you are uploading or executing the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Phani Kiran Nudurupati&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:39:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111782#M106430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T16:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111783#M106431</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;The file is already closed. check what I have to specify at the mode in export parameters I do not know what should be spcified there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:40:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111783#M106431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T16:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111784#M106432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually have no problem running your code.  It writes the file successfully.&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, 11 Jan 2006 16:44:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111784#M106432</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-01-11T16:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111785#M106433</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 directory is exists and valid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Govind.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111785#M106433</guid>
      <dc:creator>govind_seenivasan</dc:creator>
      <dc:date>2006-01-11T16:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111786#M106434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The function module GUI_DOWNLOAD is a more recent version,  please try using it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;


report zrich_0001.

data : begin of itab occurs 0 ,
carrid like sflight-carrid,
connid like sflight-connid,
fldate like sflight-fldate,
end of itab.

select carrid connid fldate
into corresponding fields of table itab
from sflight.


*loop at itab.
*write :/ itab-carrid,itab-connid,itab-fldate.
*endloop.

call function 'GUI_DOWNLOAD'
  exporting
    filename
    = 'C:/Documents and Settings/heilmanr/Desktop/text.txt'
  tables
    data_tab                      = itab
 exceptions
   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;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, 11 Jan 2006 16:46:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111786#M106434</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-01-11T16:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111787#M106435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what are the values you have passed to file name, file type and write mode expport parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reards,&lt;/P&gt;&lt;P&gt;vijay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:46:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111787#M106435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T16:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111788#M106436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing to specify vijay.Its absolutely fine.It worked for me too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:47:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111788#M106436</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T16:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111789#M106437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT  ZTESTAA                                 .




DATA : BEGIN OF itab OCCURS 0 ,
carrid LIKE sflight-carrid,
connid LIKE sflight-connid,
fldate LIKE sflight-fldate,
END OF itab.

SELECT carrid connid fldate
INTO CORRESPONDING FIELDS OF TABLE itab
FROM sflight.


*loop at itab.
*write :/ itab-carrid,itab-connid,itab-fldate.
*endloop.

CALL FUNCTION 'WS_DOWNLOAD'

EXPORTING
FILENAME = 'C:test.txt'
FILETYPE = 'ASC'
MODE = ' '

TABLES
data_tab = itab
* FIELDNAMES =
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
.
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;P&gt;&lt;/P&gt;&lt;P&gt;the code is working fine...&lt;/P&gt;&lt;P&gt;i checked it is working,i changed the filename.&lt;/P&gt;&lt;P&gt;may be the file path you have give wrong. give properly&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:48:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111789#M106437</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T16:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111790#M106438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\Documents and&lt;/P&gt;&lt;P&gt;Settings\nsi\Desktop\vijay.txt'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:50:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111790#M106438</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T16:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111791#M106439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you give mode as 'A' it will append the file with the new data when ever you execute the program.IF mode is space it will Overwrite the data.&lt;/P&gt;&lt;P&gt;File name &amp;amp; file type is as given by you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:50:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111791#M106439</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T16:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111792#M106440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you are downloading to desktop and using the directories that are longer than 8 characters, particularly with spaces etc, you cannot hardcode the directory as you did. You have to take it from the screen as a parameter and pass it to the call. That way the conversion from the long name directories to underlying DOS 8 character directory names will be taken care of by the system. Here is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : BEGIN OF itab OCCURS 0 ,
         carrid LIKE sflight-carrid,
         connid LIKE sflight-connid,
         fldate LIKE sflight-fldate.
DATA: END OF itab.

PARAMETERS: p_file LIKE rlgrap-filename.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
*       EXPORTING
*            program_name  = syst-repid
*            dynpro_number = syst-dynnr
*            field_name    = ' '
*            static        = ' '
*            mask          = ' '
       CHANGING
            file_name     = p_file
       EXCEPTIONS
            mask_too_long = 1
            OTHERS        = 2.
  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.

START-OF-SELECTION.
  SELECT carrid connid fldate
    INTO CORRESPONDING FIELDS OF TABLE itab
    FROM sflight.

  CALL FUNCTION 'WS_DOWNLOAD'
      EXPORTING
        filename = p_file
        filetype = 'ASC'
        mode = ' '
      TABLES
        data_tab = itab
*       FIELDNAMES =
      EXCEPTIONS
        file_open_error = 1
        file_write_error = 2.
  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;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 16:53:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111792#M106440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T16:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111793#M106441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is u did not mention the file type like (.txt).&lt;/P&gt;&lt;P&gt;it is as simple as that.&lt;/P&gt;&lt;P&gt;please go through below code.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:/vijay.txt'&lt;/P&gt;&lt;P&gt;FILETYPE = 'ASC'&lt;/P&gt;&lt;P&gt;MODE = ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FIELDNAMES =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 1&lt;/P&gt;&lt;P&gt;FILE_WRITE_ERROR = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use the code like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;vengal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2006 17:12:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111793#M106441</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-11T17:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111794#M106442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA : BEGIN OF itab OCCURS 0 ,&lt;/P&gt;&lt;P&gt;carrid LIKE sflight-carrid,&lt;/P&gt;&lt;P&gt;connid LIKE sflight-connid,&lt;/P&gt;&lt;P&gt;fldate LIKE sflight-fldate,&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT carrid connid fldate&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;FROM sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*loop at itab.&lt;/P&gt;&lt;P&gt;*write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; itab-carrid,itab-connid,itab-fldate.&lt;/P&gt;&lt;P&gt;*endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\test.txt'&lt;/P&gt;&lt;P&gt;FILETYPE = 'ASC'&lt;/P&gt;&lt;P&gt;MODE = ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FIELDNAMES =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 1&lt;/P&gt;&lt;P&gt;FILE_WRITE_ERROR = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 07:29:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111794#M106442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T07:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dumping data from internal table to local file.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111795#M106443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA : BEGIN OF itab OCCURS 0 ,&lt;/P&gt;&lt;P&gt;carrid LIKE sflight-carrid,&lt;/P&gt;&lt;P&gt;connid LIKE sflight-connid,&lt;/P&gt;&lt;P&gt;fldate LIKE sflight-fldate,&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT carrid connid fldate&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE itab&lt;/P&gt;&lt;P&gt;FROM sflight.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*loop at itab.&lt;/P&gt;&lt;P&gt;*write &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; itab-carrid,itab-connid,itab-fldate.&lt;/P&gt;&lt;P&gt;*endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;FILENAME = 'C:\test.txt'&lt;/P&gt;&lt;P&gt;FILETYPE = 'ASC'&lt;/P&gt;&lt;P&gt;MODE = ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = itab&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FIELDNAMES =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;FILE_OPEN_ERROR = 1&lt;/P&gt;&lt;P&gt;FILE_WRITE_ERROR = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2006 07:30:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dumping-data-from-internal-table-to-local-file/m-p/1111795#M106443</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-12T07:30:18Z</dc:date>
    </item>
  </channel>
</rss>

