<?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: gui download problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-problem/m-p/3664911#M882747</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI it is better to delete the separator(i_field_seperator = ';'&lt;/P&gt;&lt;P&gt;)  in the 'SAP_CONVERT_TO_CSV_FORMAT' then it will work fine i  think ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and check the simple code for the gui sownload with finary file..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;       f1 type i,&lt;/P&gt;&lt;P&gt;       f2 type  i,&lt;/P&gt;&lt;P&gt;       end of itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       itab-f1 = 121.&lt;/P&gt;&lt;P&gt;       itab-f2 = 232.&lt;/P&gt;&lt;P&gt;       append itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       itab-f1 = 2121.&lt;/P&gt;&lt;P&gt;       itab-f2 = 1232.&lt;/P&gt;&lt;P&gt;       append itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       itab-f1 = 1821.&lt;/P&gt;&lt;P&gt;       itab-f2 = 2032.&lt;/P&gt;&lt;P&gt;       append itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: file type string .&lt;/P&gt;&lt;P&gt;file = 'C:\Documents and Settings\venkatapp\Desktop\testing.txt'.&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                        = FILE&lt;/P&gt;&lt;P&gt;   FILETYPE                        = 'BIN'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                        = itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Apr 2008 15:53:37 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-16T15:53:37Z</dc:date>
    <item>
      <title>gui download problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-problem/m-p/3664909#M882745</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;i have problem in open file ,&lt;/P&gt;&lt;P&gt;when i open the file i get lot of space between rows ,&lt;/P&gt;&lt;P&gt;i use convert and i get table with row but when the data is ending (for every row) i have space in rows how can i avoid that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE-POOLS:truxs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types truxs_t_text_data(4096) type c occurs 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DATA: da_tab TYPE truxs_t_text_data.&lt;/STRONG&gt;&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;      i_appl_keep          = 'X'&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      i_tab_sap_data       = it_d&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      i_tab_converted_data = da_tab&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;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      filename                = file_n&lt;/P&gt;&lt;P&gt;      filetype                = 'BIN'&lt;/P&gt;&lt;P&gt;      append                  = 'X'&lt;/P&gt;&lt;P&gt;      codepage                = 'UTF-8'&lt;/P&gt;&lt;P&gt;    CHANGING&lt;/P&gt;&lt;P&gt;      data_tab                = csv_tab&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      file_write_error        = 1&lt;/P&gt;&lt;P&gt;      no_batch                = 2&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;Edited by: Alvaro Tejada Galindo on Apr 16, 2008 12:39 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 14:40:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-problem/m-p/3664909#M882745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T14:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: gui download problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-problem/m-p/3664910#M882746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi Ricardo,
We can use the Function module  TEXT_CONVERT_XLS_TO_SAP  to read the Excel file on presentation server into the internal table. From this internal table you can fill the target internal table. We dont need to use again cl_gui_frontend_services=&amp;gt;gui_download method.
 
  &lt;PRE&gt;&lt;CODE&gt;report  zvenkat-upload-xl  no standard page heading.
"----------------------------------------------------------------------
"Declarations.
"----------------------------------------------------------------------
"types
types:
      begin of t_bank_det,
        pernr(8)  type c,
        bnksa(4)  type c,
        zlsch(1)  type c,
        bkplz(10) type c,
        bkort(25) type c,
        bankn(18) type c,
      end of t_bank_det.
"work areas
data:
      w_bank_det type t_bank_det.
"internal tables
data:
      i_bank_det type table of t_bank_det.
"---------------------------------------------------------------------
" selection-screen
"----------------------------------------------------------------------
selection-screen begin of block b1 with frame title text_001.
parameters p_file type localfile.
selection-screen end of block b1.
*---------------------------------------------------------------------
"At selection-screen on value-request for p_file.
*---------------------------------------------------------------------
at selection-screen on value-request for p_file.
  perform f4_help.
*---------------------------------------------------------------------
  "Start-of-selection.
*---------------------------------------------------------------------
start-of-selection.
  perform upload_data.
*---------------------------------------------------------------------
  "End-of-selection.
*---------------------------------------------------------------------
end-of-selection.
  perform display_data.
*&amp;amp;---------------------------------------------------------------------*
  "Form  f4_help
*&amp;amp;---------------------------------------------------------------------*
form f4_help .
  data:
        l_file_name like  ibipparms-path  .

  call function 'F4_FILENAME'
    exporting
      program_name  = syst-cprog
      dynpro_number = syst-dynnr
      field_name    = 'P_FILE'
    importing
      file_name     = l_file_name.

  p_file = l_file_name.

endform.                                                    " f4_help
*---------------------------------------------------------------------*
"Form  upload_data
*---------------------------------------------------------------------*
form upload_data .
  type-pools:truxs.
  data:li_tab_raw_data type  truxs_t_text_data.
  data:l_filename      like  rlgrap-filename.

  l_filename = p_file.
  call function 'TEXT_CONVERT_XLS_TO_SAP'
    exporting
      i_tab_raw_data       = li_tab_raw_data
      i_filename           = l_filename
    tables
      i_tab_converted_data = i_bank_det
    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.

endform.                    " upload_data
*---------------------------------------------------------------------*
" Form  display_data
*---------------------------------------------------------------------*
form display_data .
  data: char100 type char100.
  loop at i_bank_det into w_bank_det .
    if sy-tabix = 1.
      write w_bank_det.
      write / '------------------------------------------------------------'.
    else.
      write / w_bank_det.
    endif.
  endloop.

endform.                    " display_data&lt;/CODE&gt;&lt;/PRE&gt; 

I hope that it helps u .

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 15:32:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-problem/m-p/3664910#M882746</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2008-04-16T15:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: gui download problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-problem/m-p/3664911#M882747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI it is better to delete the separator(i_field_seperator = ';'&lt;/P&gt;&lt;P&gt;)  in the 'SAP_CONVERT_TO_CSV_FORMAT' then it will work fine i  think ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and check the simple code for the gui sownload with finary file..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: begin of itab occurs 0,&lt;/P&gt;&lt;P&gt;       f1 type i,&lt;/P&gt;&lt;P&gt;       f2 type  i,&lt;/P&gt;&lt;P&gt;       end of itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       itab-f1 = 121.&lt;/P&gt;&lt;P&gt;       itab-f2 = 232.&lt;/P&gt;&lt;P&gt;       append itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       itab-f1 = 2121.&lt;/P&gt;&lt;P&gt;       itab-f2 = 1232.&lt;/P&gt;&lt;P&gt;       append itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       itab-f1 = 1821.&lt;/P&gt;&lt;P&gt;       itab-f2 = 2032.&lt;/P&gt;&lt;P&gt;       append itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: file type string .&lt;/P&gt;&lt;P&gt;file = 'C:\Documents and Settings\venkatapp\Desktop\testing.txt'.&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                        = FILE&lt;/P&gt;&lt;P&gt;   FILETYPE                        = 'BIN'&lt;/P&gt;&lt;P&gt;  TABLES&lt;/P&gt;&lt;P&gt;    DATA_TAB                        = itab .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 15:53:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-problem/m-p/3664911#M882747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T15:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: gui download problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-problem/m-p/3664912#M882748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi venkat appikonda  ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what do u mean delete the separator?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 15:57:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gui-download-problem/m-p/3664912#M882748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T15:57:26Z</dc:date>
    </item>
  </channel>
</rss>

