<?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: BDC problems in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368194#M181797</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;Download into CSV format from internal table  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP_CONVERT_TO_TEX_FORMAT or&lt;/P&gt;&lt;P&gt;SAP_CONVERT_TO_CSV_FORMAT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in SAP_CONVERT_TO_CSV_FORMAT ,the import parameter I_FIELD_SEPARATOR = ';' by default irrespective of whatever we pass .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: truxs.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;name1(10),&lt;/P&gt;&lt;P&gt;name2(10),&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab1 TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 10 TIMES.&lt;/P&gt;&lt;P&gt;itab-name1 = 'Prabhu'.&lt;/P&gt;&lt;P&gt;itab-name2 = 'Rajesh'.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;CLEAR : itab.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;WRITE:/ itab-name1, itab-name2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_field_seperator = ';'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_LINE_HEADER =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_filename =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_APPL_KEEP = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;i_tab_sap_data = itab&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;I_TAB_CONVERTED_DATA = itab1&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CONVERSION_FAILED = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;filename = 'd:\cps_data1.xls'&lt;/P&gt;&lt;P&gt;filetype = 'DAT'&lt;/P&gt;&lt;P&gt;mode = 'A'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = intab&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;invalid_filesize = 3&lt;/P&gt;&lt;P&gt;invalid_type = 4&lt;/P&gt;&lt;P&gt;no_batch = 5&lt;/P&gt;&lt;P&gt;unknown_error = 6&lt;/P&gt;&lt;P&gt;invalid_table_width = 7&lt;/P&gt;&lt;P&gt;gui_refuse_filetransfer = 8&lt;/P&gt;&lt;P&gt;customer_error = 9&lt;/P&gt;&lt;P&gt;no_authority = 10&lt;/P&gt;&lt;P&gt;OTHERS = 11&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;chk this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_upexcel.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_upexcel.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Naresh Kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 May 2006 13:16:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-19T13:16:52Z</dc:date>
    <item>
      <title>BDC problems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368191#M181794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have TWO problem, kindly help me out with them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We need to download the internal table to a CSV or an XLS File. I am not able to find a Function Module  for downloading to EXCEL but GUI_UPLOAD works good enough for CSV format. Kindly let me know a relevant FM for&lt;/P&gt;&lt;P&gt;downloading data to XLS file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While downloading data to CSV file, I am facing following problem. The Problem with GUI_UPLOAD is that if there is a comma(,) in the data of any field then it is splitted into two columns while passing to the CSV file since the seperator to differentiate between different columns is comma(,).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 13:11:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368191#M181794</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T13:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: BDC problems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368192#M181795</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;refer to these links&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="1670335"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&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="1185309"&gt;&lt;/A&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;plz reward if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 13:14:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368192#M181795</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T13:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: BDC problems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368193#M181796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SEND_TABLE_TO_EXCEL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And there are more FM just search for &lt;STRONG&gt;EXCEL&lt;/STRONG&gt; in SE37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 13:15:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368193#M181796</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T13:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: BDC problems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368194#M181797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &amp;lt;b&amp;gt;Download into CSV format from internal table  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP_CONVERT_TO_TEX_FORMAT or&lt;/P&gt;&lt;P&gt;SAP_CONVERT_TO_CSV_FORMAT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in SAP_CONVERT_TO_CSV_FORMAT ,the import parameter I_FIELD_SEPARATOR = ';' by default irrespective of whatever we pass .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type-pools: truxs.&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF itab OCCURS 0,&lt;/P&gt;&lt;P&gt;name1(10),&lt;/P&gt;&lt;P&gt;name2(10),&lt;/P&gt;&lt;P&gt;END OF itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : itab1 TYPE truxs_t_text_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO 10 TIMES.&lt;/P&gt;&lt;P&gt;itab-name1 = 'Prabhu'.&lt;/P&gt;&lt;P&gt;itab-name2 = 'Rajesh'.&lt;/P&gt;&lt;P&gt;APPEND itab.&lt;/P&gt;&lt;P&gt;CLEAR : itab.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;WRITE:/ itab-name1, itab-name2.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;i_field_seperator = ';'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_LINE_HEADER =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;i_filename =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_APPL_KEEP = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;i_tab_sap_data = itab&lt;/P&gt;&lt;P&gt;CHANGING&lt;/P&gt;&lt;P&gt;I_TAB_CONVERTED_DATA = itab1&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CONVERSION_FAILED = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'WS_DOWNLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;filename = 'd:\cps_data1.xls'&lt;/P&gt;&lt;P&gt;filetype = 'DAT'&lt;/P&gt;&lt;P&gt;mode = 'A'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = intab&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;invalid_filesize = 3&lt;/P&gt;&lt;P&gt;invalid_type = 4&lt;/P&gt;&lt;P&gt;no_batch = 5&lt;/P&gt;&lt;P&gt;unknown_error = 6&lt;/P&gt;&lt;P&gt;invalid_table_width = 7&lt;/P&gt;&lt;P&gt;gui_refuse_filetransfer = 8&lt;/P&gt;&lt;P&gt;customer_error = 9&lt;/P&gt;&lt;P&gt;no_authority = 10&lt;/P&gt;&lt;P&gt;OTHERS = 11&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;chk this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_upexcel.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_upexcel.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Naresh Kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 13:16:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368194#M181797</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T13:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: BDC problems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368195#M181798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which are you doing,  download or upload?    You can use the GUI_UPLOAD/GUI_DOWNLOAD functions with excel,  make sure that you set the   HAS_FIELD_SEPARATOR  parameter to "X".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are working with comma delimited files,  use GUI_UPLOAD to upload into a flat structure,  then loop at this internal table and use the SPLIT statement to split the data into columns.  &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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 13:19:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368195#M181798</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-05-19T13:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: BDC problems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368196#M181799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GUI_DOWNLOAD is good enough to download data from internal table to excel sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the below  code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : t_mard type standard table of mard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mard&lt;/P&gt;&lt;P&gt;into table t_mard up to 100 rows.&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                        = 'C:\test.xls'&lt;/P&gt;&lt;P&gt;    FILETYPE                        = 'DAT'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                        = t_mard.&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>Fri, 19 May 2006 13:23:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368196#M181799</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T13:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: BDC problems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368197#M181800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Giri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this following FM&lt;/P&gt;&lt;P&gt; 1) ws_download&lt;/P&gt;&lt;P&gt; 2) GUI_download&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may work for your requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sunil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2006 13:42:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-problems/m-p/1368197#M181800</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-19T13:42:01Z</dc:date>
    </item>
  </channel>
</rss>

