Download data from ALV to excel issue

Hi All,
Could you please tell me if there has any restriction on ALV grid data download to excel? I've a report contains 68 columns and about 500 rows, I want to download the data using the standard menu list->export->save to local file. but after I download them, I found the first 65 columns display in one line and the rest columns display in next line, just like ALV do not allow too many characters in one row and have to switch to new line. I can hide some columns but it's very strange that even after i hide 3 columns to fit the 500 rows download, then if the rows increase, the same problem occurs.
I searched the forum and in the thread Re: Export ALV in EXCEL Issue Mr. Suvajit provided a solution by using menu List->export->spreadsheet, it looks very good. But I still want to know how this happen and is there a standard way to download data with more than 65 columns to local file with extension .xls so that user can open it directly?
PS: I'm using FM REUSE_ALV_GRID_DISPLAY and the SAP version is SAP ECC6 with kernal package SAPKB70103.
Thank you very much.
Best Regards,
Jeff
Edited by: Jeff_liu_2010 on Mar 10, 2011 7:21 AM

Hi Jeff,
Please check if following analysis is helpful to you.
Analysis/Solution:
When we export ALV data to excel worksheet, as sap notes say the maximum lenght allowed is 1023 charaters and the max no of columns supported is 90.
(I never faced any issue related to no of columns as it worked fine for columns >90 too)
Issue occured when row size of exported data gets more than 1023 character.
Therefore the row data must not exceed 1023 character, otherwise column splits and moves to next row.
One additional aspect generally missed is that:
When data in any particular column changes it's length, alv header also changes its lengh (short text, medium text, long text; depending on the length of of the longest cell in the column)
therefore even if you have total length of row less than 1023 character, there might be cases when your ALV header size exceeds this length.
Reducing the header size (by forcing to use short text or specifying own header names) should resolve the issue.
Regards,
Parveen

Similar Messages

  • How to download data from spool to excel file

    Hi,
    I have requirement like....i need to download data from spool to excel file.
    Please let me know the process how to download...
    <removed by moderator>
    <removed by moderator>
    Thanks,
    Khasimsa
    Moderator message: please (re)search yourself before asking, do not assign priorities, do not offer re-ward
    locked by: Thomas Zloch on Sep 8, 2010 1:18 PM

    Hi try this way..
    *FM called that returns the Spool Request Number data into and internal table
      CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
        EXPORTING
          rqident              = p_spool                     "Spool Request Number
          first_line           = 1
        TABLES
          buffer               = it_spool_xls                            "Internal table that will have the Spool Request No data
        EXCEPTIONS
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7
          OTHERS               = 8.
    *To convert the spool data into excel format
      CALL FUNCTION 'SO_RAW_TO_RTF'
        TABLES
          objcont_old = it_spool_xls               "Internal table having spool data
          objcont_new = it_xls_spool.           "Int table having Excel format data converted from Spool data
    "call GUI down Load by passing  it_xls_spool
    Prabhudas

  • How to download data from itab to Excel sheet..

    Hi sap Experts,
    I develop one report to download data from itab to excel sheet.I done it perfectly.
    My doubt is in the excel sheet i need to put headings. and also at last i need to display total no.of Records.
    Please help me how to do this.
         Thanks in Advance....
    Thanks and Regards
    Siri.......................

    u can either use GUI_DOWNLOAD or the method below...just give a try
    DATA:WK_string TYPE STRING.
    DATA:Wk_EXT(4) TYPE C value '.xls'.
    DATA:WK_path TYPE STRING.
    DATA:wk_file_name type string.
    data:wk_records type sy-tfill.
    wk_file_name = 'Downloaded'.
    describe table itab lines wk_records.
    LOOP AT ITAB.
    at first.
    **Provide path
    concatenate 'C:\' wk_file_name Wk_EXT into wk_path.
    open dataset WK_path for output in text mode encoding default.
    if sy-subrc  0.
    write:'ERROR while opening dataset !!!!!!'.
    EXIT.
    endif.
    CONDENSE wk_path.
    **Heading Part
    concatenate 'Part No' 'Description'
         into wk_string separated by cl_abap_char_utilities=>horizontal_tab.
    endat.
    **Data ITAB
    CONCATENATE ITAB-MATNR itab-maktx into wk_string
         separated by cl_abap_char_utilities=>horizontal_tab.
    transfer wk_string to WK_path.
    at last.
    clear wk_string.
    Concatenate  'Records Passed:' wk_string into wk_string.
    transfer wk_string to WK_path.
    close dataset WK_path.
    endat.
    endloop.

  • Download ICONS from ALV to EXCEL

    Dear Friends,
    IS there a way of downloading the ICON image exactly
    from alv to EXCEL,right now,when the icon is downloaded
    from alv to the excel,i can only see ascii characters in
    the icon column in the excel.
    kind regards
    kaushik hegde

    Hi Jeff,
    Please check if following analysis is helpful to you.
    Analysis/Solution:
    When we export ALV data to excel worksheet, as sap notes say the maximum lenght allowed is 1023 charaters and the max no of columns supported is 90.
    (I never faced any issue related to no of columns as it worked fine for columns >90 too)
    Issue occured when row size of exported data gets more than 1023 character.
    Therefore the row data must not exceed 1023 character, otherwise column splits and moves to next row.
    One additional aspect generally missed is that:
    When data in any particular column changes it's length, alv header also changes its lengh (short text, medium text, long text; depending on the length of of the longest cell in the column)
    therefore even if you have total length of row less than 1023 character, there might be cases when your ALV header size exceeds this length.
    Reducing the header size (by forcing to use short text or specifying own header names) should resolve the issue.
    Regards,
    Parveen

  • CL_SALV_BS_TT_RESULT_TABLE====CP error while downloading data from ALV grid

    Hi ,
    I am  facing a problem when ever i am going to donload data from ALV grid to excel file.I am getting CL_SALV_BS_TT_RESULT_TABLE====CP error in GET_CELL_VALUE. Could you please provide me is there any OSS note or any patch required to solve this issue.
    Thanks in Advance,
    Venkatarao.

    Hi,
    Just refer to OSS note 1356898 for guidelines.
    Regards,
    Vasanth

  • Download data from ui to excel

    Hello Experts,
    We have a requirement wherein, we need to download data from SAP CRM Web-ui (Assignment Block/View) to excel sheet(CSV) using a custom button.
    Kindly help me in doing so.
    Thanks,
    Anubhuti Dixit

    Hey Guys,
    anybody has a answer on this issue?

  • Download data from memory to Excel format.

    Hi Gurus,
        How can I download data from Memory( not in application server ) to Excel format ? Now I am using below function modules  but not coming in proper format.
    CALL FUNCTION 'LIST_FROM_MEMORY'
           TABLES
                listobject = listobject
           EXCEPTIONS
                OTHERS     = 1.
    CALL FUNCTION 'LIST_TO_ASCI'      "report to ASCII text
             TABLES
                  listasci           = listasci
                  listobject         = listobject
             EXCEPTIONS
                  empty_list         = 1
                  list_index_invalid = 2
                  OTHERS             = 3.

    Hi,
    use this function module.
    CALL FUNCTION  'SAPGUI_PROGRESS_INDICATOR'
    Regards,
    NNR.

  • Download data from cube to excel

    Hello gurus.
    I need to download data from a cube to excel... but is not possible to download all the data, because excel restrictions.
    Do you know a way to download all the data?
    Thanks in advance,
    Vitor Ramalho

    Open Hub Service can be invoked either directly as a transaction in the BW GUI
    ( RSBO ) or using the menu item u201CToolsu201D in the administrator workbench ( transaction
    RSA1 )
    Check the below link for further details.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7d63ec90-0201-0010-a2a7-898c08c589f8

  • Problem while downloadind data from ALV in excel format.

    Hi Experts,
    I have developed one ALV Report.
    it have 53 columns. when i tried to download it in excel format using standard functionality, all columns are not coming in one line i.e 50 cloumns in one line and rest columns to the next line.
    For Example.
    Row 1 Header->    Fld1    Fld2    Fld3   Fld4   Fld5 
                               Fld6    Fld7
    Row 2 Values->    Val1    Val2    Val3  Val4   Val5
                               Val6    Val7
    how i will get all these 53 columns in one line in EXCEL..
    its urget........
    Usefull answer will be rewarded...

    hi,
    there are some specific restrictions in downloading data in alv.
    i.e you cannot have morethan 1024 characters that can be downloaded in single row.
    so change your report columns accordingly.

  • Download data from jsp to Excel

    Originally, when I was using tomcat as the web server (installed at my local machine), I wrote a jsp which allows users to download Oracle table data to a Excel file. When the user clicks "Download" data, a "File Download" dialog box pops up and asks whether the user want to "Open this file from its current location" or "Save this file to disk". That is what I want.
    Now, I migrate the application to OC4J (installed at Sun Solaris Server), the same program is not working as the same way as above. If the user clicks the link, then the program simply display the jsp page. In order to download data, the user needs to right click the link and selects "Save Target as".
    How to make the application work just like it works on tomcat? Is this a programming issue or a server configuration issue?
    Thanks.
    Jingzhi

    Hi,
    I am having the same exact problem that you had months ago. Would love to hear if you came up with a solution? Original post included below...
    Thanks,
    Andres
    ORIGINAL POST:
    Hi
    I could successfully send the data from a jsp file to a excel file. But, I have a problem with the data. The data i pass is normally alpha numeric, but some times the data is something like '00123456'. In such cases, i am loosing the leading zeros and get '123456'. Is there any way i can get around with this problem?
    Help is greatly appreciated.
    Bharat

  • Download data from itab to excel in background (POINTS WILL BE REWARDED )

    Hi Guys...
    Is it possible to transfer data from an internal table to excel through a report which runs in background...???
    thnx in advance...

    Please refer following code.
    LOOP AT IT_EXCEL_LAYOUT.
      CONCATENATE: IT_EXCEL_LAYOUT-SLNO             ','
                   IT_EXCEL_LAYOUT-HERST            ','
                   IT_EXCEL_LAYOUT-QMNUM            ','
                   IT_EXCEL_LAYOUT-QERDAT           ','
                   IT_EXCEL_LAYOUT-AUFNR            ','
                   IT_EXCEL_LAYOUT-ERDAT            ','
                   IT_EXCEL_LAYOUT-EBELN            ','
                   IT_EXCEL_LAYOUT-AEDAT            ','
                   IT_EXCEL_LAYOUT-BELNR_M          ','
                   IT_EXCEL_LAYOUT-BSART            ','
                   IT_EXCEL_LAYOUT-MATNR            ','
                   IT_EXCEL_LAYOUT-TXZ01            ','
                   IT_EXCEL_LAYOUT-MTART            ','
                   IT_EXCEL_LAYOUT-MENGE            ','
                   IT_EXCEL_LAYOUT-CBAMT            ','
                   IT_EXCEL_LAYOUT-MMCRAMT          ','
                   IT_EXCEL_LAYOUT-CRN_NO           ','
                   IT_EXCEL_LAYOUT-MMDBAMT          ','
                   IT_EXCEL_LAYOUT-DBN_NO           ','
                   IT_EXCEL_LAYOUT-REJAMOUNT        ','
                   IT_EXCEL_LAYOUT-DBN_REJ_CODE_TEXT','
                   IT_EXCEL_LAYOUT-STAMT            ','
                   IT_EXCEL_LAYOUT-STXCAMT          ','
                   IT_EXCEL_LAYOUT-CRNNO            ','
                   IT_EXCEL_LAYOUT-LRNO             ','
                   IT_EXCEL_LAYOUT-LRDATE           ','
                   IT_EXCEL_LAYOUT-TRANSPORTERNAME
            INTO   IT_EXCEL-FLD.
          APPEND   IT_EXCEL.
    ENDLOOP.
    DATA:w_filename LIKE  CFFILE-FILENAME.
    CONCATENATE '/usr/sap/EC2/SYS/global/backup/'SY-UNAME '.csv' INTO w_filename.
    OPEN DATASET w_filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC = 0.
      LOOP AT IT_EXCEL.
         TRANSFER IT_EXCEL TO w_filename.
      ENDLOOP.
    ENDIF.
    CLOSE DATASET w_filename.
    It will help u to download data on to application server in csv format
    Regards,
    Swarup

  • Exporting data from ALV to Excel...

    Hi All,
      I am trying to export report to Excel with ALV Excel option on status bar, it works fine for 3 months data with 80 columns in the report. But when I run the report for one year data then report displays data fine in R/3 but when I download to Excel it's empty. The eroor is Dataset can't be processed by Excel.
    Then I tried with option Download ->Local file->spreadsheet. which doesn't save headers in it. And colums coming in two lines But user wants all columns with header if i do with this option it's not pulling headers.
      Please let me know if anybody had the same issue and came up with solution. That would be really great!
    Thank you.

    Hi Satya,
    Thanks for your reply.
    There will be around 60,000 records in the report with 80 to 100 columns. ALV report looks fine in R/3 but while downloading to Excel only it's saying ' Dataset can't be complete'. For 3,000 to 4,000 records it works fine.
            Is this because of huge data?

  • One field is not downloading properly from ALV to EXCEL

    Hi,
    while downloading ALV out put to EXCEL sheet one field(CSTCTR) is not displaying properly it's truncating left and right side digits,
    I have used function REUE_ALV_GRID_DISPLAY
    FORM SUMMARY_REPORT .
      PERFORM BUILD_FIELDCATLOG.
      IF I_FINAL[] IS INITIAL.
        MESSAGE I000 WITH 'NO DATA EXIST'.
        EXIT.
      ENDIF.
      ST_SETTINGS-EDT_CLL_CB = 'X'.
      V_REPID = SY-REPID.
      SORT I_FINAL BY WERKS GEBNR PERNR.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM       = V_REPID
                I_GRID_SETTINGS          = ST_SETTINGS
               I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
               I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
                IT_SORT                 = IT_SORT[]
                IT_FIELDCAT              = IT_FLDCAT[]
                IT_EVENTS                = IT_EVENTS[]
           TABLES
                T_OUTTAB                 = I_FINAL[]
           EXCEPTIONS
                PROGRAM_ERROR            = 1
                OTHERS                   = 2.
    ENDFORM.           " alv_display  summary_report
    *&      Form  build_fieldcatlog
          text
    FORM BUILD_FIELDCATLOG.
    WA_FLDCAT-FIELDNAME = 'WERKS'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'PA'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '1'.
      WA_FLDCAT-KEY     = 'X'.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'GEBNR'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'LOC'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '2'.
      WA_FLDCAT-KEY     = 'X'.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'PERNR'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'SAP #'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '3'.
      WA_FLDCAT-KEY     = 'X'.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'ADPFN'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'ADP #'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '4'.
      WA_FLDCAT-KEY     = 'X'.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'PERID'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'SSN'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '5'.
      WA_FLDCAT-KEY     = 'X'.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'KOSTL'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'CSTCTR'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '6'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'NACHN'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'LAST NAME'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '7'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'VORNA'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'FORST NAME'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '8'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'HIREDATE'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'HAL DATE'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '9'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'VACDATE'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'VAC DATE'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '10'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'GBDAT'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'BIRTHDT'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '11'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'SENDAT'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'SRDATE'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '12'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'SERADJDAT'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'SVCADJDT'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '13'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'TERMDATE'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'TERMDT'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '14'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'MGTXT'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'TERM REASON'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '15'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'GESCH'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = '***'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '16'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'RACKY'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'RACE'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '17'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'VTEXT'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'VET STAT'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '18'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'EXPAT'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'EXPAT'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '19'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'DISAB'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'DISAB'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '20'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'PTEXT'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'STAT'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '21'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'STELL'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'JOB'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '22'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'STLTX'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'JOB TITLE'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '23'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'PLANS'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'POSITION'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '24'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'PLSTX'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'POSITION T'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '25'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'AAPCT'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'JOBGP'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '26'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'EEOCT'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'EEO'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '27'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'ZBAND'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'BAND'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '28'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'EEOEX'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'FLSA'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '29'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
    *WHEN DIVG
      WA_FLDCAT-FIELDNAME = 'BETRG'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'BW/HR'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '30'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'ANSAL'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'ANNSAL'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '31'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'WOSTD'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'HRS'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '32'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'ZBONPLAN'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'PLAN'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '33'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
      WA_FLDCAT-FIELDNAME = 'ZTARGET'.
      WA_FLDCAT-OUTPUTLEN   = '10'.
      WA_FLDCAT-SELTEXT_M = 'TGT'.
      WA_FLDCAT-TABNAME = 'I_FINAL'.
      WA_FLDCAT-COL_POS = '34'.
      WA_FLDCAT-KEY     = ' '.
      APPEND WA_FLDCAT TO IT_FLDCAT.
      CLEAR   WA_FLDCAT.
    ENDFORM.                    " BUILD_FIELD CATLOG

    Also make sure if the reference field name and reference table name in the field cat .
    There will be some fields where in when dropped to excel will not hold the field properties and may not download properly,In such cases pass the reference fileds to the field cat .
    In the field cat u r using,  pass this and check .
    WA_FLDCAT-FIELDNAME = ' '. "
    WA_FLDCAT-OUTPUTLEN = 'XX'.
    WA_FLDCAT-SELTEXT_M = 'XXXXXXXXXXXXXXXXXXx'.
    WA_FLDCAT-TABNAME = 'I_FINAL'.
    wa_fldcat- -
    >reference field name,   
    wa_fldcat----
    >reference table name
    WA_FLDCAT-COL_POS = '25'.
    WA_FLDCAT-KEY = ' '.
    APPEND WA_FLDCAT TO IT_FLDCAT.
    CLEAR WA_FLDCAT.
    Br,
    Vijay.

  • Reg : export data from ALV to excel file

    Hi All,
    I am using REUSE_ALV_GRID_DISPLAY to display the output. I have total 73 columns getting displayed in output but when i export the data to the excel file using (ctrlshiftF9) I am getting only first 43 columns in the first row and from 44th column on wards the data is populated in the 1st  column of second row.
    Please let me know is there any particular setting by which I can get all the 73 columns in a single row.
    Thanks in advance.
    VIJAY

    Hi vijay,
    You can try setting your line width to 255 in your abap program.
    Otherwise,  you can try an alternative:
    1. Put a customize button on the ALV toolbar.
    2. Go to se41 to create th buttons
    2. do i_callback_program in ALV function. or SET PF_STATUS
    3. Then in sy-ucomm, use 'GUI_DOWNLOAD' to xls.
    Hope this helps you.
    Thanks
    William Wilstroth
    Edited by: william wilstroth on Dec 18, 2007 5:06 PM

  • Download Data from OBIEE to Excel using Macro (ODBC connection)

    Hi,
    We have OBIEE used as data source for reporting. Currently we manually go into OBIEE and download the report in Excel Format. However we want that to be automated by writing a macro and connecting directly do the DB and querying the data.
    Do anyone have the details on how to connect to OBIEE using Excel Macros? I am not a Oracle developer and I am not allowed to install any software in my system. So if there is a way I can connect, please let me know. Thanks so much for you help.

    download oracle bi for microsoft office software available in obiee>>answers>>more products. login to obiee to get it and once you installed then you can directly connect to obiee from excel itself and download report.
    Thanks
    Jay.

Maybe you are looking for