Remove toolbar from Reused alv grid

How can i remove the toolbar and all the functions from the re-used alv grid ?
regards

Hi,
I hope this is what you are looking for:
**make sure you create a component and get the model first
contol ALV table
data: lr_alv_usage       TYPE REF TO if_wd_component_usage,
        lr_if_controller   TYPE REF TO iwci_salv_wd_table,
        lr_config          TYPE REF TO cl_salv_wd_config_table,
        lr_filter          TYPE REF TO if_salv_wd_std_functions.
        lr_filter          ?= lo_value.
set read only mode to false (and display edit toolbar)
  data: lr_table_settings type ref to if_salv_wd_table_settings.
  lr_table_settings ?= lo_value.
  lr_table_settings->set_read_only( abap_false ).
disable insert, delete and append from the ALV toolbar
  lo_value->if_salv_wd_std_functions~set_edit_append_row_allowed( abap_false ).
  lo_value->if_salv_wd_std_functions~set_edit_insert_row_allowed( abap_false ).
  lo_value->if_salv_wd_std_functions~set_edit_delete_row_allowed( abap_false ).
  lo_value->if_salv_wd_std_functions~SET_EDIT_CHECK_AVAILABLE( abap_false ).
" Specify the setting for using ALV filter
   lr_filter->set_filter_complex_allowed( value = abap_true ).
DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
  lr_table_settings ?= lo_value.
  lr_table_settings->set_enabled( abap_true ).
  lr_table_settings->set_row_selectable( abap_true ).
  lr_table_settings->set_design( cl_wd_table=>e_design-alternating ).
  lr_table_settings->set_top_of_list_visible( abap_false ).
  lr_filter->set_sort_headerclick_allowed( abap_true ).
  lr_filter->aset_filter_filterline_allowed( abap_true ).
  lr_filter->set_sort_complex_allowed( abap_true ).
  lr_filter->set_view_list_allowed( abap_false ).
  lr_filter->set_pdf_allowed( abap_true ).
Regards,
Abdul

Similar Messages

  • Reg: Export To Excel From an ALV Grid

    Hi All,
    I am exporting data from an ALV Grid (FM: REUSE_ALV_GRID_DISPLAY).
    By Clicking the Standard 'Local File' button --> Spreadsheet
    Output Internal table is having data of around 300 Chars in a particular field but in exported Excel sheet it is displaying upto some what less then 240 chars only.
    Is there any maximum limit (for a particular field in ALV grid) till what data can be exported to an Excel sheet ?
    Regards,
    Pankaj.

    Hello ,
    this is possible, Add import button your gui status and you can use "GUI_DOWNLOAD" FM module.
    Regards
    İrfan.

  • How to Transfer Data from editable ALV grid control to internal table?

    Hi,
    Can anyone give me a simple example by which I can transfer data from editable alv grid control back to the internal table. The ALV has been created by OO approach.
    I would appreciate if the solution is provided without handling any events.
    Regards,
    Auro

    Hello Auro
    You simply need to call method <b>go_grid->check_changed_data</b> at PAI of the dynpro displaying the ALV grid. If data have been changed on the editable ALV grid then this method will raise event DATA_CHANGED. If you do not want or need to handle this event (e.g. for validating the edited values) then you do not define any event handler method.
    Regards
      Uwe

  • How can I get the selected rows from two ALV grids at the same time?

    I have a program that uses two ALV grids in one dialog screen. I'm using the OO ALV model (SALV* classes).
    The user can select any number of rows from each grid. Then, when a toolbar pushbutton is pressed, I'd have to retrieve the selected rows from both grids and start some processing with these rows.
    It is no problem to assign event handlers to both grids, and use the CL_SALV_TABLE->GET_SELECTIONS and CL_SALV_SELECTIONS->GET_SELECTED_ROWS methods to find out which rows were marked by the user. Trouble is, this only works when I raise an event in each grid separately, for instance via an own function that I added to the grid's toolbar. So, I can only see the selected rows of the same grid where such an event was raised.
    If I try to do this in the PBO of the dialog screen (that contains the two grids), the result of CL_SALV_SELECTIONS->GET_SELECTED_ROWS will be empty, as the program does not recognize the marked entries in the grids. Also, an event for grid1 does not see the selected rows from grid2 either.
    As it is right now, I can have an own button in both grid's toolbar, select the rows, click on the extra button in each grid (this will tell me what entries were selected per grid). Then, I'd have to click on a third button (the one in the dialog screen's toolbar), and process the selected rows from both grids.
    How can I select the rows, then click on just one button, and process the marked entries from both grids?
    Is it somehow possible to raise an event belonging to each grid programmatically, so that then the corresponding CL_SALV_SELECTIONS->GET_SELECTED_ROWS will work?
    Thanks.

    Hello Tamas ,
    If I try to do this in the PBO of the dialog screen (that contains the two grids), the result of CL_SALV_SELECTIONS->GET_SELECTED_ROWS will be empty, as the program does not recognize the marked entries in the grids. Also, an event for grid1 does not see the selected rows from grid2 either.--->
    is it possible to  have a check box in each grid  & get the selected lines in PAI of the screen ?
    regards
    prabhu

  • Hide/Remove Subtotal Icon in ALV Grid report output.

    Hi,
            Is ther a way to remove or hide the Subtotal icon in the ALV Grid report output?
    Thanks & Regards,
    Praveen.

    Hi,
    You can add names of the buttons(which you want to hide) to internal table and pass this internal table for tool bar excluding parameter while calling ALV.
    Here as shown in below code, 'Sorting, Ascending,Descending' buttons are removed from the tool bar list. 
    data : lt_exclude TYPE ui_functions.
    ls_exclude = cl_gui_alv_grid=>MC_FC_SORT.
      APPEND ls_exclude TO lt_exclude .
      ls_exclude = cl_gui_alv_grid=>MC_FC_SORT_ASC.
      APPEND ls_exclude TO lt_exclude .
      ls_exclude = cl_gui_alv_grid=>MC_FC_SORT_DSC.
      APPEND ls_exclude TO lt_exclude .
        CALL METHOD alvgd->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
         IT_TOOLBAR_EXCLUDING          = lt_exclude
    Regards,
    Maharshi Vyas

  • Need help for hotspot linking from an ALV Grid to another transaction

    Hi all,
    I have to make a field in an ALV Grid link to a transaction. I activated the hotspot for the field in the field catalog and created a 'User_command' that i call in the REUSE_ALV_GRID_DISPLAY, but when i click on the hotpsot, it doesnot take me to the transaction. Please provide some help.
    Here is the code:
    *Internal table and work area for field catalog
    DATA: i_fieldcat TYPE STANDARD TABLE OF slis_fieldcat_alv,
              wa_fieldcat TYPE slis_fieldcat_alv,
              v_repid LIKE sy-repid,
              wa_layout TYPE slis_layout_alv,
              i_event TYPE slis_t_event,
    internal table and work area for subtotals
            i_sort TYPE STANDARD TABLE OF slis_sortinfo_alv,
            wa_sort TYPE slis_sortinfo_alv.
      PERFORM prepare_fieldcatalog.
      PERFORM prepare_layout.
      PERFORM prepare_subtotal.
      PERFORM display_alv.
    FORM display_alv .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       i_callback_program               = v_repid
       i_callback_pf_status_set          = 'STATUS'
       i_callback_user_command           = 'USER_COMMAND'
        is_layout                         = wa_layout
        it_fieldcat                       = i_fieldcat
       IT_SORT                           = i_sort
       it_events                         = i_event
        TABLES
          t_outtab                          = i_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  prepare_fieldcatalog
    FORM prepare_fieldcatalog .
      PERFORM f_build USING:
        c_bukrs text-011,
        c_gjahr text-012,
        c_lifnr text-013,
        c_ebeln text-014,
        c_ebelp text-015,
        c_dmbtr text-016,
        c_hkont text-017,
        c_wrbtr text-018,
        c_wmwst text-019,
        c_mwskz text-020,
        c_text1 text-021,
        c_kbetr text-022,
        c_spcode text-023.
    ENDFORM.                    " prepare_fieldcatalog
    *&      Form  f_build
    FORM f_build  USING    p_c_fieldname TYPE slis_fieldname
                           p_text TYPE c.
      CLEAR wa_fieldcat.
      CASE p_c_fieldname.
        WHEN c_dmbtr OR c_wrbtr OR c_wmwst.
          wa_fieldcat-do_sum = 'x'.
      ENDCASE.
      IF p_c_fieldname = c_ebeln.
        wa_fieldcat-hotspot = 'X'.
      ENDIF.
      wa_fieldcat-fieldname = p_c_fieldname.
      wa_fieldcat-seltext_m = p_text.
      APPEND wa_fieldcat TO i_fieldcat.
    ENDFORM.                    " f_build
    *&      Form  prepare_layout
    FORM prepare_layout .
      wa_layout-info_fieldname = c_rowcolor.
    wa_layout-f2code = '<F2CODE>'.
    *APPEND wa_layout to i_layout.
    ENDFORM.                    " prepare_layout
    *&      Form  USER_COMMAND
    FORM user_command USING r_ucomm LIKE sy-ucomm
                                   rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN c_back OR c_canc OR c_exit.
          LEAVE TO SCREEN 0.
        WHEN c_click.
          READ TABLE i_final INTO wa_final INDEX rs_selfield-tabindex .
          IF sy-subrc EQ 0.
            IF rs_selfield-fieldname EQ c_ebeln.
              SET PARAMETER ID c_bes FIELD wa_final-ebeln.
              CALL TRANSACTION c_me23n AND SKIP FIRST SCREEN.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " USER_COMMAND
    *&      Form  status
    FORM status  USING    p_extab TYPE slis_t_extab.
      SET PF-STATUS c_standard.
    ENDFORM.                    " status
    *&      Form  prepare_subtotal
    FORM prepare_subtotal .
      wa_sort-spos = c_10.
      wa_sort-fieldname = c_mwskz.
      wa_sort-subtot = 'X'.
      wa_sort-up = 'X'.
      APPEND wa_sort TO i_sort.
    ENDFORM.                    " prepare_subtotal

    Hi,
    Check this example..
    TYPE-POOLS: slis.
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: BEGIN OF wa_ekko,
    ebeln like ekko-ebeln,
    ekorg like ekko-ekorg,
    ekgrp like ekko-ekgrp,
    END OF wa_ekko.
    DATA: v_repid TYPE syrepid.
    v_repid = sy-repid.
    DATA it_ekko LIKE STANDARD TABLE OF wa_ekko WITH HEADER LINE.
    SELECT * UP TO 100 ROWS
    FROM ekko
    INTO CORRESPONDING FIELDS OF TABLE it_ekko.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
              i_program_name     = v_repid
              i_internal_tabname = 'WA_EKKO'
              i_inclname         = v_repid
         CHANGING
              ct_fieldcat        = gt_fieldcat.
    have hotspot for a PO.
    DATA: s_fieldcat LIKE LINE OF gt_fieldcat.
    s_fieldcat-hotspot = 'X'.
    MODIFY gt_fieldcat FROM s_fieldcat TRANSPORTING hotspot
           WHERE fieldname = 'EBELN'.
    Pass the program.
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
              i_callback_program      = v_repid
              it_fieldcat             = gt_fieldcat
              i_callback_user_command = 'USER_COMMAND'
         TABLES
              t_outtab                = it_ekko.
          FORM display_detail                                           *
    -->  UCOMM                                                         *
    -->  SELFIELD                                                      *
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
      IF ucomm = '&IC1'.
        READ TABLE it_ekko INDEX selfield-tabindex.
        IF sy-subrc = 0.
          SET PARAMETER ID 'BES' FIELD it_ekko-ebeln.
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDIF.
    ENDFORM.
    Thanks,
    Naren

  • Printing a Report from a ALV Grid

    We just did a kenrel upgrade from 6.20 to 6.40
    Now, when we go to run a report using an ALV grid it will not print the subtotals. I can see the information fine on the screen but will only print lines with no data!
    Any help will be great! thanks...
    -DJ

    Hi,
    Try with this FM
    REUSE_ALV_GRID_DISPLAY_LVC"  not  "REUSE_ALV_GRID_DISPLAY".
    Thanks,
    Neelima.

  • How to realize page numbers when printing from an ALV-Grid

    Dear ABAPers,
    with resprect to SAP note 402627 ALV-Grids in 4.6-Systems
    do not produce a header with Actual date, report title
    and page number as it does from release 610 on.
    I've spent almost the entire day on searching the SDN
    for an answer on how I could produce a page numbering.
    I've also tried quite a lot, for example by using the
    END_OF_PAGE event, but nothing worked.
    I'm using the FM REUSE_ALV_GRID_DISPLAY, but even an SAP
    sample report BCALV_GRID_01, which is supposed to
    demonstrate the object-oriented use of the several
    PRINT-events does not process PRINT_END_OF_PAGE in our
    4.6C-System.
    Is my search in vain or does anybody have experience
    with those kinds of problems under 4.6x ?
    Thanks in advance
    Andreas Flügel

    I think you should be able to use PRINT_END_OF_PAGE event for the same. That should work. Use SY-PAGNO variable to print the page no in this event.
    You will have to register this event and set the handler for the same.
    Did you try this?
    Regards,
    Ravi

  • Retrieve changed record from editable alv grid

    hello,
          i am new to alv grid... i am facing some problems working on it... plz help me solve my problems...
          i have created an alv grid displaying the timesheet of some employee's...
          the worktime cells are editable and rest of the information is read only...
          the worktime is changed and then a SAVE button is pushed...
          how do i retrieve the changed time into my internal table?
          once i update the internal table, i can modify the database table...
    thank you.

    Hi,
    Refer this program:-
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_rep_id       " report id
         i_callback_pf_status_set          = 'PF'           " for PF-STATUS
         i_callback_user_command           = 'USER_COMMAND' " for User-Command
         is_layout                         = wa_layout      " for layout
         it_fieldcat                       = it_field       " field catalog
         it_sort                           = it_sort        " sort info
        TABLES
          t_outtab                          = it_final      " internal table
       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.
    *&      Form  pf
    *       SUB-ROUTINE PF IS USED TO SET THE PF-STATUS OF THE SCREEN
    *       ON WHICH THE ALV GRID IS DISPLAYED
    *       -->RT_EXTAB
    FORM pf USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZTG_STAT'.
    ENDFORM.                    "pf
    *&      Form  USER_COMMAND
    *       SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
    *       AND EXECUTE THE APPROPIATE CODE
    *      -->LV_OKCODE   used to capture the function code
    *                     of the user-defined push-buttons
    *      -->L_SELFIELD   text
    FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
    * assign the function code to variable v_okcode
      lv_okcode = sy-ucomm.
    * handle the code execution based on the function code encountered
      CASE lv_okcode.
    * when the function code is SAVE then save records into internal table
        WHEN 'SAVE'.
    * to reflect the data changed into internal table
          DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
          IF ref_grid IS INITIAL.
            CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
              IMPORTING
                e_grid = ref_grid.
          ENDIF.
          IF NOT ref_grid IS INITIAL.
            CALL METHOD ref_grid->check_changed_data.
          ENDIF.
    "now at this time you have modified internal table
    * refresh the ALV Grid output from internal table
          l_selfield-refresh = c_check.
    "alv output is refreshed as per changes in internal table
    "now you can include code to modify your ztable from internal table
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    Regards,
    Tarun

  • Removing Toolbar from Windows taskbar

    Hello,
    I need to deploy a script on almost 150 PCs with Windows 7 64bit. The script will uninstall and remove everything related to Office 2000. The script is ready, it`s working absolutely fine. However when we did install Office 2000 we alos did create a Toolbar
    called "office 2000" and it was attached to Taskbar. Now when I will remove everything from that particular folder the taskbar still sits in there. I tried to find a registry key/value responsible for that Toolbar, but I cant`t anything suitable.
    I`ve made a research in Google, but still nothing special found.
    Does anyone know how to remove it using some commands in CMD/Powershell or by using VBScript?
    Could anyone please advice on that?
    Thank you

    Hi Rubens,
    I found a similar discussion, and this seems has no API to do this, simply because it would get abused, for the
    reasons listed here:
    Why
    is there no programmatic access to the Start menu pin list?
    For more detailed information, please go through this thread:
    Enabling/Showing
    the Links Toolbar on the Windows Taskbar via PowerShell
    If there is anything else regarding this matter, please feel free to post back.
    Best Regards,
    Anna Wang

  • Removing toolbar from mdi

    Hello
    I have an mdi frame . I added internal frame to the desktop pane on the click of a menuitem.
         When this Internal frame opens I added one toolbar (which is defined in the Internal frame class) to the mdi. Now I want to remove the toolbar from mdi when the Internal frame is closed .I tried remove() method. But i am uable to trace the toolbar. Plz help me to solve it.

    After adding or removing a component from a Container you need to revalidate() the Container (and sometime repaint() it as well).

  • Filter option is not working in Reuse alv grid

    Hi all,
    Filter option is not working in alv grid properly.
    if i choose one particular field for filter option .it is working .but another field it is not working though it contains different values.please give the answer.whether i have to pass filter option throuogh reuse_alv _grid or not.thanks in advance
    raj

    Hi raja,
    1. The search/filter is
       CASE SENSITIVE
    2. U can give *
       to search for pattern.
      (IN THAT CASE, it is NOT Case Sensitive)
    regards,
    amit m.

  • Captuing the Line Item info from the ALV Grid

    Hi Abapper,
    Suppose I have an OO ALV Grid displayed on the Screen by using SET_TABLE_FOR_FIRST_DISPLAY.
    Now, suppose the grid contains 5 fields of the database table.
    I have to display the 6 th one of tht table by capturing the line item on which I click into the grid and select the 6th one and displayed.
    But how to capture the line item of the grid, when i click any rows in the grid.
    Please reply.
    Regards,
    Rahul

    Hi Rahul,
    Two methods are available,
    1) Define the double_click method, or
    2) Implement the HotSpot and User_command method.
    i_callback_user_command           = slis_ev_user_command
    form user_alv_command using r_ucomm like sy-ucomm
                                w_selfield type slis_selfield.
    *Routine called when user invokes a command not handled by the ALV
      case r_ucomm.
        when '&IC1'.  "Hot Spot Click
           read table itab index w_selfield-tabindex.
        when others.
      endcase.
    endform.                    " USER_ALV_COMMAND
    Kind Regards
    David Cooper

  • Removed toolbar from Navigator in Design Editor and want it back

    Hi,
    this is more funny than actually serious stuff that it is usually discussed here. I accidentally dragged toolbar from Navigator in Design Editor so it was floating palette. I clicked close window button on palette and have never seen toolbar again. Tried close Navigator, close Design Editor, right click on various places no luck, my dear little toolbar is gone.
    Please give me my toy back!!! =:>)
    Thank you,
    Radek

    Radek,
    Use the View menu and you should see that the Toolbar option is missing a tick. Select Toolbar and all will
    be well again...
    regards,
    David

  • Reused alv grid - Sum one column of ALV Grid

    I'd like that one column of my alv grid to be sum...
    How can i do that abap'ly speaking...
    regards

    hi,
    DATA: lr_field type ref to cl_salv_wd_field.
    *For total calculations...
    if wd_comp_controller->gref_model_efforts is not initial.
    CALL METHOD wd_comp_controller->gref_model_efforts->if_salv_wd_std_functions~set_aggregation_allowed
    EXPORTING
    value = abap_true.
    lr_field = wd_comp_controller->gref_model_efforts->if_salv_wd_field_settings~get_field( 'BILLABLE_VALUE' ). "The column name for which total needs to be done.
    lr_field->if_salv_wd_aggr~create_aggr_rule( aggregation_type =
    if_salv_wd_c_aggregation=>aggrtype_total ).
    endif.
    Refer this :
    Alv subtotal and total
    Thanx.

Maybe you are looking for

  • Crystal report 2008 for B1 Join report of open PO, good receipt, good retur

    Hi All, I am new to crystal report for B1. I am developing a report for showing all open purchase order, good receipt, good return, A/P Invoice and A/P credited memo   rows for selected project. This is similar to open item report, but I need to show

  • Loosing internet connection every 15 minutes

    I am "loosing" my internet connection every 15 minutes. The cable box was replaced. Internet sharing is off. The firewall is on and no ports are checked. But, every 15 minutes, I get a message (using Safari) that there is no connection. I select netw

  • How do I place a unique numeric tag to autoresponder emails?

    I want to place a numeric tag that is individual to each autoresponder email for  everyone that signs up to one of my mailing lists. What I am doing is sending them a coupon that needs to have a unique numeric identifier. I don't care what type of nu

  • MRP Custom Order Interval

    We have an Item set with an Order Interval of Six Monthly, by using the 'Every X Days' option and entering 180 days into the no. of days field. When running the MRP wizard however, the recommendations report suggests raising a purchase order every mo

  • LR3 and Windows 7: How to work with images on a NAS?

    I'm using LR 3.6 on Windows 7. My image files are on a NAS. I cannot see my NAS in the Import screen, nor in the Add Network Volume dialog. Help?