Excel Header Format using GUI_DOWNLOAD

Hi Experts,
I need to download the excel file with the below shown header format.
I can able to download as excel using GUI_DOWNLOAD. But I don't know how to bring the first row of the above pasted image.
Please advice any way to download the file with the above header format.
Thanks,
Srini

Here is some sample code of someone who has done this... i know lazy of me just to paste a link but I think it is the code that will fit your requirement.
http://scn.sap.com/message/6048823#6048823

Similar Messages

  • Need to avoid header When using GUI_DOWNLOAD with file type "DBF"

    Hi ,
    I am downloading internal table to excel on the desktop using GUI_DOWNLOAD with file type "DBF".
    Internal table I use do not have any header.
    But I do see the header in the downloaded file.
    It displays 1 row as " F1  F2 F3..ETC" heading for each column.
    Is there any variable we need to set to suppress header.
    Thank you,
    Kumar

    Hello Dilip,
    I tried using GUI_DOWNLOAD with FILE TYPE as "DBF", and i see the problem as mentioned. My question to you is:
    1. Why do you need 'DBF' format?
    2. Is it required to save the file as '.CSV'? Can you not try to save in '.XLS' file?
    Plz revert back.
    BR,
    Suhas

  • Need to remove header When using GUI_DOWNLOAD with file type "DBF"

    Hi ALL,
    I am using GUI_DOWNLOAD function module to downlaod data to csv file . I have taken FILE TYPE as "DBF" . After download , I have found data is downloaded along with a default header . Now how can I avoid Header while downloading.
    Please help me to solve this problem.
    thanks and regards,
    Dilip
    Edited by: dilip kumar on Jun 9, 2009 11:51 AM

    Hello Dilip,
    I tried using GUI_DOWNLOAD with FILE TYPE as "DBF", and i see the problem as mentioned. My question to you is:
    1. Why do you need 'DBF' format?
    2. Is it required to save the file as '.CSV'? Can you not try to save in '.XLS' file?
    Plz revert back.
    BR,
    Suhas

  • Problem with header download using GUI_DOWNLOAD

    Hi folks,
    Iam facing a particular problem while downloading an internal table to excel file using GUI_DOWNLOAD and file type as 'DBF'.
    Once i download the file, iam getting an automatic header with contents as "F1, F2, F3,...." for all the columns. But, i want to put my own header there. Is there any way out ?
    Thanks and Regards,
    Vijay.

    hi,
    may be this code will be helpful to u
    Just take one field in header(internal table) of type c. and push all the field headings into it.
    and give that internal table to fieldnames it will resolve the problem.
    DATA:BEGIN OF HEADER OCCURS 0,
          F1(30) TYPE C ,
         END OF HEADER.
    DATA:BEGIN OF ITEM OCCURS 0,
           IT1(30) TYPE C,
           IT2(3) TYPE C,
           IT3(4) TYPE C,
         END OF ITEM.
       HEADER-F1 = 'NAME'.
       APPEND HEADER.
       CLEAR HEADER.
       HEADER-F1 = 'AGE'.
       APPEND HEADER.
       CLEAR HEADER.
       HEADER-F1  = 'STAT'.
       APPEND HEADER.
       CLEAR HEADER.
    ITEM-IT1 = 'MANOHAR'.
    ITEM-IT2 = '124'.
    ITEM-IT3 = 'T'.
    APPEND ITEM.
    CLEAR ITEM.
    ITEM-IT1 = 'SAI'.
    ITEM-IT2 = '24'.
    ITEM-IT3 = 'T'.
    APPEND ITEM.
    CLEAR ITEM.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'C:\FILE13.XLS'
       FILETYPE                        = 'DBF'
      tables
        data_tab                        = ITEM
        FIELDNAMES                      = HEADER.
    regards,
    manohar.

  • Manipulating excel file while using GUI_DOWNLOAD

    hi all,
    while using GUI_UPLOAD i want to
    1) fix the width of the column of excel file
    2) define the font of the data in excel file
    3) change background color of the cells in excel file.
    please suggest as to how can this be done?

    using GUI_DOWNLOAD you can't change the data in excel sheet...if you want to do the things you need to use OLE concpets for downloading of data to Excel sheet wherein you can do most of the options excel can handle..
    Check within SDN as there are blogs for downloading data to Excel sheet using OLE concepts..

  • Export data in ANSI format using GUI_DOWNLOAD

    Hi,
    Please find below the issue description.
    We have a program that exports txt file which inturn is uploaded in a 3rd party system.
    Before upgrade, we were getting the txt file in ANSI format. (The program uses GUI_DOWNLOAD without any code page and file type is ASC)
    After upgrading the system to ECC 6, the program was modified to consider the code page 4103. But the txt file is in Unicode Format. (file type used in GUI_DOWNLOAD is ASC). As the 3rd party system is accepts only ANSI format, we manually change the format in windows and then upload.
    Please suggest.
    Regards,
    Senthil G.

    use class CL_ABAP_CONV_OUT_CE
    2) or use obn application server
      open dataset file for output in  legacy  text mode code page p_code.
    (for codepage look  in tabele TCP00!)
    grx
    A.
    Edited by: Andreas Mann on Nov 8, 2010 11:23 AM

  • Exception UNKNOWN_ERROR while using GUI_DOWNLOAD in POWL

    Hi,
    I am trying to use FM GUI_DOWNLOAD to download an internal table in POWL to an excel sheet.
    Using GUI_DOWNLOAD I get an exception 6 = UNKNOWN_ERROR.
    Can anyone help? Or should I be using another function module? If yes, which?
    Cheers
    Kiran

    Hello Kiran,
    Strange Problem. Please try the code below. Also, please try any other drive other than C drive.
    w_path---> file path in presentation server.
      IF w_filepath IS NOT INITIAL.
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename                  = w_filepath  "TYPE STRING
          TABLES
            data_tab                  = p_t_output "TYPE STANDARD TABLE.
          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.
        CASE sy-subrc.
          WHEN 0.
            IF w_flaginfo IS INITIAL.
              MESSAGE i109.
              w_flaginfo = 1.
            ENDIF.
          WHEN 1.
            MESSAGE e033 . "file write error
          WHEN 2.
            MESSAGE e034 . "no batch
          WHEN 3.
            MESSAGE e035 . "gui refuse filetransfer
          WHEN 4.
            MESSAGE e036 . "invalid type
          WHEN 5.
            MESSAGE e037 . "no authority
          WHEN 6.
            MESSAGE e038 . "unknown error
          WHEN 7.
            MESSAGE e039 . "header not allowed
          WHEN 8.
            MESSAGE e040 . "separator not allowed
          WHEN 9.
            MESSAGE e041 . "filesize not allowed
          WHEN 10.
            MESSAGE e042 . "header too long
          WHEN 11.
            MESSAGE e043 . "dp error create
          WHEN 12.
            MESSAGE e044 . "dp error send
          WHEN 13.
            MESSAGE e045 . "dp error write
          WHEN 14.
            MESSAGE e046 . "unknown dp error
          WHEN 15.
            MESSAGE e047 . "access denied
          WHEN 16.
            MESSAGE e048 . "dp out of memory
          WHEN 17.
            MESSAGE e049 . "disk full
          WHEN 18.
            MESSAGE e050 . "dp timeout
          WHEN 19.
            MESSAGE e051 . "file not found
          WHEN 20.
            MESSAGE e052 . "dataprovider exception
          WHEN 21.
            MESSAGE e053 . "control flush error
        ENDCASE.
      ENDIF.
    Please let me know if this works or not.
    Thanks,
    Jayant

  • Problem on zero's while using gui_download

    Hi,
    While downloading the internal table content for ex. ‘000010’ to Excel sheet by using ‘GUI_DOWNLOAD’ , zero’s are truncated and becomes  ‘10’(in this case).
    Is it any possible way to get as like ‘000010’?
    Thanks

    give the FILETYPE as  <b>DBF</b>  and checkout if it works
    or
    in the excel file , right click on that column>format cellschoose text

  • Using Gui_download for excel output

    Hi,
    I am using gui_download to output in excel format, my requirement is i want to start records from 3rd row in excel.
    On first row first column title shoud come? Second row blank,  i used fieldname for header in export paramenter from 3rd row.
    Plz help me to sove this issue.
    Thanks in advance.
    Vishnu.

    Hi vishnu,
    Here is the sample code below.
    *& Report  ZVK_TEST1
    REPORT  zvk_test1.
    TYPES:BEGIN OF ty_ekko,
            ebeln TYPE ekko-ebeln,
            bukrs TYPE ekko-bukrs,
    END OF ty_ekko.
    TYPES:BEGIN OF ty_fields,
            field TYPE dd03l-fieldname,
          END OF ty_fields.
    DATA:lt_ekko TYPE STANDARD TABLE OF ty_ekko,
         lt_dummy TYPE STANDARD TABLE OF ty_ekko.
    DATA:lw_ekko TYPE ty_ekko.
    APPEND INITIAL LINE TO lt_dummy.
    APPEND INITIAL LINE TO lt_dummy.
    SELECT ebeln bukrs INTO TABLE lt_ekko
      FROM ekko UP TO 10 ROWS.
    DATA:lt_fields TYPE TABLE OF ty_fields,
         lw_field TYPE ty_fields.
    lw_field-field = 'PO NUMBER'.
    APPEND lw_field TO lt_fields.
    lw_field-field = 'COMPANY CODE'.
    APPEND lw_field TO lt_fields.
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
       bin_filesize              =
        filename                  = 'C:\Documents and Settings\krishnavatte\Desktop\kris.xls'
        filetype                  = 'ASC'
      CHANGING
        data_tab                  = lt_dummy
      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.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
       bin_filesize              =
        filename                  = 'C:\Documents and Settings\krishnavatte\Desktop\kris.xls'
        filetype                  = 'ASC'
        append                    = 'X'
        write_field_separator     = 'X'
        fieldnames                = lt_fields
      CHANGING
        data_tab                  = lt_ekko
      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.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Extracting a Report from SAP Spool into a Useful Excel 2010 Format

    Hi All,
    Extracting a Report from SAP Spool into a Useful Excel 2010 Format.  I'm currently running the following report in SAP  and would like the
    ability to set this report up as a recurring report running weekly and
    subsequently access this report in a useable Excel 2010 format without
    much data manipulation.  Can you please assist me.  Below, I've tried to
    provide an example of what I'm encountering.   Thanks, beforehand for
    your assistance.
    Here goes:
    Step one: Run 62 Report in SAP S_P99_41000062- Material List Price and
    Inventory
    Step 2. Select stored Variant "Weekly KPI", ok. Enter the enter  the
    desired company code and period I want thre report to run for and update
    the currency, if necessary. Having input my desired criteria, I believe
    I can either execute immediately, run in the background, preset to run
    at date in the future. For this example let's just execute, immediately.
    This is where the difference originates. Given, I run this report
    immediately, I'm able to simply extract the result to Excel via the list
    selection noted in the tool bar below.  The result is a data friendly
    excel 2007  report is automatically generated.
    Export to Excel via list:
    Select save and Excel 2007 opens automatically:
    That said, the method outlined above works perfectly fine if you want
    the report immediately.  Now let go back and run the exact same report
    with exceptoin of running it in the background and having to retrieve it
    from the Spool (SP01) uisng my user ID.  Given the report generated in
    the background,  I would now access the report via the spool and make
    the following selections:
    SP01 + execute to see my report
    I would hit the sunglasses to see the actual report, then want to
    extract this report to Excel by selecting the export option.
    I would at this point select spreadsheet and be given an option to save
    the spreadsheet to local file. However, upon trying to open the
    spreadsheet I will receive an error messageindicating that the format is
    different than that which the file I am currently trying to open it
    with.  I'm currently running Excel 2010 on my computer.  The currency
    format and other issues arrise with this extract.  Please help. 
    Thanks,
    Chowadary.

    Update to Latest GUI.
    Use   List -> Export -> Spreadsheet  to get the output to excel.
    I remember in ALV max length allowed is 1023 characters and the max no of columns supported is 90. Issue occurs when row size of exported data gets more than 1023 character. (This includes if Long/Medium Header Text used ) If it exceed 1023 character the columns splits and moves to next row.
    Check your fieldcatog for header lengths.
    -Satya

  • Exporting char(string) to excel file using GUI_DOWNLOAD

    Dear Team,
    When i am trying to export Data of type Char(like 12345678987654321)  , after export it convert this data to Floating format(scientific n1E+n2) which is not my desired  output .i need to change it using excel cell format control.
    suggest me how can i handle this..
    Thanks in Advance*.

    Hello Santosh,
    Play with the below importing parameters in the function module "GUI_DOWNLOAD".
    WK1_N_FORMAT - Format for value columns in files of the type WK1
    WK1_N_SIZE - Column width for value columns in files of the type WK1
    WK1_T_FORMAT - Format for text columns for files of the type WK1
    WK1_T_SIZE - Column width for text columns for files of the type WK1.
    It might help you I guess. Also read the documentation of those importing parameters by clicking on the long text green icon after the description in the IMPORTING parameters tab of the function module.
    Regards,
    TP

  • How can i convert oracle report in excel format using 8i

    hi,
    I want to convert oracle report in excel format using 6i reports. please give the solution with emp table.
    millons of thanks in advance.

    You'll have to use the destype DELIMITEDDATA to render your Report in CSV format. Then set the mime type to Excel. I don't know the exact syntax, so please do a search in metalink for "reports excel" for examples and more info.
    Regards,
    Martin Malmstrom

  • Heading  during downloading into local file using GUI_DOWNLOAD fun.module

    Hi Guru's
    we have a requirement that we want the plant description as a heading (first line of the file) in the local file. iam using "GUI_DOWNLOAD" function module for downloading data for which iam passing the charecter type internal table. before downloading iam passing all the filed headings to that table and then appending the internal table data into it. now iam getting data properly with field headings . but before that heading i want one more description for a plant field which iam using in my selection screen
    in the fun.module "GUI_DOWNLAOD"
    we have HEADER file but it is of XSTRING type so it is taking only 2 char.
    so how to use this . Plz help me.
    thanks well in advance.
    UR's
    GSANA

    Hi,
    Please check the below link,
    header in 'gui_download'
    Also check Manoj kumar's reply in the link,
    header information to gui_download
    Hope this helps.
    Best Regards.

  • Need to include header in csv file while using GUI_DOWNLOAD

    Hi,
    Iam using GUI_DOWNLOAD for downloading certain texts,its working fine.now i need to include the header(i'e) some text say 'This is a error file'at the top.how can i do this?

    REPORT  ZTEST12347                              .
    DATA: BEGIN OF ITAB OCCURS 0,
            VBELN LIKE VBAK-VBELN,
            POSNR LIKE VBAP-POSNR,
          END OF ITAB.
    SELECT VBELN
           POSNR
          FROM VBAP
          UP TO 20 ROWS
          INTO TABLE ITAB.
    DATA: IT_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE.
    IT_LINE-TDLINE = 'this is error file'.
    append it_line.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                = 'C:test.txt'
      TABLES
        DATA_TAB                = IT_LINE
      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.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        FILENAME                = 'C:test.txt'
        APPEND                  = 'X'
      TABLES
        DATA_TAB                = ITAB
      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.

  • How to get Header in Downloaded .xls file using  GUI_Download function

    How to get Header in Downloaded .xls file using  GUI_Download function ???
    How to use the the Header parameter available in GUI_Download function .

    HI,
    see this sample code..
    data : Begin of t_header occurs 0,
           name(30) type c,
           end of t_header.
    data : Begin of itab occurs 0,
           fld1 type char10,
           fld2 type char10,
           fld3 type char10,
           end   of itab.
    DATA: v_pass_path TYPE string.
    append itab.
    itab-fld1 = 'Hi'.
    itab-fld2 = 'hello'.
    itab-fld3 = 'welcome'.
    append itab.
    append itab.
    append itab.
    append itab.
    append itab.
    t_header-name = 'Field1'.
    append t_header.
    t_header-name = 'Field2'.
    append t_header.
    t_header-name = 'Field3'.
    append t_header.
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
        EXPORTING
          default_extension     = 'XLS'
        IMPORTING
          fullpath              = v_pass_path.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_pass_path
          filetype                        = 'DBF'
        TABLES
          data_tab                        = itab
          FIELDNAMES                      = t_header
    Cheers,
    jose.

Maybe you are looking for

  • IPhone syncing problem with iTunes - 'The iPhone "Leon's iPhone" cannot be synced. An unknown error occurred (-54)

    Every time I plug my iPhone into iTunes, it says 'The iPhone "Leon's iPhone" cannot be synced. An unknown error occurred (-54)'. It has never happened to me before until a couple of hours ago!!! So, I decided to totally wipe out my iTunes Library and

  • WSAD issue with unresolved types...

    Hi, I'm new to servlets and WS is sayng that it doesn't understand "response" i.e. response.setContentType("text/html");. Do I need to import more than the usual things, or is it something in the build path that needs to be changed? Here are the clas

  • Older MacBook connects to guest netowrk, but not main

    I recently set up a home network with the newest model Airport Extreme. I've set it up with a home network, as well as a guest network. It has been working flawlessly, with one exception. My older MacBook (3yrs old, white) had been connecting to my m

  • Adobe Updates via SCUP

    I am attempting to push out updates for Adobe products using SCUP but am running into a strange issue when clients attempt to install them. The clients all see that flash player 11.9.900.170 is available and a required update based on the version cur

  • Oracle Apex export application getting access denied when trying to download

    DB: 11.2.0.3 Apex: 4.2.2.00.11 Apex Listener: 2.0.3.221.10.13 WLS: 10.3.6.0 Chrome: Version 29.0.1547.76 m and IE 10.0.9200.16660 I'm the admin of the workspace that has one application. Made a change to the application and went to export the applica