Skip to Content
author's profile photo Former Member
Former Member

CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD

Hi all

i have a problem, i want upload a file with the method GUI_UPLOAD from class CL_GUI_FRONTEND_SERVICES, but the file is in utf-8 encode. How i can give the parameter, that thie file encode in utf-8?

Regards anu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 06, 2009 at 08:08 AM

    i try to this, but i become a dump

    call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = 'C:\temp\hyph-de-ch.txt'
    *      filetype                = 'ASC'
    *      has_field_separator     = SPACE
    *      header_length           = 0
          read_by_line            = 'X'
    *      dat_mode                = SPACE
          codepage                = 'UTF-8'
    *      ignore_cerr             = ABAP_TRUE
    *      replacement             = '#'
    *      virus_scan_profile      =
    *      show_transfer_status    = 'X'
    *    importing
    *      filelength              =
    *      header                  =
        changing
          data_tab                = gt_tab
        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.

    Add a comment
    10|10000 characters needed characters exceeded

    • call method cl_gui_frontend_services=>gui_upload
          exporting
            filename                = 'C:\temp\hyph-de-ch.txt'
      *      filetype                = 'ASC'
      *      has_field_separator     = SPACE
      *      header_length           = 0
            read_by_line            = 'X'
      *      dat_mode                = SPACE
            codepage                = '4110'  " 4110 is the code page corresponding to UTF-8
      *      ignore_cerr             = ABAP_TRUE
      *      replacement             = '#'
      *      virus_scan_profile      =
      *      show_transfer_status    = 'X'
      *    importing
      *      filelength              =
      *      header                  =
          changing
            data_tab                = gt_tab
          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.
      
  • author's profile photo Former Member
    Former Member
    Posted on Oct 06, 2009 at 07:55 AM

    Hi

    It should be the parameter CODEPAGE

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 06, 2009 at 07:55 AM

    That should not be a problem as gui_upload can handle ansi/ascii formats as well. Which pronlem do you encounter while uploading?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 06, 2009 at 07:56 AM

    Try specifying the CODEPAGE parameter as 4110 in the gui_upload FM and check

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 06, 2009 at 08:08 AM

    i try to this, but i become a dump

    call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = 'C:\temp\hyph-de-ch.txt'
    *      filetype                = 'ASC'
    *      has_field_separator     = SPACE
    *      header_length           = 0
          read_by_line            = 'X'
    *      dat_mode                = SPACE
          codepage                = 'UTF-8'
    *      ignore_cerr             = ABAP_TRUE
    *      replacement             = '#'
    *      virus_scan_profile      =
    *      show_transfer_status    = 'X'
    *    importing
    *      filelength              =
    *      header                  =
        changing
          data_tab                = gt_tab
        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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2016 at 02:50 PM

    HAVE U GOT OUTPUT.,.,.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.