Regarding ALV toolbar hidding

hi,
       I would like to know that how can I hide default application tool bar of ALV. Actually I need to hide filter and settings options of that tool bar.
thanks
kumar saurabh

Welcom here in SCN!
Please make sure you have read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement].
This question is really a basic one. I believe you can find the answer yourself, but as you are new here I will give you some hints:
- for OO ALV you can just use parameter it_toolbar_exlcuding and append there any function code of toolbar option. You can find them all in cl_gui_alv_grid class's attributes, starting with mc_... i.e.
data: lt_exclude type ui_functions,
         ls_exclude type ui_func.
  ls_exclude = cl_gui_alv_grid=>mc_fc_filter.   "turn off the filter option
  append ls_exclude to lt_exclude.
call method t_grid->set_table_for_first_display
      it_toolbar_excluding         = lt_exclude  "now just pass all the function which have to be hiden
- for classic ALV you use the following
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
       i_callback_pf_status_set           = 'PF_STATUS_SET'  "give cutom  subroutine name
FORM pf_status_set USING it_extab TYPE slis_t_extab.
data : wa_extab type slis_extab.
wa_extab-fcode = '&LFO'.  "give function code to excude specific option
append wa_extab to it_extab.
"now set the status excluding the toolbar option
  SET PF-STATUS 'STANDARD' excluding it_extab .
ENDFORM.
Regards
Marcin

Similar Messages

  • Regarding ALV ToolBar

    Hi ,
    In ALV Report using OOPS i had used SET_TABLE_FOR_FIRST_DISPLAY Method .I had header part and list area.When I am using that method stanard PF-status(like sort,filter..) are coming default in the list area only.So my report is displayed like header part, list area(with buttons like sort,filter etc..).But i need those buttons in Application toolbar?
    Regards,
    Reddy
    Edited by: pydi reddy on Dec 4, 2009 3:17 PM

    Hi pawan,
    That is not a method.Its a function Module.
    Regards,
    Reddy.

  • Regarding caption/label on ALV toolbar

    Hi All,
    I wanted to provide some text on ALV toolbar. I'm on latest Netweaver version.
    I can find the CL_SALV_WD_FE_A_CAPTION abstract class but not CL_SALV_WD_FE_CAPTION(something like thing) where
    I can see it for button,Inout field etc.....
    Is there any way to provide some label or text on ALV toolbar.... i have searched but could find none.
    Regards,
    Lekha.
    Regards,
    Lekha.

    Lekha - If you want to write something in the header, let's say a random caption you can do as follow:
      DATA lo_cmp_usage             TYPE REF TO if_wd_component_usage.
      DATA lo_interfacecontroller   TYPE REF TO iwci_salv_wd_table .
      DATA l_value                         TYPE REF TO cl_salv_wd_config_table.
    lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      l_value = lo_interfacecontroller->get_model(  ).
    lr_header = l_value->if_salv_wd_table_settings~create_header( ).
      lr_header->set_text( 'Table for Lekha' ).
    and if you want to add a field in the toolbar....
      DATA lr_custom_functions      TYPE REF TO if_salv_wd_function_settings.
      DATA lr_functions                    TYPE REF TO  if_salv_wd_std_functions.
      DATA lv_text                            TYPE string.
      DATA lr_button                         TYPE REF TO cl_salv_wd_fe_button.
      DATA lr_function                      TYPE REF TO cl_salv_wd_function.
      lr_custom_functions ?= l_value.
      lr_function = lr_custom_functions->create_function_right( 'EDIT' ).
      lr_function->set_position( '1' ).
      CREATE OBJECT lr_button.
      lv_text = '    Edit     '.
      lr_button->set_text( lv_text ).
      lv_text = 'Edit form'.
      lr_button->set_tooltip( lv_text ).
      lr_function->set_editor( lr_button ).
    Regards!
    Jason P-V

  • ALV Toolbar related Query

    Hi,
    When using FM 'REUSE_ALV_GRID_DISPLAY'
    Exporting Parameters : I_CALLBACK_PF_STATUS_SET 
    in SET PF Status Creating additional Buttons.
    In ALV Report output addition  additional buttons are coming
    but Standard ALV Toolbar are missing like Sort Assending ,Descending,Total,Subtotal,
    Layouts.
    Please give any Suggestions for Standard toolbar as well as additional buttons to display
    by using FM 'REUSE_ALV_GRID_DISPLAY'.
    Thanks,
    Manish

    Hi,
    Check this subroutine in example program :
    BCALV_TEST_FULLSCREEN_CALLS
    form f01_event_pf_status_set using rt_extab type slis_t_extab.
      set pf-status 'STANDARD_FULLSCREEN' excluding rt_extab.
    endform.                   " f01_event_pf_status_set
    regards,
    Advait

  • ALV Toolbar on modal dialog screen and toolbar on text edit control

    Hello,
    I have created one container and producing ALV Grid output on a modal dialog screen. i do not want the ALV Toolbar to appear on this screen. How can I hide it ?
    ALso I need to hide some buttons on a Text edit control. How can I hide them ?
    Thanks and rgds,
    Anand

    Hi,
    To exclude some Toolbar functions, please do the below
    DATA:
    lt_toolbar_excl TYPE ui_functions.
      Exclude Some toolbar functions
        APPEND cl_gui_alv_grid=>mc_fc_detail         TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_info           TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_graph          TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_view_crystal   TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_loc_delete_row TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_loc_append_row TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_loc_insert_row TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_loc_copy_row   TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_loc_undo       TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_check          TO lt_toolbar_excl.
        APPEND cl_gui_alv_grid=>mc_fc_refresh        TO lt_toolbar_excl.
    And Pass the lt_toolbar_excl to the ALV object
    Display
      CALL METHOD go_alv_grid->set_table_for_first_display
        EXPORTING
          is_variant           = ls_variant
          is_layout            = ls_alv_lay
          is_print             = ls_print
          i_save               = 'A'
          it_toolbar_excluding = lt_toolbar_excl
        CHANGING
          it_sort              = lt_sort
          it_outtab            = gt_user[]
          it_fieldcatalog      = lt_alv_cat.
    Hope this helps you.
    Thanks,
    Ruthra

  • Buttons on ALV toolbar

    Hi all,
    I have developed an ALV Grid with a button SAVE.
    The list that is displayed in ALV  will be saved to ZTABLE when user clicks the SAVE button.
    My requirement is after that , I need to add a DISPLAY to the same ALV GRID TOOLBAR.
    How can I do it? do I have to CALL METHOD g_grid->set_table_for_first_display again?
    Thanks
    MH

    Hello
    The sample report for dealing with ALV toolbar buttons is BCALV_GRID_05.
    I assume that as long as your ALV grid is editable the user should see the SAVE button. As soon as the user has saved the data the grid changes to Display-only (non-editable) and the DISPLAY button should appear.
    If so then you can use method go_grid->IS_READY_FOR_INPUT( ) within the event handler method handle_toolbar.
    The sample report explaining this method is BCALV_EDIT_01.
    Regards
      Uwe
    PS: There is no need to call go_grid->set_table_for_first_display again, simply use go_grid->refresh_table_display.

  • Add a button choice on alv toolbar in wda

    Hello Experts,
    I want add a button choice on alv toolbar. I already insert the choice button indeed I see the button correctly.
    Now I want insert the list of action with the following code:
    <<
    >>
    With this code my web-interface retuns this message: "500 SAO INTERNAL SERVER ERROR. ERROR ACCESS via null object reference not possible. (termination rabax_state)". The dump is in "cl_wdr_utilities=>construct_mime_url".
    Do you have any ideas? Do you have any examples?
    Thanks in advance.
    Best Regards,
    Marino

    Hello,
    the problem isn't "the line set_image_source". The problem was the order, the correct order is:
    <<
    CREATE OBJECT lr_button_choice.
         lr_button_choice->set_image_source( 'ICON_CHANGE' ).    "#EC *
         lr_button_choice->set_text( value = 'Modifica' ).
         lr_button_choice->set_tooltip( value = 'Modifica Attributi').
    CREATE OBJECT lr_menu_action_item
           EXPORTING
             id = 'MOD_NOTE'." TYPE REF TO cl_salv_wd_menu_action_item.
         lr_menu_action_item->set_text( 'Note').
         lr_button_choice->add_choice( EXPORTING  value = lr_menu_action_item ).
         CREATE OBJECT lr_menu_action_item
           EXPORTING
             id = 'MOD_CONTO'." TYPE REF TO cl_salv_wd_menu_action_item.
         lr_menu_action_item->set_text( 'Conto').
         lr_button_choice->add_choice( EXPORTING  value = lr_menu_action_item ).
         lr_function = wd_this->salv_incassi->if_salv_wd_function_settings~create_function( id = 'MOD')."creating the function for alv button
         lr_function->set_editor( lr_button_choice ).
    >>
    Thanks very much.
    Best Regards,
    Marino

  • ALV Toolbar Runtime error

    Hi
          i am enhancing one report.i just added some fields like standard price,special procurement,safety stock.i'm displaying the
    report in ALV.my problem is report displaying is fine.but when i click any ALV toolbar buttons like export to local file,print preview.before enhancement,ALV tool bar is working fine.it is showing the runtime error like "The statement strlen(obj) the argument 'obj' can only take a character type data obj.in this case,the operand 'ob' has the non character type".i am unabale to find where exactly error is occuring.. when i start debugger in runtime error 'the cursor going to 'gs_out-hlplen = strlen( <field> ).when i click this one is is showing my standard price value of the first material in ALV like '3367.44'.can anyone suggest on this issue.
    Thanks
    Arjun

    Hi PranavJeeth,
                             this is my field catalog.i'm just showing one field.
                   PERFORM set_field USING:
                          FIELD   SHORT TEXT   LONG TEXT             OUTLEN  TYP FMT SUM HID
                          'STPRS' 'STD.PRICE ' 'STANDARD PRICE      ' '00011'    'P'   ' '        ' '     ' ',
    FORM set_field USING pv_fieldname TYPE c
                         pv_descr_s   TYPE c
                         pv_descr_m   TYPE c
                         pv_length    TYPE c
                         pv_inttype   TYPE c
                         pv_format    TYPE c
                         pv_sum       TYPE c
                         pv_hide      TYPE c.
      CLEAR gw_fieldcat.
      gw_fieldcat-fieldname = pv_fieldname.
      gw_fieldcat-seltext_s = pv_descr_s.
      gw_fieldcat-seltext_m = pv_descr_m.
      gw_fieldcat-outputlen = pv_length.
      gw_fieldcat-inttype   = pv_inttype.
      gw_fieldcat-no_out    = pv_hide.
    CASE pv_format.
    *-- Prices must have corresponding currency for format purposes
      If no currency field is needed (fixed currency), use
      GW_FIELDCAT-CURRENCY instead of GW_FIELDCAT-CFIELDNAME
        WHEN 'P'.                           " prices
          gw_fieldcat-currency   = 'MYR'.
          gw_fieldcat-do_sum     = pv_sum.
                                               when i excute report is ok.but when we clcik on alv toolbar runtime error occuring.when i run debugger,the code like this
    if gs_fc-tech_form ne 99.
    gs_out-hlplen = strlen( <field> ).
    endif.
       when i click on field the values like this
         <field> = 100
         gs_fc-tech_form  = 90.
                 please suggest on this issue.

  • Make self defined function on ALV toolbar invisible

    Hello Experts,
    I have defined a self defined function dropdown on standard ALV toolbar on the Lead select event  and defined the function too.
    But I want at some condition the dropdown should disappear. How can I set the drop down on the ALV toolbar to invisible.
    Please suggest.
    Thanks and Best Regards,
    Sahil

    While defining the drop down, just bind the visible property to a context node attribute of type WDUI_VISIBILITY and set it based on your requirement.
    Manas Dua

  • Read alv toolbar print button

    Hi SDNers,
    I would like to capture the ucomm when user clicks on print button which is on ALV grid toolbar(used classes to display alv).
    I can able to capture user defined button on alv tool bar, along with user defined, standard button are there. I need to read user command text when user clicked on print button on the alv toolbar.
    Kindly let me know which class and wher i need to use the same to read the print button.
    Thanks in advance,
    Regards,
    Sridhar

    hii
    Thanks for the reply yes i already seen that which does'nt match my requirement.Can you tell me anyother class.
    regards,
    Sri.

  • Adding a Pushbutton on ALV toolbar

    Hi ,
    I wanna add a pushbutton to my ALV report toolbar, I have tried by screen painter(se51) but its not working. That is when you open the screen painter its showing the  push button, but when you run the screen as transaction its not showing that button. 
    Any help is greatly appreciated.
    Regards
    Moderator Message: Please search before posting your question. Thread locked.
    Edited by: Suhas Saha on Oct 18, 2011 3:40 PM

    Hi Harsh,
    To add button in the ALV toolbar, follow the below steps :
    1. Open Functional group SALV in se80 and copy the GUI status 'STANDARD' in customer namespace ( for e.g. ZSTANDARD'  to your ALV report program.
    2. Once you copy the GUI status, open your ALV report program in se80 and modify it's GUI status 'ZSTANDARD' according to your requirement.
    3. Code accordingly in your ALV report program.
    Here is the below code for your reference.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = g_repid
          i_callback_pf_status_set = alv_status_set
          i_callback_user_command  = *alv_user_comm*
          i_grid_title             = grid_title
          i_save                   = g_save
          is_variant               = gs_variant
          is_layout                = alv_layout
          it_fieldcat              = alv_fieldcat[]
          it_events                = gt_events[]
          it_sort                  = alv_sort[]
        IMPORTING
          e_exit_caused_by_caller  = g_exit_caused_by_caller
          es_exit_caused_by_user   = gs_exit_caused_by_user
        TABLES
          t_outtab                 = it_final[].
      PERFORM *alv_user_comm* USING r_ucomm
                                  rs_selfield.
    FORM *alv_user_comm*  USING    r_ucomm     LIKE sy-ucomm
                                 rs_selfield TYPE slis_selfield.
    r_ucomm = sy-ucomm.
      CASE r_ucomm.
      ENDCASE.
    ENDFORM.
    Let us know if you still having some issues.
    Cheers
    VJ

  • Create Input Field within ALV Toolbar

    Hi,
    I've created an ALV table using the CL_SALV_TABLE class. I'm now trying to include an input field within the ALV toolbar. I would also require this field to do an F4 to obtain its values. Can anyone help me?
    Thanks and regards,
    Adeline.

    Hi Adeline,
    as Rich explained: Not inside ALV toolbar. If you do not use full screen display but have a screen container for this, you may define a subscreen area on top of ALV container. Use CALL SUBSCREEN <area> INCLUDING <prog> <dynp> syntax to process the subscreen. Define PROCESS ON VALUE-REQUEST for F4. In PAI (PROCESS AFTER INPUT) you can modify the table displayed in the grid and do a new display.
    Regards,
    Clemens

  • ALV-Toolbar : Control the &LOCAL& Buttons

    Hi, all
    I have the following problem with ALV-Toolbar.
    If I use editable ALV-Grid Control, I get in the toolbar new buttons such as DELETE_ROW or UNDO. This buttons don’t trigger any events of the class CL_GUI_ALV_GRID.
    If I look at Function Code of such buttons in the Table mt_toolbar they are quiet similar. All of them have &LOCAL&……. 
    How could I control  this buttons  with my program .
    Many thanks for your help
    Vladimir Golovtchiner

    Hello Anand,
    Thank you for your answers.
    I thought that these buttons are belonged  to Front-End.
    I hope that ALV-Grid is an OCX. Or not? If it is an OCX-Object, is it possible to communicate with it?
    I have no any idea now, how to solve that, but I could explain to you – why I need to handle these buttons.
    I use an editable Grid of CL_GUI_ALV_GRID. For the last two columns I use Drag and Drop to move data from the pre-last column to the last column. It work properly until the following situation:
    For example I  have two rows in a Grid. I place the cursor to the last row and press the button “COPY_ROW” two times ( I have 4 rows in a Grid now). Immediately after that I try to do Drag&Drop at the last row (4th) from the Grid. As I drop the cursor on the last cell of the last row I get always the result in the last cell of the 2nd row ( the last row before I insert two rows).
    It doesn’t matter how many rows I had or how many rows I inserted to the Grid. It happens also in the middle of the Grid not only at the end.
    After the first Drag&Drop it begins to work properly. 
    I debugged the handler of Drag&Drop and I saw that the Drag&Drop object has in the structure E_ROW each time the number of the last row before insertion. I forced the update of backend in the handle of “on Drag” event with CHECK_CHANGED_DATA before I create the Drag&Drop object and passed the Drag&Drop handle to the internal table. It didn’t work.
    That is why I thought that I should do this update after each insertion or deletion with these buttons.
    In other words – I don’t want to change the functionality of these buttons I want to add something before.
    Best regards
    Vladimir Golovtchiner

  • Checkbox problem in ALV toolbar

    Hello all,
    I hv added a checkbox in my alv toolbar using classes.
    i.e. MOVE 'NO_DEFECTS' TO ls_toolbar-function.
          MOVE 'No Defects' TO ls_toolbar-quickinfo.
          MOVE 'No Defects' TO ls_toolbar-text.
          MOVE 5 TO ls_toolbar-butn_type.
          MOVE ' ' TO ls_toolbar-disabled.
          APPEND ls_toolbar TO e_object->mt_toolbar.
    Alv is displaying in one subscreen.
    My problem is my checkbox is displaying as a button instead of a check box and also i want to know how can i check whether my checkbox is active or not.
    I want to disable some buttons in the alv toolbar based on this checkbox.
    Thanks in advance.
    regards,
    Lokesh

    Hi,
    To disable the buttons in the toolbar, In the ALV events exclude the fcodes of the buttons you want to disable and pass it to the
    to the program like the below statement
      set pf-status 'STDPOPBX_FULLSCREEN' excluding lt_extab
                              of program 'SAPLKKBL'.
    To use the check box pass the ls_toolbar-ICON as ICON_WD_CHECK_BOX.
    Regards,
    Kranthi

  • ADD_CHOICE to standard BUTTON_CHOICE in ALV Toolbar

    Hello Experts,
    I want to add additional choice to a standard Button_Choice in the ALV Toolbar.
    I was able to get reference of the standard function (of type cl_salv_wd_function_std). However, to solve my purpose I would need the reference of the UI Element Button_Choice (perhaps of type CL_SALV_WD_FE_A_BUTTON_CHOICE) so that I can ADD_CHOICE.
    Thanks and best regards,
    Abir

    Hi Abir,
    For button choice help please refer this..
    About cl_salv_wd_fe_button_choice........
    Re: Help on Button Choice of alv tool bar
    Cheers..
    Kris.
    Edited by: kissnas on Feb 23, 2011 2:03 PM

Maybe you are looking for

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All, My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below) Caused by: java.lang.Nul

  • Nokia N97, Phone from hell (CHINA), built for the ...

    Well the subject spells it out, No need to address all the issues. My biggest dissappointment besides a $600 phone not functioning after only 5 weeks of use is; I paid premium price for a premium mobile phone. For the price of a N97 I could have boug

  • How do I stop an Error Message that I now get on start up after installing Itunes 10.2.2

    I have now installed Itunes 10.2.2 twice and continue to get the following error message when starting up my laptop. AppleSyncNotifier.exe CoreFoundation.dll not found. How do I get rid of it?

  • Parallel instances using ONE Action Engine

    Hi Everyone. I just wanted to see what type of ideas this would bring to this issue. I have an AE that holds all the pointers (or referances) that 20 instances of a reentrantVI use in parallel. Obviously the issue is the execution speed as all the in

  • IPhone to Aperture

    I am sitting here with my iPhone 4s attached to my MacBook Pro, trying to import 8 selected pics from a recent trip into a selected project in Aperture 3.5.1. When I attached the phone it automatically uploaded 49 pics. But I cannot find the in any A