<?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: csv file format downloading in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637957#M284303</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;chck out the thread&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2065575"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It has all possible ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Sep 2006 09:28:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-28T09:28:40Z</dc:date>
    <item>
      <title>csv file format downloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637953#M284299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi jay &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i have to download  entire 200 fields in to csv format.the path will be in selection screen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 08:12:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637953#M284299</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T08:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: csv file format downloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637954#M284300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U can use gui_download function module to meet your requirements. ...Collect all the information in an internal table and pass the same to the above FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As, you specifically need it to be CVS..you can apply the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab-&amp;gt; internal table having the data you wish to download.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt; Clear lchr.&lt;/P&gt;&lt;P&gt; DO.&lt;/P&gt;&lt;P&gt; ASSIGN COMPONENT SY-INDEX OF STRUCTURE itab TO &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt; IF SY-SUBRC &amp;lt;&amp;gt; 0. EXIT.&lt;/P&gt;&lt;P&gt; ELSE.&lt;/P&gt;&lt;P&gt; if sy-index = 1.&lt;/P&gt;&lt;P&gt; lchr = &amp;lt;F&amp;gt;.&lt;/P&gt;&lt;P&gt; else.&lt;/P&gt;&lt;P&gt; concatenate lchr &amp;lt;F&amp;gt; into lchr separated by ','.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;P&gt; ENDDO.&lt;/P&gt;&lt;P&gt; move lchr to itext-line.&lt;/P&gt;&lt;P&gt; append itext.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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 = pfile&lt;/P&gt;&lt;P&gt;    filetype = 'ASC'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    data_tab = itext.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 08:14:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637954#M284300</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T08:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: csv file format downloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637955#M284301</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;Use both these FM ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;P&gt;    I_FIELD_SEPERATOR          = ','&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    i_tab_sap_data             = li_itab&lt;/P&gt;&lt;P&gt; CHANGING&lt;/P&gt;&lt;P&gt;   I_TAB_CONVERTED_DATA       =  i_final&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   CONVERSION_FAILED          = 1&lt;/P&gt;&lt;P&gt;   OTHERS                     = 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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&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         = ld_filename&lt;/P&gt;&lt;P&gt;        filetype         = 'DAT'&lt;/P&gt;&lt;P&gt;        write_field_separator = 'X'&lt;/P&gt;&lt;P&gt;        CONFIRM_OVERWRITE = 'X'&lt;/P&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;        data_tab         = i_final[]&lt;/P&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;        OTHERS           = 3.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 09:11:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637955#M284301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T09:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: csv file format downloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637956#M284302</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 through this link...&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="126926"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1595419"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;type-pools:TRUXS.
data: begin of itab occurs 0,    
 vbeln like vbap-vbeln,
 posnr like vbap-posnr,
end of itab.data:  
itab1 type TRUXS_T_TEXT_DATA.  
select vbeln posnr up to 10 rows from vbap            into table itab. CALL 

FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
 EXPORTING  
  I_FIELD_SEPERATOR          = ','  
 TABLES 
  I_TAB_SAP_DATA             = itab CHANGING     
  I_TAB_CONVERTED_DATA       =  itab1 
EXCEPTIONS   
  CONVERSION_FAILED          = 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.    

CALL FUNCTION 'GUI_DOWNLOAD'   
 EXPORTING      filename = 'C:TEMPtest.TXT'    
 TABLES      data_tab = itab1    
EXCEPTIONS    
  OTHERS   = 1.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 09:16:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637956#M284302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T09:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: csv file format downloading</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637957#M284303</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;chck out the thread&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="2065575"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It has all possible ways.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Richa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 09:28:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/csv-file-format-downloading/m-p/1637957#M284303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T09:28:40Z</dc:date>
    </item>
  </channel>
</rss>

