Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Field Separator in GUI_UPLOAD

Former Member
0 Kudos

Hi,

I need to upload a tab delimited excel file . I am using FM GUI_DOWNLOAD.What are Filetype and Field Separator.

Regards,

Divyanshu

3 REPLIES 3

andreas_mann3
Active Contributor
0 Kudos

Hi,

-> you mean : FM GUI_upload ???

have a look here:

regards Andreas

Former Member
0 Kudos

hi Divyanshu ,

Earlier i had some problems with 'GUI_UPLOAD' then I used FM 'UPLOAD' for tab-delimited textfile and it worked fine.

u can use that 'it is obsolete' but simple .

Hope it helps !

Regards,

Ankur

former_member185932
Participant
0 Kudos

Hi Divyanshu,

It may be better to use the class method to future proof your development (which incidentally calls GUI_UPLOAD anyway). Consider the following code:

  data: i_file type standard table of t_file.
  call method cl_gui_frontend_services=>gui_upload
    exporting
      filename                = w_file
      has_field_separator     = 'X'      "Tab-delimited ASCII upload.
    changing
      data_tab                = i_file
    exceptions
      file_open_error         = 1
      file_read_error         = 2
      no_batch                = 3
      gui_refuse_filetransfer = 4
      invalid_type            = 5
      no_authority            = 6
      unknown_error           = 7
      bad_data_format         = 8
      header_not_allowed      = 9
      separator_not_allowed   = 10
      header_too_long         = 11
      unknown_dp_error        = 12
      access_denied           = 13
      dp_out_of_memory        = 14
      disk_full               = 15
      dp_timeout              = 16
      not_supported_by_gui    = 17
      error_no_gui            = 18
      others                  = 19.
  if sy-subrc <> 0.
*   Error handling
  endif.

Hope this helps.

JB