Download prob in  ALV report

Hi,
   While downloading the data from the ALV report the last few columns are coming on next line when data is more.
Wht should i do?? Pl help..
Regards,
Rushikesh

Hi,
I have faced the same kind of problem but not with downloading , while uploading the excel file to SAP. The problem is that, If the line of excel sheet exceed 4096 characters, it used to take the remaining first line as a second line. Whatever be th FM, the same problem will come up I hope, because I_TAB_RAW_DATA field of a FM is of type : <b>types truxs_t_text_data(4096) type c occurs 0.</b>
-SatyaPriya

Similar Messages

  • Prob in alv report

    hi all,
    I hav prob in alv report .I made a purchse register alv report.when I see output it show's everything right but in printpreiew and when transfer to spreadsheet. It cut's back part of voucher number.for ex.v.no :5100021 but see in print priew itshow's like this 51000... and in excel sheet it cut down the last no. so it creates rundancy of voucher no. plz tell me sol. I don't know wat is happening.
    regards,
    hemlata

    hi hemlata.
    you can do this for the voucher number in your fieldcat.
    give the outputlen as the maximum outputlength of the voucher no.
    fieldcat-fieldname = 'VOUCHER'.
    fieldcat-...
    <b>fieldcat-NO_ZERO = 'X'.</b>
    append fieldcat to it_fieldcat.
    and now check it.
    Regards
    vijay

  • Regarding download of the ALV report to excel

    Hi experts,
    I have an ALV report which took long time to extract records from various table. So while there is some restriction the report can be executed well in foreground. And the report can be extracted well to excel sheet. But while there is hudge records, i have to execute the report in backgroung. And then from spool i generally prefers to download the report to excel.
    There is a field UOM where it contains value ' " ' for some records. And also there may be possiblity that other fields can also contain the same.
    Now my problem is: while download to excel... When ever there is a value ' " ' from this point to the next value ' " '. It is treating as one record. and keep that in a same position in the excel sheet.
    But i want to keep all the values in there respective fields. Can you please how can i do that? Please give me some solution...
    regards,
    charles.

    Actually now I think there is another way to do this, storing file on application server can create problems as sometimes the users don't have directory write access or things like that.
    Instead you should export your data to a memory or database cluster and import it back using abother program.
    The proposed changes would be
    1: At the point you are calling your alv grid function, check if the sy-batch is 'X' for background job, if yes than export to database table INDX or you can create your own. suppose your data is in internal table ITAB than in case of background job, you will do
    data: keyf like indx-srtfd.
    *We just assign username, date time to this
    concatenate sy-uname sy-datum sy-uzeit into keyf.
    EXPORT itab TO DATABASE indx(ZZ) ID keyf.
    check for subrc if export is successfull.
    Now you have stored your itab in database for later processing. remember to have keyf. In case of background job you can have it write in the output so from spool output you can check what was the keyf to use.
    You have to write another program to import itab from database and download it or display it.....
    This program will have keyf as input parameter and you must define ITAB same as the orignal program.
    parameters: p_keyf like like indx-srtfd.
    import itab from database indx(ZZ) id keyf.
    *Now you have itab. do whatever you want with it. download it using GUI_DOWNLOAD function or display it in an ALV grid.......
    Hope you got the overall idea.

  • How to add a push button(download) to my ALV Report to download report data

    Hi,
    I developed a normal alv report and now i want to add a push button ex.. download in the report output and then whwnever I am clicking this download button then download functionality will work.Please don't take it as simple from my point of view it is very imp. for me please help me.
    Thanks.

    Hi,
    Please check the below thread
    Re: ADD button to ALV Grid
    Thanks
    Arul

  • Download problems in ALV report in ECC 6.0

    Hello All,
    While downloading ALV report to excel/txt by standard method.(Export> Local File> Spreadsheet)
    I am facing an issue where I am getting 2 decimal places to a figure.
    Where I do not require zeros if not necessary.
    Eg. If the amnt is 200 then currently its showing like 200.00 but  I want it like 200 only.
    The type is char only.
    Kindly please advice me how to overcome this problem.
    Thanks,
    Yogesh.

    Hi Yogesh,
    ALV behaves inconsistent: I used excel inplace function and got exactly what you required, even worse: In the grid, I have always 3 decimal places, in excel I got a maximum of 2 decimal places, one if there was only one and none if in grid it was .000.
    No obvous solution.
    You could create the grid cells as strings and remove all trailing zeros.
    Regards,
    Clemens

  • Header prob. in ALV report

    Hi All,
    Hope you all are doing fine!!!
    In the below program am trying to print the top-of-page/header in alv report,,but am unable to do it..
    Am working on 4.6c version,,,,,its working fine in ECC 6.0 but i really dont understand why its not working in 4.6c...AM JUST PASTING THE ALV PART...!!!
    Pls. do the needful
    REPORT yjack  LINE-SIZE 132
                    LINE-COUNT 65
                    NO STANDARD PAGE HEADING.
    DATA: /sie/swe_ag0_rdo TYPE /sie/swe_ag0_rdo,
          wa_tvko TYPE tvko,
          /sie/swe_ag0_raa TYPE /sie/swe_ag0_raa,
          wa_kna1 TYPE kna1,
          wa_t001 TYPE t001,
          wa_tvkot TYPE tvkot,
          /sie/swe_ag0_con TYPE /sie/swe_ag0_con,
          /sie/swe_ag0_r02 TYPE /sie/swe_ag0_r02.
    TYPES: BEGIN OF ty_itab,
             bukrs TYPE /sie/swe_ag0_rdo-bukrs,
             vkorg TYPE /sie/swe_ag0_rdo-vkorg,
             zclpr TYPE /sie/swe_ag0_rdo-zclpr,
             zcdaz TYPE /sie/swe_ag0_rdo-zcdaz,
             vbeln TYPE /sie/swe_ag0_rdo-vbeln,
             posnr TYPE /sie/swe_ag0_rdo-posnr,
             vbtyp TYPE /sie/swe_ag0_rdo-vbtyp,
             zidag TYPE /sie/swe_ag0_rdo-zidag,
             zimpp TYPE /sie/swe_ag0_rdo-zimpp,
             zimco TYPE /sie/swe_ag0_rdo-zimco,
             zimmg TYPE /sie/swe_ag0_rdo-zimmg,
             fkdat TYPE /sie/swe_ag0_rdo-fkdat,
             zstre TYPE /sie/swe_ag0_rdo-zstre,
             vtweg TYPE /sie/swe_ag0_rdo-vtweg,
             kunrg TYPE /sie/swe_ag0_rdo-kunrg,
          END OF ty_itab.
    TYPES: BEGIN OF ty_itab2,
             bukrs TYPE /sie/swe_ag0_rdo-bukrs,
             vkorg TYPE /sie/swe_ag0_rdo-vkorg,
             zcdaz TYPE /sie/swe_ag0_rdo-zcdaz,
             fkdat TYPE /sie/swe_ag0_rdo-fkdat,
             vbeln TYPE /sie/swe_ag0_rdo-vbeln,
             zimpp TYPE /sie/swe_ag0_rdo-zimpp,
             zimco(5) TYPE p DECIMALS 2,
             zimmg(5) TYPE p DECIMALS 2,
             resid(6) TYPE p DECIMALS 2,
             kunrg TYPE /sie/swe_ag0_rdo-kunrg,
             name1 TYPE kna1-name1,
          END OF ty_itab2.
    type-pools: slis.
    types: begin of ty_final,
           bukrs type char29,
           vkorg type char24,
           mese  type char17,
           gjahr type gjahr,
           agent type char45,
           vbeln type vbeln,
           fkdat type fkdat,
           zimpp type /SIE/SWE_AG0_ZIMPP,
           zimco type /SIE/SWE_AG0_ZIMCO,
           zimmg type /SIE/SWE_AG0_ZIMMG,
           resid(5) TYPE p DECIMALS 2,
           kunrg type kunrg,
           name1 type NAME1_GP,
           end of ty_final.
    data: it_final type table of ty_final,
          wa_final type ty_final,
          g_bukrs(29) type c,
          g_vkorg(24) type c.
    data: it_fieldcat type slis_t_fieldcat_alv,
          it_layout type slis_layout_alv,
          it_list_top_of_page type slis_t_listheader,
          it_events type slis_t_event,
          wa_events type slis_alv_event,
          it_headings type slis_t_listheader,
          wa_headings type slis_listheader.
    constants: c_h type c value 'H',
               c_s type c value 'S'.
    field-symbols: <fs_final> type ty_final.
    DATA: it_itab TYPE TABLE OF ty_itab,
          it_itab2 TYPE TABLE OF ty_itab2,
          wa_itab TYPE ty_itab,
          wa_itab2 TYPE ty_itab2.
    DATA: wa_app TYPE ty_itab.
    DATA: w_var TYPE c VALUE '1',
          w_com_mese(9) TYPE c,
          w_flag_st TYPE c.
    $$ Selection-screen
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK parametri WITH FRAME TITLE text-001.
    BEG MOD ESX00596 IMS:100276414 TR:SWIK9A04W7 11.04.2007
    *PARAMETERS: p_bukrs LIKE /sie/swe_ag0_rdo-bukrs OBLIGATORY.
    *PARAMETERS: p_vkorg LIKE /sie/swe_ag0_rdo-vkorg OBLIGATORY.
    PARAMETERS: p_bukrs TYPE /sie/swe_ag0_rdo-bukrs OBLIGATORY.
    PARAMETERS: p_vkorg TYPE /sie/swe_ag0_rdo-vkorg OBLIGATORY.
    SELECT-OPTIONS: s_zcdaz FOR /sie/swe_ag0_rdo-zcdaz OBLIGATORY
                            MATCHCODE OBJECT /sie/swe_ag0_zaa.
    PARAMETERS: mese(2) TYPE n OBLIGATORY,
                anno TYPE /sie/swe_ag0_rdo-gjahr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK parametri.
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: c1 AS CHECKBOX.
    SELECTION-SCREEN COMMENT 8(31) text-006 FOR FIELD c1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN: END OF BLOCK b1.
    DATA: w_cd_a   TYPE /sie/swe_ag0_rdo-vtweg,
          w_cd_gen TYPE /sie/swe_ag0_rdo-vtweg,
          w_cd_di  TYPE /sie/swe_ag0_rdo-vtweg,
          w_cd_re  TYPE /sie/swe_ag0_rdo-vtweg,
          w_cd_te  TYPE /sie/swe_ag0_rdo-vtweg,
          w_cd_ca  TYPE /sie/swe_ag0_rdo-vtweg.
    INITIALIZATION.
      PERFORM selezione_hard_coding.
    $$ At selection-screen
    AT SELECTION-SCREEN.
      PERFORM controlli.
    $$ Top-of-page
    TOP-OF-PAGE.
      PERFORM top_of_page.
    $$ Start-of-selection
    START-OF-SELECTION.
      perform build_events.
      PERFORM carica_itab.
      PERFORM carica_itab2.
      PERFORM stampa.
    END-OF-SELECTION.
    IF C1 EQ 'X'.
    perform fill-fieldcatalog.
    perform display_alv.
    ENDIF.
    *&      Form  fill-fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form fill-fieldcatalog.
    data: l_fieldcat TYPE slis_fieldcat_alv.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'BUKRS'.
          l_fieldcat-col_pos       = 1.
          l_fieldcat-seltext_l     = 'Company'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'VKORG'.
          l_fieldcat-col_pos       = 2.
          l_fieldcat-seltext_l     = 'Comm. Organization'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'MESE'.
          l_fieldcat-col_pos       = 3.
          l_fieldcat-seltext_l     = 'Month'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'GJAHR'.
          l_fieldcat-col_pos       = 4.
          l_fieldcat-seltext_l     = 'Year'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'AGENT'.
          l_fieldcat-col_pos       = 5.
          l_fieldcat-seltext_l     = 'AGENT'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'VBELN'.
          l_fieldcat-col_pos       = 6.
          l_fieldcat-seltext_l     = 'Invoice'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'FKDAT'.
          l_fieldcat-col_pos       = 7.
          l_fieldcat-seltext_l     = 'Date'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'ZIMPP'.
          l_fieldcat-col_pos       = 8.
          l_fieldcat-seltext_l     = 'Taxable'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'ZIMCO'.
          l_fieldcat-col_pos       = 9.
          l_fieldcat-seltext_l     = 'Tot.Comm.'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'ZIMMG'.
          l_fieldcat-col_pos       = 10.
          l_fieldcat-seltext_l     = 'Settle'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'RESID'.
          l_fieldcat-col_pos       = 11.
          l_fieldcat-seltext_l     = 'Accruing'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'KUNRG'.
          l_fieldcat-col_pos       = 12.
          l_fieldcat-seltext_l     = 'Cust.Code'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
          l_fieldcat-tabname       = 'IT_FINAL'.
          l_fieldcat-fieldname     = 'NAME1'.
          l_fieldcat-col_pos       = 13.
          l_fieldcat-seltext_l     = 'Company Name'.
          APPEND l_fieldcat TO it_fieldcat.
          clear l_fieldcat.
    endform.                    " fill-fieldcatalog
    *&      Form  display_alv
          text
    -->  p1        text
    <--  p2        text
    form display_alv.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = sy-repid
       I_CALLBACK_TOP_OF_PAGE            = 'PRINT_HEADING'
       IS_LAYOUT                         = it_layout
       IT_FIELDCAT                       = it_fieldcat
       IT_EVENTS                         = it_events
      TABLES
        t_outtab                          = it_final
    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  build_events
          text
         -->P_IT_EVENTS[]  text
    form build_events.
    clear wa_events.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = it_events.
    read table it_events into wa_events with key name = 'TOP_OF_PAGE'.
    if sy-subrc eq 0.
    wa_events-form = 'PRINT_HEADING'.
    modify it_events from wa_events transporting form
        where name = 'TOP_OF_PAGE'.
    endif.
    endform.                    " build_events
    form PRINT_HEADING.
    clear wa_headings.
    wa_headings-typ = 'H'.
    wa_headings-info = 'DEMO FOR ALV!!!'.
    append wa_headings to it_headings.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        it_list_commentary       = it_headings.
    endform.
    Thanks n Regards
    Jack

    Hi friend,
    I think u have to remove below lines in your program because FM 'REUSE_ALV_GRID_DISPLAY' will call directly Form 'PRINT_HEADING'   for TOP-OF-PAGE event through table 'it_events' :
    Remove lines:
        TOP-OF-PAGE.
        PERFORM top_of_page.
    Also remove the parameter
    I_CALLBACK_TOP_OF_PAGE = 'PRINT_HEADING' in  FM 'REUSE_ALV_GRID_DISPLAY'
    Also put a breakpoint in your program in the line,
    START-OF-SELECTION.
    perform build_events.
    See whether 'form' 'name' gets populated in table 'it_events'  or not.
    See sample report and compare.
    REPORT zawi_assign3 NO STANDARD PAGE HEADING.
    TYPE-POOLS: slis.
    DATA: BEGIN OF gt_outtab OCCURS 0.
            INCLUDE STRUCTURE ekpo.
    DATA: END OF gt_outtab,
          gs_layout TYPE slis_layout_alv,
          g_exit_caused_by_caller,
          gs_exit_caused_by_user TYPE slis_exit_by_user,
          g_repid LIKE sy-repid.
    DATA:
        gt_events      TYPE slis_t_event,
        gt_list_top_of_page TYPE slis_t_listheader,
        g_status_set   TYPE slis_formname VALUE 'PF_STATUS_SET',
        g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
        g_top_of_page  TYPE slis_formname VALUE 'TOP_OF_PAGE',
        g_top_of_list  TYPE slis_formname VALUE 'TOP_OF_LIST',
        g_end_of_list  TYPE slis_formname VALUE 'END_OF_LIST'.
    DATA: gs_variant LIKE disvariant,
          g_save.
    INITIALIZATION.
      g_repid = sy-repid.
      PERFORM layout_init USING gs_layout.
      PERFORM eventtab_build USING gt_events[].
      gs_variant-report = g_repid.
      g_save           = 'X'.
    START-OF-SELECTION.
      PERFORM select_data TABLES gt_outtab.
    END-OF-SELECTION.
      PERFORM comment_build USING gt_list_top_of_page[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
             i_background_id    = 'ALV_BACKGROUND'
             i_buffer_active    = 'X'
             i_callback_program = g_repid
             i_structure_name   = 'ekpo'
             is_layout          = gs_layout
             i_save             = g_save
             is_variant         = gs_variant
             it_events          = gt_events[]
        IMPORTING
             e_exit_caused_by_caller = g_exit_caused_by_caller
             es_exit_caused_by_user  = gs_exit_caused_by_user
        TABLES
             t_outtab = gt_outtab
        EXCEPTIONS
             program_error = 1
             OTHERS        = 2.
      IF sy-subrc = 0.
        IF g_exit_caused_by_caller = 'X'.
        ELSE.
          IF gs_exit_caused_by_user-back = 'X'.
          ELSE.
            IF gs_exit_caused_by_user-exit = 'X'.
            ELSE.
              IF gs_exit_caused_by_user-cancel = 'X'.
              ELSE.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ELSE.
      ENDIF.
    FORM select_data TABLES rt_outtab LIKE gt_outtab[].
      SELECT * FROM ekpo INTO CORRESPONDING FIELDS
                       OF TABLE rt_outtab
                       UP TO 00030 ROWS.
    ENDFORM.                    "SELECT_DATA
    FORM layout_init USING rs_layout TYPE slis_layout_alv.
      rs_layout-detail_popup      = 'X'.
      rs_layout-edit = 'X'.
    ENDFORM.                    "LAYOUT_INIT
    FORM eventtab_build USING rt_events TYPE slis_t_event.
    *"Registration of events to happen during list display
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = rt_events.
      READ TABLE rt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE g_top_of_page TO ls_event-form.
        APPEND ls_event TO rt_events.
      ENDIF.
    ENDFORM.                    "EVENTTAB_BUILD
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          i_logo             = 'ENJOYSAP_LOGO'
          it_list_commentary = gt_list_top_of_page.
    ENDFORM.                    "TOP_OF_PAGE
    FORM comment_build USING lt_top_of_page TYPE
                                            slis_t_listheader.
      DATA: ls_line TYPE slis_listheader.
      CLEAR ls_line.
      ls_line-typ  = 'H'.
      ls_line-info = text-100.
      APPEND ls_line TO lt_top_of_page.
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'Program'.
      ls_line-info = sy-repid.
      APPEND ls_line TO lt_top_of_page.
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'User'.
      ls_line-info = sy-uname.
      APPEND ls_line TO lt_top_of_page.
    ENDFORM.                    "COMMENT_BUILD
    Might solve your problem.
    Thanks.
    Edited by: Sap Fan on Feb 20, 2009 9:50 AM
    Edited by: Sap Fan on Feb 20, 2009 9:52 AM
    Edited by: Sap Fan on Feb 20, 2009 9:54 AM

  • Background job to download standard ALV reports

    Hi,
    Could anyone knows how to download an standard ALV report in a background job?
    In a job I made, some ALV reports were precessed and made, and their spools were made,
    but not downloaded.
    Regerds,
    Katsumi Makabe

    hi,
    I think you can have a network shared folder on application server.
    you said that it is a comma separated file.
    1) Using TCODE CG3Z, upload the flat file to application server , remember to copy the path (it contains file path aswellas name).
    2) Using DATASET read the filepath along with the name and read each line into workarea and split at ',' into fields.
    3) Then append those fields to internal table.
    using the FMs job_open, job_submit and job_close you can go for background scheduling.
    Please go through the following link for sample code on FTP.
    http://abap4.tripod.com/FTP_Using_SAP_Functions.html
    Reward points if helpful.
    Thanks and regards

  • Excel fiel from ALV report

    Hi Gurus,
        is der any way to download data from ALV report to excel sheet depending on  layout set dyanmically.
      I mean to say that if I choose a layout then data has to transfer to excel sheet according to layout fields automaticaly.

    I think this can be done by oops ALV , are u using reusealv F.M to call output in ALV ?
    Try the below kind of ALV
    IN PBO -
    >
    SET PF-STATUS 'PROJREP'.
    SET TITLEBAR text-046.
    DATA: g_container TYPE scrfname VALUE 'ALV',
          g_grid1  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container.
    IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
               EXPORTING container_name = g_container.  (Name of the container )
    CREATE OBJECT g_grid1
               EXPORTING i_parent = g_custom_container.
    PERFORM create_field_catalog_ce
    CALL METHOD g_grid1->set_frontend_fieldcatalog
          EXPORTING
            it_fieldcatalog = t_fcat_ce.
    ALL METHOD g_grid1->set_table_for_first_display
          EXPORTING
            i_structure_name = 'ST_DISPLAY'
          CHANGING
            it_outtab        = t_display_io
            it_fieldcatalog  = t_fcat_ce.
    ->Create Object to receive events and link them to handler methods.
    When the ALV Control raises the event for the specified instance
    the corresponding method is automatically called.
        CREATE OBJECT g_event_receiver.
        SET HANDLER g_event_receiver->handle_double_click FOR g_grid1.
      ENDIF.
      CALL METHOD cl_gui_control=>set_focus
        EXPORTING
          control = g_grid1.
    IN PAI -->
    CALL METHOD cl_gui_cfw=>dispatch.

  • Avoid splitting of columns ALV report while download output to Excel sheet

    Hi friends,
                  I have 170 columns in my ALV report
    while downloading the report to Excel sheet
    the column descriptions and values are splitting in two lines.
    How can i avoid the problem.
    before calling REUSE_ALV_GRID_DISPLAY function module in my code
    for the Layout i assigned LS_LAYOUT-MAX_SIZE = 1023.
    but still the problem is not solved.
    Please help me in this Issue.
    Thanks in Advance,
    Ganesh

    Hi friends,
    I dont want to use and Keyboard shiftcntrl....
    or dont want to change any code in ALV report
    by simply assigning some value to any of the export parameter in ALV function module
    can we achieve the functionality
    Thanks in Advance,
    Ganesh

  • Download alv report using layout variant in background

    Hi All,
    I want to download an Alv report using layout varaint in background job.
    can any one please help me.
    i.e...
    I am facing a problem in downloading a text file to the Application server.
    My requirement is, when the user downloads a file with the layout variant, the file should have only the columns which was selected in the variant.
    Will rewards to helpfull ans
    regards
    Chetan

    hey seshu,
    I am facing a problem in downloading a text file to the Application server.
    My requirement is, when the user downloads a file with the layout variant, the file should have only the columns which was selected in the variant.

  • Download alv report in excel format in Linux

    Hi All,
    I am working on SAP GUI for Java in Linux PC. I have installed
    Open Office.
    After executing an alv report there is no spreadsheet option
    to download the report in excel format .
    Also, when doing Save as Local File -> Spreadsheet ,
    the report is not downloaded in proper format.
    So, how to download the alv reports in excel format ?

    Hi Vinod ,
    Save as Local File -> Spreadsheet
    It will ask for Directory and file name with .xls format . Give proper name e.g. test.xls and save, and after saving file right click on the file and click on Open with "OpenOffice.org calc".
    It will definetly work.
    Abhijeet

  • Download a ALV report without repetitive headers and footers.

    Hi,
    I have an ALV report with header and footer. When I download the report into excel, after every 30 (approx) records there is a header and a footer. But I do not need it.
    I need header only once and footer only once in the excel sheet. Please let me know how to achieve it.
    Thanks
    Krishna

    Hi Manish,
    if sy-pagno EQ 1 or sy-batch = 'X'.
      Call the top-of-page event code.
    endif.
    I don't think it can work as it calls the top-of-page at each page in batch mode. Better code should be something like :
    if sy-pagno EQ 1.
      Call the top-of-page event code.
    endif.
    Note : for a generic solution, I think the page number is not automatically page number 1 (for example, if we use a cover page or have printed something else before). So we'd should better use a global variable (first_time) set to 'X' just before CALL FUNCTION 'REUSE_ALV_LIST...' :
    IF first_time = 'X'.
      Call the top-of-page event code.
      CLEAR first_time.
    ENDIF.
    To All,
    I really made a big confusion in my previous answers, which were in fact about column headings (how to print them only once). Sorry about that.
    Sandra

  • Reg: ALV report download to excel currency columns

    Hi All,
    While downloading the alv report to excel, currency fields with negative sign(less than 0) is downloading without negative sign.
    And field catalog wad declared as 'CURR' field for that particular column, if I declared as 'CHAR', i am getting shortdump.
    Can any one tell me how to get the negative sign.
    Thanks in advance.

    Hi,
    Do you use ALV to excel standard functionality or your own code to excel?
    Please provide more information.
    Thanks,

  • Download ALV report to PDF with Lights

    Hi,
    I have a requirement wherein, when i download ALV report to PDF which has Lights in the first column.  My problem is these lights are not displayed instead i get the following in the PDF
    PDF o/p:
    XOO RED SIGNAL
    OXO YELLOW SIGNAL
    OOX GREEN SIGNAL
    Please let me know how to get the lights in the PDF o/p
    Thanks & Regards,
    Sandhya

    Hi Sandhya,
    U can convert any type of display(SF,ALV) to PDF.....
    User Program rstxpdft4 to convert it first the O/P need to be converted into spool.
    cheers,
    Naveen.

  • Print or download ALV report with sort options

    Dear friends,
    How i can download into excel or print ALV report with sort options, like customer name column with similar values should not repeat in the print out or download file.
    Regards,
    Praveen Lobo

    Hi Praveen,
    Use this code, its working:-
    *FOR SORTING DATA
    DATA : it_sort TYPE slis_t_sortinfo_alv,
           wa_sort TYPE slis_sortinfo_alv.
    *          SORT W.R.T. CUSTOMER NAME
      wa_sort-spos = 1.
      wa_sort-fieldname = 'NAME1'. "field customer name
      wa_sort-tabname = 'IT_KNA1'. "internal table with records
      wa_sort-up = 'X'.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
    "this will sort the ALV o/p for customer with same name
    "now the name will not be repeated
    "records with same name will be grouped
    *          DISPLAY RECORDS IN ALV GRID
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program                = sy-repid "report id
        it_fieldcat                       = it_field "field catalog
        it_sort                           = it_sort "sort info
      TABLES
        t_outtab                          = it_kna1 "internal table
      EXCEPTIONS
        program_error                     = 1
        OTHERS                            = 2.
      IF sy-subrc <> 0.
      ENDIF.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir
    Edited by: Tarun Gambhir on Dec 31, 2008 1:13 PM

Maybe you are looking for

  • How can I get my exchange calendar to appear in Outlook 2011?

    I have had this issue multiple times. I even have a new Macbook Pro because I couldn't solve this on the previous machine. Now I can's solve it on this machine. My exchange account works fine on a PC, my iPhone 4, and OWA. There are 2 other Macbook P

  • "END OF FILE REACHED"?????

    IT WILL NOT ALLOW ME TO CREATE INSTRUMENTS- NONE OF MY FILES ARE WORKING -IM GETTING NO SOUND WHATSOEVER--I AM COMPLETELY LOST AND GOING CRAZY WITHOUT MY MUSIC-- CAN SOMEONE HELP ME OUT HERE PLEASE [email protected]

  • Request for skype online number

    Hello Support Team On this 1st i had applied for online number but still it is pending and also single number order showing two time. payment deducted from my credit card, but yet order is pending. January 1, 2013 Online Number, 12 month subscription

  • Create tablespace issue

    Hi; I wanna learn one thing... I have oracle ebs r11i wiht 10gr2 db, and its prod instance... Issue is like this: I have one tablespace lets us call it XXX and it has datafile like xx1.dbf,xx2.dbf..... I want to delete those dbf becouse their each si

  • RFC CallReceive error Function Z_AW_JOB_RUN

    Hi, I am using SAP BODS 3.2 to compare customer data between SAP MDM,SAP ECC and SAP CRM systems. I am using ABAPFlows for SAP CRM and SAP ECC customer data extraction. I have generated the abap code and manually pasted it in respective systems. When