GUI_DOWNLOAD problem in 4.6c

Hi Gurus
In 4.6c version i have written code like this to download data , but the column header are not prinitng . In 4.6c ver there is no fieldnames part in the FM .please suggest how to achieve and give me code if possible.my requiement like this
Customer ID        Customer name         Address <- missing info
1111              KKKKKKKKKKKKKK   RTRTRT             
The column headers GAP shuold be TAB
IF p_down = 'X'.
    CALL METHOD cl_gui_frontend_services=>file_save_dialog
      EXPORTING
        window_title         = 'Gui_Download Demo'
       with_encoding        = 'X'
        default_extension    = 'DAT'
        initial_directory    = 'C:\'
     CHANGING
        filename             = filename
        path                 = path
        fullpath             = fullpath
        user_action          = user_action
    FILE_ENCODING        = encoding
     EXCEPTIONS
        cntl_error           = 1
        error_no_gui         = 2
       not_supported_by_gui = 3
        OTHERS               = 4.
    IF sy-subrc <> 0.
      EXIT.
    ENDIF.
    IF user_action <> cl_gui_frontend_services=>action_ok.
      EXIT.
    ENDIF.
    IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                = fullpath
        filetype                = 'ASC'
        mode                    = ' '
        filetype_no_show        = 'X'
      TABLES
        data_tab                = data_tab
        fieldnames              = chtab
      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 i998 WITH 'Error downloading file'.
    ENDIF.
Rgrds
RK

Hi,
i think it is because tou need to uncomment:
     FILETYPE                      = 'ASC'
try it.
Best regards.

Similar Messages

  • GUI_DOWNLOAD: problems with table containing char length 8000

    Hi
    I have some problems using GUI_DOWNLOAD. Here is some of my code:
    DATA: g_record TYPE Z_CHAR8000 OCCURS 0 WITH HEADER LINE.
    z_char8000 is a char of length 8000
    insert code to fill data in g_record
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename                  = g_filename
          filetype                  = 'ASC'  
            filetype                  = 'BIN'  
            TRUNC_TRAILING_BLANKS     = 'X'
            TRUNC_TRAILING_BLANKS_EOL = 'X'
          TABLES
            data_tab                = g_record
          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.
    An example of data in g_record:
    Hans,Kruger,Berlin,Superstrass 3,0101709991,,,,,,,,,,,,
    When I open the resulting file in notepad the above data is present, and that's a good thing! The bad thing is that for every entry I have in the g_record table the GUI_DOWNLOAD puts 8000 characters into the file (the data from g_record and trailing blanks so that the line becomes 8000 chars long). I dont want the trailing blanks and TRUNC_TRAILING_BLANKS dont seem to work. Have any of you had hte same problem and/or is there a solution?!
    I have tried using filetype ASC and here I dont get the trailing blanks, but another problem hits me. I cant download more that 1024 characters from each entry in g_record and thats not good enough!
    Regards Anders

    Hi Andres,
    take this itab-definition for your download:
    TYPES:BEGIN OF ty_down,
          line TYPE string,
          END OF ty_down.
    DATA wa_down TYPE ty_down.
    DATA g_record  TYPE TABLE OF ty_down.
    regards Andreas

  • GUI_DOWNLOAD problem in unicode system

    Hi Guru's,
    I am facing one prolem in gui_download. we are doing unicode remediation in one report. In the program  one internal table declared as of type c with length 255 and data filled into the internal table by importing the data ifrom cluster. After  that this internal table  used  by ws_download function moduel with  file type as BIN to download it  in word doc file. We replaced the function module with gui_download. It is working fine in non-unicode system but it is not downloading properly in the unicode system.
    i am unable to find what is the cause.. I tried with different different codepages giving in run time..it is not solving my problem.
    << Moderator message - Everyone's problem is important. Please do not ask for help quickly. >>
    Thanks & Regards,
    Sastry R
    Edited by: Rob Burbank on Dec 13, 2010 9:39 AM

    Hi Clemens.
    I replaced the ws_download function module with gui_download.
    here is my code
    Earlier before 6.0 code as follows
    CALL FUNCTION 'WS_DOWNLOAD'
       EXPORTING
         bin_filesize            = data_len
         filename                = p_file
         filetype                = 'BIN'
       TABLES
         data_tab                = data_tab
       EXCEPTIONS
         file_open_error         = 1
         file_write_error        = 2
         invalid_filesize        = 3
         invalid_table_width     = 4
         invalid_type            = 5
         no_batch                = 6
         unknown_error           = 7
         gui_refuse_filetransfer = 8
         OTHERS                  = 9.
    IF sy-subrc <> 0 AND no_error_dlg = space.
       MESSAGE i002(sy) WITH text-i03.    "FILE OPEN ERROR
    ENDIF.
    Replaced above with following code
      DATA:lv_fname TYPE string,
           lv_ftype(10) VALUE 'BIN',
           lv_codepage type abap_encod VALUE '4102'.
    CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          bin_filesize            = data_len
          filename                = lv_fname
          filetype                = lv_ftype
          codepage                = lv_codepage
        CHANGING
          data_tab                = data_tab
        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
          not_supported_by_gui    = 22
          error_no_gui            = 23
          OTHERS                  = 24.
      IF sy-subrc <> 0 AND no_error_dlg = space.
        MESSAGE i002(sy) WITH text-i03.    "FILE OPEN ERROR
      ENDIF.
    I tried with all othr code pages also like 4110/4103/1110/1100/1102. It is not working,
    It is giving problem in unicode system. File is downloading.but not properly..
    and when i am opening the word file it is asking me select encoding type to make document readble along with the  available text encoding formats.
    Please help me..
    Thanks & Regards,
    Sastry R

  • GUI_DOWNLOAD problems with CR+LF when transfering from unicode system

    Hi,
    I was successfuly used FM GUI_DOWNLOAD in a non-unicode systems for years. Lately I faced a challenge to rewrite my code for a unicode system. The configuration is:
    - SAP R/3 unicode system;
    - data to be downloaded at presentation server in a non-unicode codepage (cp 9504).
    I have successfuly used a GUI_DOWNLOAD-parameter CODEPAGE and the data is translated correctly when checking local file, but due to some reasons CRLF are replaced with '#' (which is default value of REPLACEMENT parameter of this function) - means at the end of each row as a result I have '##' instead of CRLF.
    My question is: how can I force correct behaviour of GUI_DOWNLOAD in order to get my output file at presentation server with CR+LF?
    Any help would be highly appreciated.
    Many thanks in advance.
    Regards,
    Ivaylo Mutafchiev
    SAP/ABAP consultant
    VBS Ltd.
    P.S. In order to find some other way to fix my problem I'm still playing with the instanciation of a CL_ABAP_CONV_OBJ and its methods create & convert, but without success for now - resulted strings are not as expected.

    Hi,
    in fact, I never placed CRLF in my lines before your suggestion. The rest was done by the FM 'GUI_DOWNLOAD'. It works fine even when I use unicode file as output - means I got my CRLF at the end of the record in MY OUTPUT FILE ONLY but not in my internal table - I never placed CR+LF in there.
    The problem occures when I tried to use GUI_DOWNLOAD with parameter CODEPAGE = '9504' (some non-unicode codepage), and the original data (my internal table) is in unicode. Then (in my opinion) this function doesn't translate the unicoded CR+LF into non-unicode ones (if thats possible at all, I can't be sure) and the result is '##' in the output file.
    I checked the value of CL_ABAP_CHAR_UTILITIES=>CR_LF by getting it in my variable - and it is '##'.
    Whet should I put into this class-attribute in order to get it working in this scenario? I have no idea...
    The attribute type is ABAP_CR_LF - which is char 2.
    What next?
    Thanks,
    Ivaylo

  • GUI_DOWNLOAD problem... URGENT!!!

    Hi experts
    I'm having a problem that I need to solve urgent, the point is FM GUI_DOWNLOAD is excuted perfectly with parameters:
            CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                FILENAME                = 'C:test.xls'
                FILETYPE                = 'ASC'
                WRITE_FIELD_SEPARATOR   = 'X'
              TABLES
                DATA_TAB                = ti_salida2
              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.
    Excel output file is:
    100000000000000000  BLOCK  ZC01 OFICNOR
    ... and must be like this:
    100000000000000000598  BLOCK ZC01 OFICNOR
    Which parameter I must change for this? I will appreciate any helpfull information because it's urgent.
    Regards
    mgg
    Note: Points rewarded

    Hi Gabriel
    Values of internal table were assigned correctly during debug, problem is when FM is excecuted, exactly MATNR field.
    If I don't put parameter WRITE_FIELD_SEPARATOR   = 'X' , value of MATNR is downloaded as I need.
    Regards
    mgg

  • GUI_Download problem in tab delimited file

    Hi,
    I am trying to download tab delimited file using F.M GUI_DOWNLOAD.We have
    4.6C version.I have declared internal table with 5 columns.The file created using F.M is very strange.Column 1 and 2 and 3 and 4 are seaprated by tab but column 2
    and 3  and column 4 and 5 are not seaprated by tab but have fixed length.
    I am not getting where I am doing mistake.Any help is appericiated.
    Below is the structure of internal table.
    DATA:BEGIN OF IT_FINAL OCCURS 0,
           Company(3) type c,
           County(30) type c,
           FId(35) type c,
           Wellno(15) type c,
           Welldesc(35) type c,
         END OF IT_FINAL.
    Data populated in table it_final.
    it_final-Company = '300'.
    it_final-County = 'Greenwood'.
    it_final-fid = 'testts'.
    it_final-wellno = '10000000'.
    it_final-welldesc = 'tebsbvd'.
    append it_final.
    F.M GUI_DOWNLOAD
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
        BIN_FILESIZE                  =
          filename                      = l_path
        FILETYPE                      = 'ASC'
        APPEND                        = ' '
          write_field_separator         = 'X'
        HEADER                        = '00'
        TRUNC_TRAILING_BLANKS         = ' '
        WRITE_LF                      = 'X'
        COL_SELECT                    = ' '
        COL_SELECT_MASK               = ' '
        DAT_MODE                      = ' '
      IMPORTING
        FILELENGTH                    =
        TABLES
          data_tab                      = it_final
         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
    Thanks,
    Rekha.

    Hi,
    i think it is because tou need to uncomment:
         FILETYPE                      = 'ASC'
    try it.
    Best regards.

  • GUI_DOWNLOAD Problem

    We are converting our programs to Unicode and need to switch from WS_DOWNLOAD to GUI_DOWNLOAD.  GUI_DOWNLOAD is working fine except for when I need to download a specific record size.  I am trying to download a file with a record size of 80 but data only fills 74 characters of the line.  I have tried using both the TRUNC_TRAILING_BLANKS and TRUNC_TRAILING_BLANKS_EOL but it gives me a lot of extra spaces instead of the additional 6 spaces of each line that I want.
    I have checked OSS Notes and nothing seems to apply.
    Does anyone know what I need to do to just get a specific record size downloaded?

    Check out these progs ..Working fine for u ?
    RFUSVS14  and RFUSVX11 ... For Unicode system.
    It`ll give some clue ..see OSS notes # 931797,868752
    Hope this’ll give you idea!!
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • Function Module GUI_DOWNLOAD Problem in Japanese language.

    HI All,
    I am Using GUI_Download funtion module for downloading data from internal table to flat file.
    But one of the field having the value 'OLOA®5624'.
    In User login to Japanese Langualge:-
    After downloading data the value 'OLOA#5624' is apper insted of 'OLOA®5624'. (i.e the '®' - the symbol is replaced by # in the download ).
    If any one know please let me as early as possible.

    Hi,
    Once you download the data, you have to convert the data.
    Please check the below link for more help.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/79/c554afb3dc11d5993800508b6b8b11/frameset.htm
    Thanks,
    Ramakrishna

  • GUI_Download-  Problem in Excel

    Hi Experts
    I am using the Function moduleGui_download to download data from internal table to excel. My issue is, internal table having 93 records. But Excel having 63 records only. other 30 records are merged into 63rd record.
    Pls advise me.
    Thanks
    Kumar

    hi,
    try with this.
    data: begin of i_data occurs 0,
    vbeln like vbak-vbeln,
    ernam like vbak-ernam,
    end of i_data.
    DATA: lv_filename TYPE string.
    PARAMETERS: p_pcfile like RLGRAP-FILENAME.
    at selection-screen on VALUE-REQUEST FOR p_pcfile.
      perform getfile using p_pcfile.
    lv_filename = p_pcfile.
    select vbeln ernam from vbak into table i_data up to 63 rows.
    perform download.
    *&      Form  getfile
          text
         -->P_P_PCFILE  text
    form getfile  using    p_p_pcfile like rlgrap-filename.
      call function 'F4_FILENAME'
       EXPORTING
        PROGRAM_NAME        = SYST-CPROG
        DYNPRO_NUMBER       = SYST-DYNNR
         FIELD_NAME          = 'p_p_pcfile '
       IMPORTING
         FILE_NAME           = p_p_pcfile
    endform.                    " getfile
    *&      Form  download
          text
    -->  p1        text
    <--  p2        text
    form download .
    CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
      BIN_FILESIZE                    =
            FILENAME                        = lv_filename
         filetype                        = 'ASC'
           WRITE_FIELD_SEPARATOR            = 'X'
          TABLES
            DATA_TAB                        = i_data.
          FIELDNAMES                       = IT_HEADER
    endform.                    " download
    reward if useful.
    thanks and regards.
    Edited by: hema bobbili on May 6, 2008 8:51 AM

  • GUI_DOWNLOAD problem converting long numbers to exponents

    hello i am using gui download to download to excel and it is converting my 25 digit number to an exponent on my excel.  Is there a way around this ?  Thanks.

    Thanks for that tip.  I haven't tried putting the asterick in the front of it, but i think using another download FM will help.  But right now, I just went ahead and instead of using the format 'DAT' I used 'DBF' which ignores the conversions that excel does.  So it solved my problem with excel converting my values to an exponent, but the other problem that came about was the column heading was truncated at the space! So i was messing around with the parameters of trunc_spaces = ' ', but still it didn't help.
    So basically i just shorten my column headings. =)

  • Problem downloading in GUI_DOWNLOAD

    Please don't post your subjects in ALL CAPITALS
    HELLO FOLKS..
    I am downloading data from an int tab to excel.
    im using gui_download for that.
    we have to pass the internal table to this FM where all the fields' data are put into string field of itab
    separated by '#' and passed to FM.
    now the problem is- the data is getting copied into excel, but the hashes are still there. and the data is stored in only one cell not different.
    im using ascii encoding- 'ASC' and file encoding type '4103'.
    thanks in adv.
    Edited by: Matt on Jun 11, 2009 8:35 AM - edited title

    Hi Sumit,
    You need to declare constants like below:
    CONSTANTS: c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
               c_ret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
    And use the separator c_tab as below to concatenate the data into the workarea wa_objbin1 which will finally be updated to internal table t_objbin1.
    CONSTANTS: c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
               c_ret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
    And use the separator c_tab as below to concatenate the data into the workarea wa_objbin1 which will finally be updated to internal table t_objbin1.
    FORM  email_spreadsheet.
      DATA: l_check(3)      TYPE c,
            l_psapundo(3)   TYPE c,
            l_npsapundo(3)  TYPE c,
            wl_objbin_final TYPE solisti1.
      CLEAR wa_objbin1.
      CONCATENATE text-a01
                  text-a02
                  text-a03
                  text-a04
             INTO wa_objbin1 SEPARATED BY c_tab.
      CONCATENATE c_ret wa_objbin1 INTO wa_objbin1.
      APPEND wa_objbin1 TO t_objbin1.
      LOOP AT t_output INTO wa_output.
        MOVE : wa_output-check     TO l_check,
               wa_output-psapundo  TO l_psapundo,
               wa_output-npsapundo TO l_npsapundo.
        CONCATENATE wa_output-jobname
                    l_check
                    l_psapundo
                    l_npsapundo
               INTO wa_objbin1 SEPARATED BY c_tab.
        CONCATENATE c_ret wa_objbin1 INTO wa_objbin1.
        APPEND wa_objbin1 TO t_objbin1.
        CLEAR: wa_output, wa_objbin1.
      ENDLOOP.
      LOOP AT t_objbin1 INTO wa_objbin1.
        MOVE wa_objbin1-line TO wl_objbin_final-line.
        APPEND wl_objbin_final TO t_objbin_final.
        CLEAR: wa_objbin1, wl_objbin_final.
      ENDLOOP.
    ENDFORM.
    Then use this Perform to send the mail.
    FORM process_email.
    DATA: tl_objpack TYPE STANDARD TABLE OF sopcklsti1,
            wl_objpack TYPE sopcklsti1,
            tl_reclist TYPE STANDARD TABLE OF somlreci1,
            wl_reclist TYPE somlreci1,
            wl_mailid  TYPE tp_mailid,
            wl_docdata TYPE sodocchgi1.
    *--Body
      wl_docdata-obj_name  = 'Mail_Excel_File'(007).
      wl_docdata-obj_descr = 'Report on SAP Job Rollback Monitor'(008).
      CLEAR wa_objtxt.
      IF s_jobnam-low IS NOT INITIAL
         AND s_jobnam-high IS NOT INITIAL.
        CONCATENATE text-012 s_jobnam-low text-a05 ' ' s_jobnam-high
               INTO wa_objtxt SEPARATED BY space.
      ELSEIF s_jobnam-high IS INITIAL.
        CONCATENATE text-012 s_jobnam-low
               INTO wa_objtxt SEPARATED BY space.
      ENDIF.
      APPEND wa_objtxt TO t_objtxt.
    *-- Insert a blank line in the mail
      CLEAR wa_objtxt.
      APPEND INITIAL LINE TO t_objtxt.
      CLEAR wa_objtxt.
      IF t_output[] IS NOT INITIAL.
    *-- Please find attached the SAP Job Rollback Monitor
       MOVE text-009 TO wa_objtxt.
      ELSE.
    *-- No Jobs selected for the given criteria
       MOVE text-013 TO wa_objtxt.
      ENDIF.
      APPEND wa_objtxt TO t_objtxt.
      DESCRIBE TABLE t_objtxt LINES w_tab_lines.
      CLEAR wa_objtxt.
      READ TABLE t_objtxt INTO wa_objtxt INDEX w_tab_lines.
      wl_docdata-doc_size
             = ( w_tab_lines - 1 ) * 255 + STRLEN( wa_objtxt ).
      CLEAR wl_objpack.
      wl_objpack-head_start = 1.
      wl_objpack-head_num = 0.
      wl_objpack-body_start = 1.
      wl_objpack-body_num = w_tab_lines.
      wl_objpack-doc_type = 'RAW'.
      APPEND wl_objpack TO tl_objpack.
    *--Attachment
    *-- Check if any data is found for the given criteria
      IF NOT t_output[] IS INITIAL.
        DESCRIBE TABLE t_objbin1 LINES w_tab_lines.
        wl_objpack-doc_size = w_tab_lines * 255.
        wl_objpack-transf_bin = 'X'.
        wl_objpack-head_start = 1.
        wl_objpack-head_num = 1.
        wl_objpack-body_start = 1.
        wl_objpack-body_num = w_tab_lines.
        wl_objpack-doc_type = 'XLS'.
        wl_docdata-obj_name = 'Job Rollback Monitor'(010).
        wl_objpack-obj_descr = 'Report on SAP Job Rollback Monitor'(008).
        APPEND wl_objpack TO tl_objpack.
      ENDIF.
      LOOP AT s_mailid INTO wl_mailid.
        CLEAR wl_reclist.
    *--Create the list of recipients
        wl_reclist-receiver = wl_mailid-low.
        wl_reclist-rec_type = 'U'.
        wl_reclist-express  = 'X'.
        APPEND wl_reclist TO tl_reclist.
    *--Send the e-mail
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data              = wl_docdata
            put_in_outbox              = 'X'
            commit_work                = 'X'
          TABLES
            packing_list               = tl_objpack
            contents_bin               = t_objbin_final
            contents_txt               = t_objtxt
            receivers                  = tl_reclist
          EXCEPTIONS
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            OTHERS                     = 8.
        IF sy-subrc = 0.
          COMMIT WORK.
          MESSAGE s999(zz) WITH 'Mail Sent Successfully'(011).
        ENDIF.
        CLEAR wl_mailid.
        REFRESH tl_reclist[].
      ENDLOOP.
    ENDFORM.
    Regards,
    Amit.
    Edited by: AMIT BISHT on Jun 11, 2009 9:02 AM
    Edited by: AMIT BISHT on Jun 11, 2009 9:03 AM

  • Problem with GUI_DOWNLOAD fm in Background

    Hi Friends
    In my Report I am using the FM: GUI_DOWNLOAD and while running the report in foreground, I am getting the proper results. But while running the same in Background I am getting the error: CONTROL_FLUSH_ERROR .
    As my understanding ,to resolve this we have to upgrade the sap gui.
    Can anyone suggest me the exact reason for this error and the solution as well.
    Points are assured for useful answers.
    Regards,
    Sree

    Dear sir ,
    there is nothing to worry about it,
    while instaltion of the sap-gui,
    your grapics gui nested options are not tckied,
    at the time of instalation,
    in that there are two option one is at os level and
    2nd one is backen level.
    pls check the both option ticked or not.
    also check that the gui patch of new Ecc.vesrion, is
    under the AMC of the sap or not.
    pls ask to your basis admisitrator to reasign the
    runtime memory area roll out, should be more then rool in
    area.
    i think problem must solve.
    pls try and do this and keep in contact.
    REWARDS are expected.
    yours
    vivek

  • GUI_DOWNLOAD fn module text allignment problem

    Hi
    I have a problem while downloading data from internal table to presentation server filepath using GUI_DOWNLOAD fn module.
    For me the requirement is to display each field data at a fixed location in a DAT file (notepad) for all lines irrespective of any delimiter.
    Now data of ech field is getting displayed continuously after its preceeding field with the specified delimiter. I want to fix the location of each field at a particular point for all lines in the file after download.
    Is there any other fn module for this or any change in the parameters for fixing the field positions in the output file ?
    Harsha

    Hi Vinod
    I have tried your way solution also. Still my problem is not solved.
    Present Output:
    test test     E12EDWQD     0000110.000
    venky kirupa test case- final se     87549-8655-9     0000110.000
    Vetri Velan     SAFETWT     0000961.540
    Amount fieilds(last field) of each line  need to be alligned one below the other starting from same position in all lines. At present its all random based on the length of previous field.
    Harsha.

  • GUI_DOWNLOAD field names problem

    Hi,
    I have a problem with the haederline with the column names in the downloaded file.
    I'm using the function GUI_DOWNLOAD in the following way:
    DATA: ls_fieldnames  TYPE it_fieldnames,
            lt_fieldnames  TYPE STANDARD TABLE OF it_fieldnames.
    ls_fieldnames-fieldname = 'Column1'.
      APPEND ls_fieldnames TO lt_fieldnames.
      ls_fieldnames-fieldname = 'Column2'.
      APPEND ls_fieldnames TO lt_fieldnames.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = p_fname
          filetype                = 'DAT'
          codepage                = '4103'
        TABLES
          data_tab                = lt_table
          fieldnames              = lt_fieldnames
    The problem now is, that the header line is shown a several times in the text file. that means, it appears at very first (as it should), but also appears a several times between the data lines again.
    Does anyone have any idea what the problem is?
    Thank you!

    Hi,
    If you are downloading the file into an EXCEL  you can use the filetype 'DAT'.
    Here you are downloading into an Text file. So please try with the Filetype 'ASC'.
    Please try with this and also see what the pagecode 4103 does.
    With Regards,
    Sumodh.P

  • Problem in the local file download by gui_download,pls help!

    hello,everyone,
    when I use 'GUI_DOWNLOAD' to download file to my pc,the data in the file has some display problem,eg:'440006114002084000 'displayed as 4.40006E+17
    when I enlarge the excel grid,then the  '4.40006E+17 ' just not change to 440006114002084000,so does any know this problem?pls give me some help.
    thank you in advance.

    Hi,
    You need to change the content of the field in your internal table before you call gui_download.
    Something like
    constant: c_quote value `'`.
    loop at data_tab assigning <fs_data>.
    concatentate c_quote <fs_data>-ean into wa_ean.
    <fs_data>-ean = wa_ean.
    endloop.
    This will change the field from, for example 123456 to '123456, which Excel will treat as text.
    Regards,
    Nick

Maybe you are looking for

  • Voice memo app not working

    On the  iphone 5 when I click on the voice memos app it open and closes straight away.  When I have had this issues with other apps I can delete and reinstall them, however this is not possible to do with the voice memo app, does anyone have any idea

  • Macbook pro no airport installed

    Hi all i have problem in my macbook pro cannot detect airport even i already reinstalled my OSX leopard...anybody can help me regarding this issue.

  • Unix time to standard time

    hi, i am writing a program to convert Unix time in the normal date. I wrote the following program. The Input is not converted properly to the normal date. It prints date without any issue but the time is not correct. As per the java docs about the da

  • Mitigating SQL injection when forced to use substitution variables

    The 3rd party software that I use has exactly one way of allowing users to specify runtime parameters: Substitution variables. The scripts are executed using SQL*Plus. I'm looking for ways to secure this. Please don't say "Don't use substitution vari

  • Where are EXS24 Factory Samples stored?

    I am opening a LogicPro project I created a year ago, and the EXS24 sampler can't find several samples. It seems that several of the old Factory samples are no longer on my drive. I have done nothing to remove them. Could this have happened when upgr