Max. no of columns in ALV Excel download

I've a problem regarding the download of data from alv report's that have more than 99 columns.
I have searched the forum but couldn't find a right answer.
It is being done by standard option and not by custom functionality is there any way where we can increase this limitation.

I don't know if there is a way it for more columns using that function.     But I suggest you to use excel inplace tool. With excel inplace users directly display and maintain values in SAP screen and they can save final document without any limits I think. Just go to change layout-> view and choose microsoft excel. To be able to display excel using this option macro security in installed MS Excel should be in low and VB script execution must be on.

Similar Messages

  • ALV Excel download problem

    Hi,
    I am trying to download ALV report to excel but the columns in the o/p is appearing in two rows.
    THe ALV report has 82 columns in o/p.Is there any restriction on the no of columns that can be downloaded in excel.Please help.
    Thanks,
    Sutapa.

    Hi Sutapa,
    Kindly go through this link below for ALV Excel Download:
    Re: how to view alv grid output in excel format(not downloading to pc)
    Hope it helps
    Regrds
    Mansi

  • ALV - Excel download Date field sits in the last Column

    Hi,
    I have custom ALV grid report using OOp . From the report i am exporting the results to an EXCEL, but the date columns in the report sits as last column the exported excel.
    Any idea ?
    Thanks
    aRs

    That is the default functionality of the ALV grid, it collects all the similar data types together and then donwloads the data.
    If you don't want that, you will have write code yourself and download the data
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • ALV Excel Download problem ( Special Character)

    Hi,
    I am unable to download completely in XLS format from ALV grid. When i tried in couple of ways there is a special character( " ) in one of the filed. Due to the same Excel download has some problem. I tested by removing those and it worked fine, 
    Please suggest me to solve the issue.
    Thanks,
    Bhanu Gattu,

    Data strings with special characters can not be downloaded into XLS format from ALV grid. In my case, I replaced the special character " with space and I could download the data into excel.

  • ALV -Excel download -header & data comming in Different columns

    Hi,
    I have an ALV report with FM.When I download it to excel through LIST/EXPORT/LOCALFILE some columns are getting messed up (ex: header is in one column and data is comming in different column).
    When i do with LIST/EXPORT/SPREADSHEET option it is working fine.
    but users want to use the first option only.
    I am use FM's in this report.
    Regards
    Praveen

    Hi
    What is the statement you used to dowload data .Check the field catalog that u are passing to downloaad function module.
    or check in the debuging mode..
    change these options in excel sheet and checkout if it can help u
    1. Go to Tools -> Macro -> Security in Excel
    2. Select the ‘Trusted Sources’ tab and ensure that the checkbox titled ‘Trust access to Visual Basic Project’ is ticked.
    3. With the feature switched on, the data is passed to Excel.
    check this sample one
    TABLES : MAST , "Material to BOM Link
    STKO , "BOM Header
    MARA . "General Material Data
    * Types Begin with TY_ *
    TYPES : BEGIN OF TY_MASTER ,
    MATNR TYPE MAST-MATNR , "Material Number
    WERKS TYPE MAST-WERKS , "Plant
    STLAN TYPE MAST-STLAN , "BOM Usage
    STLNR TYPE MAST-STLNR , "Bill of material
    STLAL TYPE MAST-STLAL , "Alternative BOM
    ANDAT TYPE MAST-ANDAT , "Date record created on
    AEDAT TYPE MAST-AEDAT , "Date of Last Change
    AENAM TYPE MAST-AENAM , "Name of Person Who Changed Object
    STLST TYPE STKO-STLST , "BOM status
    ZPLP1 TYPE MBEW-ZPLP1 , "Future Planned Price 1
    DWERK TYPE MVKE-DWERK , "Delivering Plant (Own or External)
    END OF TY_MASTER .
    TYPES : MY_TYPE(20) TYPE C.
    * Constants Begin with C_ *
    * Internal tables Begin with IT_ *
    DATA : IT_MASTER TYPE STANDARD TABLE OF TY_MASTER,
    WA_MASTER TYPE TY_MASTER .
    DATA : IT_HEADER TYPE TABLE OF MY_TYPE.
    * Data Begin with W_ *
    DATA : W_PTH TYPE RLGRAP-FILENAME.
    DATA : W_FILE TYPE RLGRAP-FILENAME.
    * Field Symbols Begin with FS_ *
    * Select Options Begin with SO_ *
    * Parameter Begin with PR_ *
    * I N I T I A L I Z A T I O N *
    *--- Add Header Fields to Header Table ---
    APPEND 'Material Number' TO IT_HEADER .
    APPEND 'Plant' TO IT_HEADER .
    APPEND 'BOM Usage' TO IT_HEADER .
    APPEND 'Bill Code' TO IT_HEADER .
    APPEND 'Alternative BOM' TO IT_HEADER .
    APPEND 'Created On' TO IT_HEADER .
    APPEND 'Changed On' TO IT_HEADER .
    APPEND 'Changed By' TO IT_HEADER .
    APPEND 'BOM Status' TO IT_HEADER .
    APPEND 'Planned Price' TO IT_HEADER .
    APPEND 'Delivery Plant' TO IT_HEADER .
    IF SY-MANDT = '700'.
    W_PTH = '\lkdb01ISDISSoftware DevelopmentsDevelopmentsData FilesSAP DumpsBOM_Available'.
    ELSE.
    W_PTH = 'C:'.
    ENDIF.
    * A T S E L E C T I O N S C R E E N *
    * s t a r t o f s e l e c t i o n
    START-OF-SELECTION.
    *--- Load Data to Internal Table ---
    * SELECT MAST~MATNR MAST~WERKS MAST~STLAN MAST~STLNR MAST~STLAL MAST~ANDAT MAST~AEDAT MAST~AENAM STKO~STLST
    * INTO TABLE IT_MASTER
    * FROM MAST
    * INNER JOIN STKO ON STKO~STLNR EQ MAST~STLNR
    * AND STKO~STLAL EQ MAST~STLAL
    * INNER JOIN MARA ON MARA~MATNR EQ MAST~MATNR
    * WHERE MARA~MTART LIKE 'ZFG%'
    * AND STKO~LKENZ NE 'X'
    * AND STKO~LOEKZ NE 'X'
    * AND STKO~STLST EQ '1'.
    SELECT MAST~MATNR MAST~WERKS MAST~STLAN MAST~STLNR MAST~STLAL MAST~ANDAT MAST~AEDAT MAST~AENAM STKO~STLST MBEW~ZPLP1 MVKE~DWERK
    INTO TABLE IT_MASTER
    FROM MAST
    INNER JOIN STKO ON STKO~STLNR EQ MAST~STLNR
    AND STKO~STLAL EQ MAST~STLAL
    INNER JOIN MARA ON MARA~MATNR EQ MAST~MATNR
    INNER JOIN MBEW ON MBEW~MATNR EQ MAST~MATNR
    AND MBEW~BWKEY EQ MAST~WERKS
    INNER JOIN MVKE ON MVKE~MATNR EQ MAST~MATNR
    WHERE MARA~MTART LIKE 'ZFG%'
    AND STKO~LKENZ NE 'X'
    AND STKO~LOEKZ NE 'X'
    AND STKO~STLST EQ '1'.
    IF SY-SUBRC <> 0.
    MESSAGE I014(ZLOAD).
    ENDIF.
    *--- Set Path to Function Module ---
    CONCATENATE W_PTH SY-DATUM ' - ' 'BOM_AVAILABLE_PLANT.XLS' INTO W_FILE.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    FILENAME = W_FILE
    FILETYPE = 'DAT'
    TABLES
    DATA_TAB = IT_MASTER
    FIELDNAMES = IT_HEADER
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_WRITE_ERROR = 2
    INVALID_FILESIZE = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_EIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    OTHERS = 10.
    IF SY-SUBRC = 0.
    SUBMIT ZI005_MARA_DUMP_SOLIDEAL_N.
    MESSAGE I023(ZLOAD) WITH text-001.
    ELSE.
    MESSAGE I022(ZLOAD) WITH W_FILE. "Errors while downloading.
    ENDIF.
    END-OF-SELECTION.
    SUBMIT ZI005_MARA_DUMP_SOLIDEAL_N.
    Reward all helpfull answers
    Regards
    Pavan
    Message was edited by:
            Pavan praveen

  • Row to column conversion during excel download

    Dear Experts,
    I have an internal table with one column.
    It has some entries say ten.
    I want this ten rows of entries to be displayed in the excel sheet as a single row. It means each row entry of the internal table should fit in to each cell.
    Is there any possibility with GUI_DOWNLOAD FM to do this?
    If not, then how could i do that?
    Please let me know its urgent.
    Regards,
    Shashi

    Hi,
    i m not aware of whether it can be done through FM 'GUI_DOWNLOAD' but i have one sugeestion.
    You can first transpose your internal table and then download it.
    Sample code for obtaining the transpose is as follows:
    *& Report Z_TRANPOSEALV *
    *& Author : Swarna.S.
    *& AS: This simple ALV report display is in a transposed way
    *& Publised at ****************
    REPORT Z_TRANSPOSEALV .
    Type pools declaration for ALV
    TYPE-POOLS: slis.
    *Declarations for ALV, dynamic table and col no for transpose
    DATA: l_col TYPE sy-tabix,
    l_structure TYPE REF TO data,
    l_dyntable TYPE REF TO data,
    wa_lvc_cat TYPE lvc_s_fcat,
    lt_lvc_cat TYPE lvc_t_fcat,
    lt_fieldcatalogue TYPE slis_t_fieldcat_alv,
    wa_fieldcat TYPE slis_fieldcat_alv,
    lt_fieldcat TYPE slis_t_fieldcat_alv,
    lt_layout TYPE slis_layout_alv.
    *Field symbols declarations
    FIELD-SYMBOLS :
    <header> TYPE ANY,
    <dynheader> TYPE ANY,
    <dyndata> TYPE ANY,
    <ls_table> TYPE ANY,
    <dynamictable> TYPE STANDARD TABLE,
    <it_table> TYPE STANDARD TABLE.
    *Input the name of the table
    PARAMETERS p_table TYPE dd02l-tabname OBLIGATORY.
    *Initialization event
    INITIALIZATION.
    *Start of selection event
    START-OF-SELECTION.
    Create internal table of dynamic type
    CREATE DATA l_dyntable TYPE STANDARD TABLE OF (p_table)
    WITH NON-UNIQUE DEFAULT KEY.
    ASSIGN l_dyntable->* TO <it_table>.
    *select statement to select data from the table as input into
    *our dynamic internal table.
    *Here i have restricted only till 5 rows.
    *You can set a variable and give no of rows to be fetched
    *The variable can be set in your select statement
    SELECT * INTO CORRESPONDING FIELDS OF TABLE <it_table>
    FROM (p_table) up to 5 rows.
    *Fieldcatalogue definitions
    wa_lvc_cat-fieldname = 'COLUMNTEXT'.
    wa_lvc_cat-ref_table = 'LVC_S_DETA'.
    APPEND wa_lvc_cat TO lt_lvc_cat.
    wa_fieldcat-fieldname = 'COLUMNTEXT'.
    wa_fieldcat-ref_tabname = 'LVC_S_DETA'.
    wa_fieldcat-key = 'X'..
    APPEND wa_fieldcat TO lt_fieldcat.
    DESCRIBE TABLE <it_table>.
    DO sy-tfill TIMES.
    For each line, a column 'VALUEx' is created in the fieldcatalog
    Build Fieldcatalog
    WRITE sy-index TO wa_lvc_cat-fieldname LEFT-JUSTIFIED.
    CONCATENATE 'VALUE' wa_lvc_cat-fieldname
    INTO wa_lvc_cat-fieldname.
    wa_lvc_cat-ref_field = 'VALUE'.
    wa_lvc_cat-ref_table = 'LVC_S_DETA'.
    APPEND wa_lvc_cat TO lt_lvc_cat.
    Build Fieldcatalog
    CLEAR wa_fieldcat.
    wa_fieldcat-fieldname = wa_lvc_cat-fieldname.
    wa_fieldcat-ref_fieldname = 'VALUE'.
    wa_fieldcat-ref_tabname = 'LVC_S_DETA'.
    APPEND wa_fieldcat TO lt_fieldcat.
    ENDDO.
    Create dynamic internal table
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    it_fieldcatalog = lt_lvc_cat
    IMPORTING
    ep_table = l_dyntable. ASSIGN l_dyntable->* TO <dynamictable>.
    Create structure as structure of the internal table
    CREATE DATA l_structure LIKE LINE OF <dynamictable>.
    ASSIGN l_structure->* TO <header>.
    Create structure = structure of the internal table
    CREATE DATA l_structure LIKE LINE OF <it_table>.
    ASSIGN l_structure->* TO <ls_table>.
    Create field catalog from our table structure
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_structure_name = p_table
    CHANGING
    ct_fieldcat = lt_fieldcatalogue
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF. DESCRIBE TABLE lt_fieldcatalogue.
    Fill the internal to display <dynamictable>
    DO sy-tfill TIMES.
    IF sy-index = 1.
    READ TABLE lt_fieldcatalogue INTO wa_fieldcat INDEX 1.
    ENDIF.
    For each field of it_table
    ASSIGN COMPONENT 1 OF STRUCTURE <header> TO <dynheader>.
    IF sy-subrc NE 0. EXIT .ENDIF.
    READ TABLE lt_fieldcatalogue INTO wa_fieldcat INDEX sy-index.
    Fill 1st column
    <dynheader> = wa_fieldcat-seltext_m.
    IF <dynheader> IS INITIAL.
    <dynheader> = wa_fieldcat-fieldname.
    ENDIF.
    *Filling the other columns
    LOOP AT <it_table> INTO <ls_table>.
    l_col = sy-tabix + 1.
    ASSIGN COMPONENT sy-index OF STRUCTURE <ls_table> TO <dyndata>.
    IF sy-subrc NE 0. EXIT .ENDIF.
    ASSIGN COMPONENT l_col OF STRUCTURE <header> TO
    <dynheader>.
    IF sy-subrc NE 0. EXIT .ENDIF.
    WRITE <dyndata> TO <dynheader> LEFT-JUSTIFIED.
    ENDLOOP.
    APPEND <header> TO <dynamictable>.
    ENDDO.
    *Layout for ALV output
    lt_layout-zebra = 'X'.
    lt_layout-no_colhead = 'X'..
    lt_layout-colwidth_optimize ='X'.
    lt_layout-window_titlebar = 'ALV GRID TRANSPOSED'.
    *ALV Grid output for display
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    is_layout = lt_layout
    it_fieldcat = lt_fieldcat
    TABLES
    t_outtab = <dynamictable>.
    Regards,
    Karuna.

  • Blocked ALV Excel Download Issue

    Hi Experts,
    My customers requirement is to download the output of Quotation Comparison Report with exact alignments as how it displays on Screen.
    When I tried to download from Standard SAP Save options, like List->save.... Export.. Spreadsheet........, I am not getting the same format into the Excel Sheet.
    I went into the program to check and found that it is a Blocked ALV.
    I have 3 Blocks in the Outputs.
    I am missing the alignment of Second Block having "Quoted" "Negotiated" to left side.
    Kindly help me in downloading this as it is.
    Regards,
    G.V.S Praveen Kumar

    Hi Sumeet,
    DATA: lv_exit   TYPE char1,                               "#EC NEEDED
             lwa_exit  TYPE slis_exit_by_user,                   "#EC NEEDED
             lt_excl   TYPE slis_t_extab,
             lwa_event TYPE slis_alv_event.
       DATA: lwa_layout1 TYPE slis_layout_alv,
             lwa_layout2 TYPE slis_layout_alv,
             lwa_layout3 TYPE slis_layout_alv,
             lt_events   TYPE slis_t_event.
    FIELD-SYMBOLS: <t_block1> TYPE STANDARD TABLE,
                    <t_block2> TYPE STANDARD TABLE,
                    <t_block3> TYPE STANDARD TABLE,
                    <w_block>  TYPE any.
    * Initializing the Block List
       CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
         EXPORTING
           i_callback_program       = sy-repid
           i_callback_pf_status_set = 'PF_STATUS'
           i_callback_user_command  = 'USER_COMMAND'
           it_excluding             = lt_excl.
    CONSTANTS:slis_ev_top_of_list TYPE slis_formname VALUE 'TOP_OF_LIST'.
       lwa_event-name = slis_ev_top_of_list.
       lwa_event-form = 'HEADER_TOP_OF_LIST'.
       APPEND lwa_event TO lt_events.
       CLEAR  lwa_event.
       lwa_layout1-no_colhead = 'X'.
       lwa_layout1-zebra = 'X'.
    * Appending the block data for header to the list
       CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
         EXPORTING
           is_layout                  = lwa_layout1
           it_fieldcat                = t_fld1
           i_tabname                  = '<T_BLOCK1>'
           it_events                  = lt_events
         TABLES
           t_outtab                   = <t_block1>
         EXCEPTIONS
           program_error              = 1
           maximum_of_appends_reached = 2
           OTHERS                     = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
       REFRESH lt_events.
       lwa_event-name = slis_ev_top_of_list.
       lwa_event-form = 'ITEM_TOP_OF_LIST'.
       APPEND lwa_event TO lt_events.
       CLEAR  lwa_event.
       lwa_layout2-no_colhead = 'X'.
       lwa_layout2-zebra = 'X'.
    * Appending the block data for item to the list
       CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
         EXPORTING
           is_layout                  = lwa_layout2
           it_fieldcat                = t_fld2
           i_tabname                  = '<T_BLOCK2>'
           it_events                  = lt_events
         TABLES
           t_outtab                   = <t_block2>
         EXCEPTIONS
           program_error              = 1
           maximum_of_appends_reached = 2
           OTHERS                     = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
       lwa_layout3-no_colhead = 'X'.
       lwa_layout3-zebra = 'X'.
       REFRESH lt_events.
    * Appending the block data for item to the list
       CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
         EXPORTING
           is_layout                  = lwa_layout3
           it_fieldcat                = t_fld3
           i_tabname                  = '<T_BLOCK3>'
           it_events                  = lt_events
         TABLES
           t_outtab                   = <t_block3>
         EXCEPTIONS
           program_error              = 1
           maximum_of_appends_reached = 2
           OTHERS                     = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    * Displaying the block list
       CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
         EXPORTING
           i_screen_start_column   = 0
           i_screen_start_line     = 0
           i_screen_end_column     = 0
           i_screen_end_line       = 0
         IMPORTING
           e_exit_caused_by_caller = lv_exit
           es_exit_caused_by_user  = lwa_exit
         EXCEPTIONS
           program_error           = 1
           OTHERS                  = 2.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.

  • Alv Excel download

    Hi,
    I written a ALV Grid report and i want to download the the report to Excel.
    When I click on the excel button on the menu, Excel opens and the report is downloaded . BUT all the data with decimals are not downloaded it shows blank ,
    Can any one help me on this  .
    But when I use export to excel it works properly but my customer want to click on the excel and download
    Thanking you,
    Raju S

    hi raju,
    please try this,
    Open Excel -> Tools -> Options -> Security -> Macro Security -> Make it low.
    Now on the same path open tab -> Trusted Publishers and Check the checkbox for Trust Access to VB Project.
    Use the FM - ALV_XXL_CALL. here is the sample -
    REPORT ZSKC_ALV_XXL.
    TYPE-POOLS : KKBLO.
    DATA : ITAB LIKE T100 OCCURS 0,
    T_FCAT_LVC TYPE LVC_S_FCAT OCCURS 0 WITH HEADER LINE,
    T_FCAT_KKB TYPE KKBLO_T_FIELDCAT.
    START-OF-SELECTION.
    Get data.
    SELECT * UP TO 20 ROWS
    FROM T100
    INTO TABLE ITAB
    WHERE SPRSL = SY-LANGU.
    CHECK SY-SUBRC EQ 0.
    Create the field catalog.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    I_STRUCTURE_NAME = 'T100'
    CHANGING
    CT_FIELDCAT = T_FCAT_LVC[]
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3.
    CHECK SY-SUBRC EQ 0.
    make sure you pass the correct internal table name in the field catalog.
    t_fcat_lvC-tabname = 'ITAB'.
    MODIFY T_FCAT_LVC TRANSPORTING TABNAME WHERE TABNAME NE SPACE.
    Transfer to KKBLO format.
    CALL FUNCTION 'LVC_TRANSFER_TO_KKBLO'
    EXPORTING
    IT_FIELDCAT_LVC = T_FCAT_LVC[]
    IMPORTING
    ET_FIELDCAT_KKBLO = T_FCAT_KKB
    EXCEPTIONS
    IT_DATA_MISSING = 1
    IT_FIELDCAT_LVC_MISSING = 2
    OTHERS = 3.
    CHECK SY-SUBRC EQ 0.
    Call XXL.
    CALL FUNCTION 'ALV_XXL_CALL'
    EXPORTING
    I_TABNAME = 'ITAB'
    IT_FIELDCAT = T_FCAT_KKB
    TABLES
    IT_OUTTAB = ITAB[]
    EXCEPTIONS
    FATAL_ERROR = 1
    NO_DISPLAY_POSSIBLE = 2
    OTHERS = 3.
    IF SY-SUBRC 0.
    ENDIF.
    Dont forget to reward,
    Thanks & Regards,
    Kalyan.

  • Max number of columns in Alv grid display.

    Is there any limitation on number of fields that can be displayed using alv grid display.
    Please tell how i can display 199 fields using ALV.
    Thanks in advance.

    I am not sure of the maximum of columns possible.
    If you see the col_pos field in the field catalog table it can have only 2 digits. so i would assume it would be only 99 columns, but not sure.
    Would get you more information soon.
    Thanks,
    Balaji

  • Trigger event of Excel download in ALV

    From my menu bar on the screen can i trigger the alv
    excel download feature.

    Hi Kaushik,
    Check out the function module ALV_XXL_CALL.
    Srinivas

  • Problem in ALV to Excel Download

    Good Morning Experts,
      I am facing one issue related ALV to excel Download.
    I Developed one custom report the output is correct displaying.
    the output is like for example i am taking 3 columns (plant, material, amt).
    plant material amt
    1001  aaa     1000
    1001  bbb     2000
    while downloading to excel
    it displaying like
    plant
    material
    amt
    1001
    aaa
    1000
    1001
    bbb
    2000
    I dont know why its coming like that.
    this is my code
    DEFINE field_cat.
    wa_field-row_pos = &1.
    wa_field-fieldname = &2.
    wa_field-tabname = &3.
    wa_field-seltext_m = &4.
    wa_field-outputlen = &5.
    wa_field-currency = &6.
    wa_field-ref_fieldname = &7.
    wa_field-ref_tabname = &8.
    APPEND wa_field to it_field.
    clear wa_field.
    END-OF-DEFINITION.
    field_cat '1' 'BUKRS' 'IT_FINAL' 'Company Code' '6' '' '' ''.
    field_cat '2' 'BUTXT' 'IT_FINAL' 'Comp Descrip' '25' '' '' ''.
    field_cat '3' 'LIFNR' 'IT_FINAL' 'Vendor No' '10' '' '' ''.
    field_cat '4' 'NAME1' 'IT_FINAL' 'Vendor Name' '35' '' '' ''.
    field_cat '5' 'STRAS' 'IT_FINAL' 'Vendor Addres' '35' '' '' ''.
    field_cat '6' 'FDGRV' 'IT_FINAL' 'Nature Of Work' '30' '' '' ''.
    field_cat '7' 'DMBTR' 'IT_FINAL' 'Net Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
    field_cat '8' 'QBSHB' 'IT_FINAL' 'TDS Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
    field_cat '9' 'TOTAL' 'IT_FINAL' 'Total Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
    it_layout-zebra = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = sy-repid
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
       IS_LAYOUT                         = it_layout
       IT_FIELDCAT                       = it_field
       I_SAVE                            = 'X'
      TABLES
        t_outtab                          = it_final
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2.
    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.                    " DISPLAY_ALV
    FORM TOP_OF_PAGE.
    REFRESH it_head. CLEAR it_head.
    wa_head-typ = 'H'.
    wa_head-info = 'Vendorwise Expense Details'.
    APPEND wa_head to it_head.
    wa_head-typ = 'S'.
    IF NOT s_MONAT-high is INITIAL.
      CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low ' to ' p_gjahr '.' s_MONAT-high INTO wa_head-info.
    ELSE.
      CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low INTO wa_head-info.
    ENDIF.
    APPEND wa_head to it_head.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        it_list_commentary       = it_head.
    ENDFORM.
    Regards,
    Dhina..

    Hi,
    You can also try in this way
    in the output screen
      click List (in app tool bar) -> Export -> Spreadsheet
    and save at your desired location.
    (It will be save in .mhtml format , just rightclick on it and you can open it with excel )
    Then you will be able to view in your required format.
    Regards,
    koolspy.

  • ALV to Excel download problem

    Hi Experts,
       I display around 15 fields(columns) in ALV output. When I download it to Excel, it downloads exactly.
    Then dynamically, when I increase the  number of fields to be displayed in ALV it is displaying correctly. But when I download
    to excel, half of the fields are coming in one line of excel sheet and remaining fields are coming in the second line of excel.
    Why am I not getting all the fields in one line itself in the excel sheet?
    Is it a problem in standard ALV?
    I am using cl_gui_alv_grid class to display ALV output.
    Thanks and regards,
    Venkat.

    Hi!
    Which function module you are using for downloading?

  • Material Number Truncated in ALV to Excel Download

    Hi Guru,
    I have a ALV program report. It has about 18 columns, but for some strange reason, when we download this report to an ALV the 3rd column which host the material number as the last digit missing/truncated.
    For example if we have a material number in SAP ALV Grid as 1234567, when we download this the excel, what we get in excel is 123456. with the last number missing.
    What is the best solution to fix this issue.
    Thanks for you help in advance.

    Hi Keshav,
    Previously I faced the same situation, like in ALV grid I was displaying the material nos with output length as 15. Since in the Grid display you can readjust the columns, So after displaying we just expanded in the grid and try to download the same in excel. But at that time the ALV was downloading with material number field length as 15 ( What I set in my field catalog). Even when I saw the print priview I saw only the length it is showing as 15.  After changing the output length as 18 in field cat  I got the correct download.
    (Here I am assuming that the question is raised for  ALV grid display since no where it is mentioned the type of ALV).
    Sorry it was mentioned in the question itself
    Regards
    Shiba
    Edited by: Shiba Prasad Dutta on Feb 22, 2010 2:41 PM

  • ALV to excel download problem through standard tool bar

    I am downloading data into excel from ALV , When there are 128 column data in execl coming as 2 row for 1 row of data in alv. This problem is not there for 78 columns report.
    Kindly suggest some solution.

    i think there is a limit to the number of columns for ALV and which is i think 92 ..this can be the cause of the issue
    amit

  • Default Carriage return in the last column when data is downloaded to Excel

    Problem:
    When you download data into Excel and if the last column of your excel is a numeric field, XMLP will add a carriage return (special character) to your numeric field. This feild will be considered as character field by excel.
    Work Around:
    When you build the template, create an empty column as your last column and leave E (or end-for-each) in that empty column.
    Note:
    If the last column is a character column then you do not have to do this.

    I originally had that END:VCARD without any carriage return.
    But I still get an extra carriage return at the end when the JSP renders to VCF
    I'm using Tomcat running on Linux.
    I found this, article which implies (but does not explicitly say) JSP in general adds a newline to the last line:
    http://www.caucho.com/resin-3.0/jsp/faq.xtp (But its not tomcat either, so maybe this info is irrelevant).
    Edited by: shogo2040 on Dec 22, 2008 3:31 PM - changed rendered to VCF from rendered to JSP

Maybe you are looking for

  • My computer is not showing up in share monitor

    Hi I was happily creating and sharing files to Vimeo from Final Cut Pro x - When I had a kernal panic - Hard reset and now "My Computer" does not show up in share monitor - It says no clusters found - When I goto share a file to vimeo now nothing hap

  • Grouping formula

    Hi, Is it possible to group records within range? I have to group record for a range of dates (start day + x days). When I tried to make a formula and then group on that formula I got error that returning value cannot be range. I tried few constructi

  • OC Genie not showing in Win 7

    I have a nice rig that I am wanting to experiment with Icing. I wanted to first try out The OC Genie on my mobo to get an idea of what I was lookin at achieving. I pushed the OC button on my mobo, restarted and entered into bios o check my configs wh

  • I just downloaded the ios 5 beta 7, HELP!

    i already installed the ios 5 beta 7 on my iTouch but it says that "We're unable to complete your activation. This device is not registered as part of iPhone Developer Program." etc. I wanted to restore it to 4.3.5 , help please... =( T_T

  • After updating to CP 8.0.1 content play locally, but not on the web

    After updating to CP 8.0.1 I have the problem - published HTML 5 content work locally on comupter ok, but when is uploaded to web (at the same place as older version of the same content), it plays preloader only - forever.... Hundred times I check wh