FM GUI_UPLOAD and GUI_DOWNLOAD.

Hi,
    I am new to ABAP world.I hve been given a task to use FM GUI_UPLOAD and GUI_DOWNLOAD.Plz tell me what these functions do , i mean what's there purpose and how to use them in abap code.Plz provide some easy code so that i can understand them properly.
Points will be rewarded for useful answeres.
Thanks.

Hi Amardeep,
FM GUI_UPLOAD is used for uploading the file and GUI_DOWNLOAD is used fot downloading the file. For using these FM you need to first create internal table of all fields with character type. While downloading the file, file will be created in exact format of that of internal table and while uploading the file, you need to created the internal table with same structure as that of the original file.
eg:
DATA: BEGIN OF T_DATA OCCURS 0,
        SERIAL_NO(18)     TYPE C,
        COMP1(18)         TYPE C,
        COMP2(18)         TYPE C,
        MOTOR1(18)        TYPE C,
        MOTOR2(18)        TYPE C,
        CONTROLLER_NO(18) TYPE C,
        REF_NO(18)        TYPE C,
        BODY_NO(18)       TYPE C,
        PLANT(4)          TYPE C,
        PROD_VERSION(4)   TYPE C,
        PROD_DATE(8)      TYPE C,
      END   OF T_DATA.
DATA: BEGIN OF T_ERR_DOWNLOAD OCCURS 0.
        INCLUDE STRUCTURE T_DATA.
DATA:   MSG(60) TYPE C.
DATA: END   OF T_ERR_DOWNLOAD.
SELECTION-SCREEN BEGIN OF BLOCK BK1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_FLNM   LIKE RLGRAP-FILENAME OBLIGATORY MEMORY ID M1.
SELECTION-SCREEN END   OF BLOCK BK1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FLNM.
  CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME  = SYST-CPROG
      DYNPRO_NUMBER = SYST-DYNNR
    IMPORTING
      FILE_NAME     = P_FLNM.
START-OF-SELECTION.
  PERFORM UPLOAD_FILE.
PERFORM PREPARE_ITAB.
  PERFORM DISP_ERROR.
*&      Form  UPLOAD_FILE
      text
-->  p1        text
<--  p2        text
FORM UPLOAD_FILE .
  L_FLNM = P_FLNM.
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      FILENAME                = L_FLNM
      FILETYPE                = 'ASC'
      HAS_FIELD_SEPARATOR     = 'X'
      HEADER_LENGTH           = 0
      READ_BY_LINE            = 'X'
    TABLES
      DATA_TAB                = T_DATA
    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
      OTHERS                  = 17.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " UPLOAD_FILE
*&      Form  DISP_ERROR
      text
-->  p1        text
<--  p2        text
FORM DISP_ERROR .
  DATA: L_CNT     TYPE N.
  CLEAR: L_FLNM, L_CNT.
  IF NOT T_ERROR[] IS INITIAL.
    CONCATENATE 'C:\Barcode\' SY-DATUM '_' SY-UZEIT '.xls' INTO L_FLNM.
    DESCRIBE TABLE T_ERROR LINES L_CNT.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        INPUT         = L_CNT
      IMPORTING
        OUTPUT        = L_CNT.
    WRITE:/ 'Error occured in ', L_CNT, ' Records'.
    SKIP.
    WRITE:/ 'Error file:', L_FLNM.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = L_FLNM
       FILETYPE                        = 'ASC'
      APPEND                          = ' '
       WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = T_ERR_DOWNLOAD
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_WRITE_ERROR                = 1
      NO_BATCH                        = 2
      GUI_REFUSE_FILETRANSFER         = 3
      INVALID_TYPE                    = 4
      NO_AUTHORITY                    = 5
      UNKNOWN_ERROR                   = 6
      HEADER_NOT_ALLOWED              = 7
      SEPARATOR_NOT_ALLOWED           = 8
      FILESIZE_NOT_ALLOWED            = 9
      HEADER_TOO_LONG                 = 10
      DP_ERROR_CREATE                 = 11
      DP_ERROR_SEND                   = 12
      DP_ERROR_WRITE                  = 13
      UNKNOWN_DP_ERROR                = 14
      ACCESS_DENIED                   = 15
      DP_OUT_OF_MEMORY                = 16
      DISK_FULL                       = 17
      DP_TIMEOUT                      = 18
      FILE_NOT_FOUND                  = 19
      DATAPROVIDER_EXCEPTION          = 20
      CONTROL_FLUSH_ERROR             = 21
      OTHERS                          = 22
    IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ELSE.
    MESSAGE S000 WITH TEXT-008.
  ENDIF.
ENDFORM.                    " DISP_ERROR
**Reward points if useful
Regards,
Archana

Similar Messages

  • Gui_upload and  ws_upload

    hi friends,
    i have a small doubt i just want to know the difference betweeen
    GUI_UPLOAD and WS_UPLOAD which one i have to use.
    which function module is useful and  most preferred.
    regards
    srinivas

    WS_UPLOAD and WS_DOWNLOAD, the function modules used until now are not part of the standard set of ABAP commands. They are used to display the file interface on the presentation server. WS_UPLOAD and WS_DOWNLOAD are not compatible with USs and have been replaced by GUI_UPLOAD and GUI_DOWNLOAD.
    The new function modules, GUI_UPLOAD and GUI_DOWNLOAD, have an interface that also allows you to write Unicode format to the local hard drive. For a description of these interfaces, refer to the documentation for each function module, available under SAP Easy Access " Development " Function Builder " Goto " Documentation.

  • Difference of gui_upload and upload

    difference of <b>gui_upload</b> and <b>upload</b> and <b>ws_upload</b>

    hi
    good
    There is no difference from functionality point of view.
    But when the new versions of SAP comes into picture certain objects(fun modules,tables,fields etc) will become Obsolete and the new Objects will come into picture in the place of Obsolete Fun modules and other objects
    So GUI_Upload and GUI_DOWNLOAD are the newversion of function modules which are the replacement for the UPLOAD and DOWNLOAD fun modules
    So we should use the New one.
    So it depends on the SAP Version on which you are working
    If you are still working in the Older versions of SAP like 4.0 like thing then you can use the DOWNLOAD and UPLOAD.
    But if you are working on the latest versions like ECC5.0 and ECC6.0 you have to use GUI_download and GUI_UPLOAD fun modules only
    reward point if helpful.
    thanks
    mrutyun^

  • Purpose each of these is: Gui_upload and upload

    Hi Friends,
    Kindly let me know what the Exact Purpose each of these is: Gui_upload and upload
    What is the difference between those two?
    Akshitha.

    Hi,
    UPLOAD fm is the old function module which is now obsolete. From 4.6C onwards SAP has delivered new FM's for uploading and that is GUI_UPLOAD.
    the diff is  UPLOAD pops up a box during runtime to accept the file path the GUI_UPLOAD does not pop up any box during runtime instead takes the path as a paramter.
    This is what SAP HELP SAYS
    Files on the Presentation Server
    WS_UPLOAD and WS_DOWNLOAD, the function modules used until now are not part of the standard set of ABAP commands. They are used to display the file interface on the presentation server. WS_UPLOAD and WS_DOWNLOAD are not compatible with USs and have been replaced by GUI_UPLOAD and GUI_DOWNLOAD.
    The new function modules, GUI_UPLOAD and GUI_DOWNLOAD, have an interface that also allows you to write Unicode format to the local hard drive. For a description of these interfaces, refer to the documentation for each function module, available under SAP Easy Access " Development " Function Builder " Goto " Documentation.
    Instead of using the function modules, you can use the static methods GUI_UPLOAD and GUI_DOWNLOAD of the global class CL_GUI_FRONTEND_SERVICES.
    Cheers
    VJ
    Message was edited by:
            Vijayendra  Rao

  • Difference between GUI_UPLOAD and WS_UPLOAD

    Hi,
    Please make me clear about the difference between GUI_UPLOAD and WS_UPLOAD. In which cases we need to use these modules...??
    Thanks,
    Satish

    I would suggest to always use the GUI_UPLOAD.  I say this because this is the function module which is used in the GUI_UPLOAD method of the class CL_GUI_FRONTEND_SERVICES.   Really, you should probably use the class/method instead of the function module.
      data: filename type string.
      filename = p_file.
      call method cl_gui_frontend_services=>gui_upload
             exporting
                  filename                = filename
                  filetype                = 'ASC'
             changing
                  data_tab                = iflatf
             exceptions
                  file_open_error         = 1
                  file_read_error         = 2
                  no_batch                = 3
                  gui_refuse_filetransfer = 4
                  no_authority            = 6
                  unknown_error           = 7
                  bad_data_format         = 8
                  unknown_dp_error        = 12
                  access_denied           = 13
                  others                  = 17.
    Regards,
    Rich Heilman

  • About UPLOAD, GUI_UPLOAD and WS_UPLOAD

    Hello Experts,
             What is the difference between UPLOAD, GUI_UPLOAD and WS_UPLOAD function modules. Please send me brief answer about this on following mail id
    "[email protected]"
    Reward for useful answer
    Thanx and regards,
    Rahul Talele

    I would suggest to always use the GUI_UPLOAD.  I say this because this is the function module which is used in the GUI_UPLOAD method of the class CL_GUI_FRONTEND_SERVICES.   Really, you should probably use the class/method instead of the function module.
      data: filename type string.
      filename = p_file.
      call method cl_gui_frontend_services=>gui_upload
             exporting
                  filename                = filename
                  filetype                = 'ASC'
             changing
                  data_tab                = iflatf
             exceptions
                  file_open_error         = 1
                  file_read_error         = 2
                  no_batch                = 3
                  gui_refuse_filetransfer = 4
                  no_authority            = 6
                  unknown_error           = 7
                  bad_data_format         = 8
                  unknown_dp_error        = 12
                  access_denied           = 13
                  others                  = 17.
    Regards,
    Rich Heilman

  • Difference between ws_download and gui_download

    Hi
    Can anyone explain briefly the difference between ws_download and gui_download
    Thanks in advance
    sapien

    Hai,
    in ws_download is Obsolete in Higher Versions
    file type is as follows
    PARAMETERS: P_FILE LIKE RLGRAP-FILENAME.     "local file with contracts
      CALL FUNCTION 'DOWNLOAD'
         EXPORTING
             FILENAME                = ' '
              FILETYPE                = I_TYPE
         TABLES
              DATA_TAB                = T_DOWNLOAD
         EXCEPTIONS
              INVALID_FILESIZE        = 1
              INVALID_TABLE_WIDTH     = 2
              INVALID_TYPE            = 3
              NO_BATCH                = 4
              UNKNOWN_ERROR           = 5
              GUI_REFUSE_FILETRANSFER = 6
              OTHERS                  = 7.
    in gui_download -->is using instead of 'ws_upload'
    file type is as follows
    PARAMETERS: P_FILE LIKE STRING.     "local file with contracts
    DATA: D_FILENAME TYPE STRING,
          D_FILEPATH TYPE STRING,
          D_FULLPATH TYPE STRING,
          L_FILETYPE TYPE CHAR10.
    IF L_FILETYPE = 'ASC'.
    L_FILETYPE = 'ASC'.
    ELSE.
    L_FILETYPE = 'DAT'.
    ENDIF.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
    EXPORTING
       WINDOW_TITLE         =
       DEFAULT_EXTENSION    =
       DEFAULT_FILE_NAME    =
       FILE_FILTER          =
       INITIAL_DIRECTORY    =
       WITH_ENCODING        =
       PROMPT_ON_OVERWRITE  = 'X'
       CHANGING
        FILENAME             = D_FILENAME
        PATH                 = D_FILEPATH
        FULLPATH             = D_FULLPATH
       USER_ACTION          =
       FILE_ENCODING        =
      EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 3
        others               = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF NOT D_FULLPATH IS INITIAL.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      BIN_FILESIZE                    =
        FILENAME                        = D_FULLPATH
        FILETYPE                        = L_FILETYPE
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = ' '
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      TABLES
        DATA_TAB                        = T_DOWNLOAD
      FIELDNAMES                      =
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22

  • Difference between DOWNLOAD and GUI_DOWNLOAD

    hi
    let me know the difference between DOWNLOAD and GUI_DOWNLOAD  and    giv me clear  idea  of wat  and wat not should be done with respect to  conversion  from download to gui_Download??????
    give me clear process of  putting my download  data  into my  own defined file name ..  during   manual   and    backgrnd job. process..
    thanks inadvance

    Hi Shaik,
    DOWNLOAD function module is obsolete now and DOWNLOAD as well as WS_DOWNLOAD should be replaced by GUI_DOWNLOAD function module.
    The only matter you need to be careful off is mapping the parameters correctly.
    Also, you have asked "during manual and backgrnd job. process.. " , well GUI_DOWNLOAD or any download module for downloading to Presentation server CANNOT be used in the background.
    Because background work processes are run on application server level and do not have access to the desktop of any PS.
    For downloading to the presentation server essentially, pass the contents of internal table to DATA_TAB tables parameter and pass the presentation server file name to FILENAME importing parameter.
    Cheers,
    Aditya

  • Diff between GUI_UPLOAD and CL_GUI_FRONTEND_SERVICES= GUI_UPLOAD

    i want to upload some records from the flat file to internal table. when i use GUI_UPLOAD function module in tables parameter i have given the work area. but when i use CL_GUI_FRONTEND_SERVICES-=>FILE_OPEN_DIALOG and then CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD i have given the internal table body in the changing parameters. my doubt is we have used GUI_UPLOAD in both occassions but when we use GUI_UPLOAD alone we are giving the internal table workarea but when we use it along with class CL_GUI_FRONTEND_SERVICES we are giving the internal table body. whats is the reason or logic behind this?.

    Hi guys -- the answers you've given are correct but an example IMO is 100% better
    go_guiobj type ref to cl_gui_frontend_services.,  "For Windows file dialog
    form load_data using    e_file type string
                            e_table.
      field-symbols <int_table> type standard table.
      assign e_table to <int_table>.
      if go_guiobj is initial.
        create object go_guiobj.
      endif.
      call method go_guiobj->gui_download
        exporting
          filename              = e_file
          filetype              = 'ASC'
          write_field_separator = 'X'
        changing
          data_tab              = <int_table>.
    endform
    * For Directory look up service (Windows)
    at selection-screen
      on  value-request for p_direct.
        search_path = p_direct.
        perform directory_lookup using search_path.
        if not gv_folder is initial.
          p_direct = gv_folder.
        endif.
    form directory_lookup using directory type string.
      if go_guiobj is initial.
        create object go_guiobj.
      endif.
      call method go_guiobj->directory_browse
        exporting
          window_title    = 'Select Directory'
          initial_folder  = directory
        changing
          selected_folder = gv_folder.
    endform.                    "directory_lookup
    Cheers
    jimbo

  • About file_save_dialog and  gui_download

    Hello experts,
    I have made a report wherein I can let the users download the report to their PC. Now, they want it in such a way that they don't have to 'maximize' the width for each column so the data can be read clearly. Also, they want it to be defaulted in excel format.
    below are the codes:
    DATA: file_name TYPE string,
          file_path TYPE string,
          full_path TYPE string,
          act TYPE i,
          var1 TYPE string.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
       CHANGING
        filename = file_name
        path = file_path
        fullpath = full_path
        user_action = act
       EXCEPTIONS
        cntl_error = 1
        error_no_gui = 2
    *NOT_SUPPORTED_BY_GUI = 3
        OTHERS = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      IF act = 0.
        var1 = full_path.
        p_file = var1.
      ENDIF.
    CALL METHOD cl_gui_frontend_services=>gui_download
       EXPORTING
        filename = var1
        filetype = 'ASC'
        write_field_separator = 'X'
       CHANGING
        data_tab = it_download[]
       EXCEPTIONS
        file_write_error = 1
        no_batch = 2
        gui_refuse_filetransfer = 3
        invalid_type = 4
        no_authority = 5
        unknown_error = 6
        header_not_allowed = 7
        separator_not_allowed = 8
        filesize_not_allowed = 9
        header_too_long = 10
        dp_error_create = 11
        dp_error_send = 12
        dp_error_write = 13
        unknown_dp_error = 14
        access_denied = 15
        dp_out_of_memory = 16
        disk_full = 17
        dp_timeout = 18
        file_not_found = 19
        dataprovider_exception = 20
        control_flush_error = 21
        OTHERS = 22.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Again, thank you guys and take care!

    Hi,
    Check this in that case....
    REPORT  testexcel          .
    INCLUDE ole2incl.
    DATA: application TYPE ole2_object,
           workbook TYPE ole2_object,
           sheet TYPE ole2_object,
           cells TYPE ole2_object.
    CONSTANTS: row_max TYPE i VALUE 256.
    DATA index TYPE i.
    DATA: BEGIN OF itab1 OCCURS 0,
    first_name(10),
    last_name(10),
    END OF itab1.
    START-OF-SELECTION.
    itab1-first_name = '123445'.
    itab1-last_name = 'tesst'.
    append itab1.
    clear itab1.
    itab1-first_name = '123446'.
    itab1-last_name = 'tesst'.
    append itab1.
    clear itab1.
      CREATE OBJECT application 'excel.application'.
      SET PROPERTY OF application 'visible' = 1.
      CALL METHOD OF application 'Workbooks' = workbook.
      CALL METHOD OF workbook 'Add'.
    * Create first Excel Sheet
      CALL METHOD OF application 'Worksheets' = sheet
                                   EXPORTING #1 = 1.
      CALL METHOD OF sheet 'Activate'.
      SET PROPERTY OF sheet 'Name' = 'Sheet1'.
      LOOP AT itab1.
        index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
        CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
        SET PROPERTY OF cells 'Value' = itab1-first_name.
            index = index + 1. " 1 - column name
        CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
        SET PROPERTY OF cells 'Value' = itab1-last_name.
      ENDLOOP.
    * Save excel speadsheet to particular filename
    CALL METHOD OF sheet 'SaveAs'
                      EXPORTING #1 = 'c:tempexceldoc1.xls'     "filename
                                #2 = 1.                          "fileFormat
    Regards
    vijay

  • GUI_UPLOAD and UNICODE or UTF-8

    Hello,
    I wanted to convert some files in SAP, i.e. :
    - data is processed in MS Excell and saved as Unicode file
    - I read the file into SAP, process the strings and write it back
    The problem is that there are some special polish characters in the file. I read the file using GUI_UPLOAD FM, but I didn't manage not to have these special characters replaced (by # by default).
    Anyone came across this problem before?
    Regards,
    Michal

    Hello Satya,
    Actually I forgot to write that I used the CODEPAGE parameter... I tried two cases:
    1. Save as Unicode (in Excel or Notepad) and than use CODEPAGE = "4103"
    2. Save as UTF-8 in Notepad and use CODEPAGE = "4110"
    In both cases the polish caracters are replaced by '#'.
    In fact I tried many other code pages (all from tcp00a), but all other combinations return an error.
    Regards,
    Michal

  • GUI_UPLOAD and OPEN DATASET

    Hi,
    My code takes data from a file.
    I want to have an option of loading file from presentation server as well as application server (in case of background).
    For this I am using a checkbox and depending on its value I call the FM GUI_UPLOAD (presentation server) or OPEN DATASET (for app server).
    Is this the right approach or there is a single FM available which can be used to upload file in both the scenarios.
    Thank you,
    CD

    Hi
    You're right, I don't believe there's a std fm to do that.
    Anyway try to check the function group like C13Z
    Max

  • GUI_UPLOAD and Unicode

    Hi,
    I want to use GUI_UPLOAD to load an ASCII file with Czech Characters. I try to save my file in .txt format UTF-8. If i read the file with notepad then i have all my characters but when i load in SAP I lost some characters - Who have a solution - I'm in 4.6C - I put in SAPlogon page code 1404 and language CS .
    DATA: BEGIN OF f1  OCCURS 0,            
          altkn(10)    TYPE c,
          bldat(10)     TYPE c,               "tt.mm.jj
          rart(15)     TYPE c,
    insert michel
          zuonr(18),
          xblnr(20)    TYPE c,
        name1(40)    TYPE c,
          waers(5)     TYPE c,
          brutt(13)    TYPE c,
          fwbtr(13)    TYPE c,
          faedt(10)    TYPE c,
          zterm(4)     TYPE c,
          kunnr(10)    TYPE c,
          sgtxt(49)    TYPE c, => i can find VAN&#282;K
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = pcfil
       FILETYPE                      = 'BIN'
          has_field_separator           = fsepa
        HEADER_LENGTH                 = 0
        READ_BY_LINE                  = 'X'
        DAT_MODE                      = ' '
         CODEPAGE                      =  'UTF8'
        IGNORE_CERR                   = ABAP_TRUE
        REPLACEMENT                   = '#'
          CHECK_BOM                     = 'X'
        IMPORTING
           filelength                    = rc
         HEADER                        =
        TABLES
          data_tab                      = f1
         EXCEPTIONS
          file_open_error               = 1
    Thanks

    Same problem - To keep all the accents, i must save in UTF-8 and i have the same problem with gui_upload.I've just seen that my function GUI_UPLOAD in this system (4.6C) is not the same than in 4.7 - Only these parameters for export -
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      =
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
    I don't have the possibility to choose the codepage. Perhaps it's the reason ?

  • GUI_UPLOAD and OS

    hi all
          i am using the function module GUI_UPLOAD in my code , i want to know as this FM takes file from presentation server and uploads  it to application server, so on presentation server is thr any relation between OS or any files from OS are related for this FM?
    Regards
    Martin

    hi martin,
    just try this code which can save ur presentation server file to the application server,
    REPORT  zbdc_test_open_data_set.
    PARAMETERS: file(200) TYPE c.
    DATA: BEGIN OF g_itab OCCURS 0,
          kunnr TYPE kunnr,
          land1 TYPE land1_gp,
          name1 TYPE name1_gp.
    DATA: END OF g_itab.
    SELECT kunnr
           land1
           name1
           FROM kna1
           INTO TABLE g_itab.
    OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT g_itab FROM 1 TO 3.
      TRANSFER g_itab TO file.
    ENDLOOP.
    CLOSE DATASET file.
    save and excute..
    then go to t.code. al11 ->,
    select home in that ->,
    find ur file name(which u have given in the parameter input of the report) and double click on that, u can see details of the file..
    regards.
    seshu...

  • GUI_UPLOAD and SOX

    Hi,
    I wrote a program which used GUI_UPLOAD functionality.  Now the security guy says that this is not allowed as per SOX and we need to find a alternate way for uploading data.
    Can you please suggest me what options do I have.
    Regards
    Vijay

    Hi,
    you can use ws_upload and upload functional modules.anyways ws_upload became obsolete.so you can try using upload.
    regards,
    deepthi reddy

Maybe you are looking for

  • External hard drive gone kaput

    I have an old Mac mini (1.42 GH PowerPC G4, Mac OS X 10.4.11) with an 80 gig internal startup HD, and an external 250 gig Firewire HD. For the last couple of days, the external HD has not been getting recognized by the Mac. When I run Disk First Aid,

  • How to remove black border around image files?

    I'm something of a beginner with Photoshop, so forgive me if I've missed something entirely obvious: for some strange reason I'm now getting a black border around all image files that I save through the "Save for Web & Devices" panel. Does anyone kno

  • Issue with View

    A generic question....Is there any way to add couple of fields to a new custom view(form view) and attach it to an existing oneorder transaction to be displayed in UI and the fields should be editable and savable when the order is edited or saved res

  • Answer security questions option doesn't show up when reset password

    I restore my iphone 5s then i can't active it because of activation lock. I don't remember my apple id password, so i go to reset it but the answer security questions option doesn't show up (my apple id is [email protected] with no backup email). how

  • Servlet from Webdynpro

    Hi, Anyone tried launching a servlet from a webdynpro application. Were you able to manage the session in both the applications?