Problem with Enable/Disable a button on SALV Full Screen

hide toolbar buttons in alv
handle toolbar for event toolbar of cl_gui_alv_grid
how to add custom button in alv grid
how to add custom button in oops alv grid
push button in alv report in sap abap
how to add button in application toolbar in sap abap
hide custom button in alv toolbar
set_table_for_first_display user command

Dear all I need your help on the below desperately.

I have created an ALV from SALV and I have copied a GUI Status SALV_STANDARD from a standard program. Firstly I added 2 buttons the POSTNEW & POSTDIFF and after a day I added the SELECT button.

Depending on the selection of the user I want to enable or disable the buttons according to the business requirements.

I have this code in a procedure:

  r_alv type reference CL_SALV_TABLE.
  if status_name is not initial and report_name is not initial.
    set pf-status status_name.
    r_alv->set_screen_status(
      pfstatus      =  status_name
      report        =  report_name
      set_functions = r_alv->c_functions_all ).
  endif.

  data: lit_functions_list type salv_t_ui_func,
        lwa_functions_list like line of lit_functions_list.

  r_functions = r_alv->get_functions( ).  "Get Toolbar functions
  lit_functions_list = r_functions->get_functions( ).

  if i_button_name is not initial.
** Now hide the BUTTON
    loop at lit_functions_list into lwa_functions_list.
      if lwa_functions_list-r_function->get_name( ) = i_button_name.
        lwa_functions_list-r_function->set_visible( i_button_visable ).
      endif.
    endloop.
  endif.

The variables status_name, report_name, i_button_name and i_button_visable are parameters of the procedure and I think that their names show what they are carrying.

The internal table lit_functions_list has 60 records and the last 2 have data for the first 2 buttons and this is the reason that I can enable/disable them. But there is no record with my 3rd button SELECT. Instead there is a record with the button MYFUNCTION which I have already deleted.

Can someone tell me what to do in order to have the 3rd button available in the lit_functions_list?

Can someone tell me why this itab has so many garbages?

Thanks in advance Elias

Even I had the same problem. After I ran the report BALVBUFDEL it solved the issue. Newly created buttons now coming inside the function list ..

lit_functions_list = r_functions->get_functions( ).

Problem with Enable/Disable a button on SALV Full Screen, Dear all I need your help on the below desperately. I have created an ALV from SALV and I have copied a GUI Status SALV_STANDARD from a standard� For those who may have tried, using CL_SALV_TABLE->GET_FUNCTIONS and attempting to use ENABLE_FUNCTION to disable functions is fruitless and ultimately ends in a short-dump telling you this action isn’t supported for full-screen SALV variants. Wouldn’t it be nice if we could just write something like:

For Adding 3rd button in the lit_functions_list, You can use below code.

  r_functions->set_function( NAME = 'BUT3' BOOLEAN = 'X' ).  

you can also use add_function to add new button.

try.
  r_functions->add_function(
    name     = 'BUT3'
    icon     = l_icon
    text     = l_text
    tooltip  = l_text
    position = if_salv_c_function_position=>right_of_salv_functions ).
  catch cx_salv_existing cx_salv_wrong_call.
endtry.

itab does not have garbage. It contains all the data related to status like menu bar, application tool bar and function keys.

Full screen CL_SALV_TABLE – Excluding PF-Status functions (a , There is also an old answered question on SCN on this. Found it by using “SALV disable function” in Google. Like(1). To the right of the Zoom option in the menu, click the “Full Screen” button to activate a full-screen browsing experience. It looks like a diagonal arrow. In full-screen mode, move the mouse to the top of your screen and click the “X” button to exit full-screen mode. (The button only appears when you move your mouse to the top of the

Finally I found the answer at least to my problem. Let me describe again what I did: I copy the GUI Status from the standard program SALV_DEMO_TABLE_FUNCTIONS to my program through Tcode SE41. I added 2 buttons POSTNEW & POSTDIF. Until now all working perfect and I can Enable/Disable these 2 buttons. Next day the business asked me to add a button SELECT with which the user can make editable the corresponding SELECT column of the itab in order to choose which record to be posted. And here started my problem where the itab with the functions didn't contain the last created button SELECT. What I did was, I created a button through the design process of the GUI Status but I could not get it through the below code:

lit_functions_list = r_functions->get_functions( ).

With your answers I found other problems in my code but still I could not get the new button in the above itab. Finally, yesterday evening I remembered, what someone told me in the past. In old systems (like oursSAP ECC 6.0 R701 SP007) sometimes the ALV buffer stuck and we have to reset it. So I run the program BALVBUFDEL and vuala the button SELECT appeared in the itab and I can now Enable or Disable. So keep in mind that sometimes the ALV buffer needs a reset. Thanks all for your help. Elias

FULLSCREEN ALV with status GUI, Hi experts, I have fullscreen alv with status GUI with my own created buttons and i need option to disable my own created button. I have not find solution yet. Is there Answers � All Questions � Ask a question � How to ask a question � Using Tags � All Tags � Blogs PF-Status Problem. By Former Member� The solution works great if there is an extra button. This extra button – say Edit – would make the SALV editable. This button is required to gain the access of the underlying Grid object (CL_GUI_ALV_GRID). The Grid object than used to set up the editable functionality.

Hide or Display Selective Buttons on ALV Toolbar |, Selective Disabling & Enabling of the Buttons in OOPS ALV Grid (cl_gui_alv_grid ) Toolbar. Generally, if the requirement is to remove the whole ALV grid toolbar then it's pretty easy as it just requires cntl_system_error = 2. Lack of standard, baseline list processing functions means that developers devise their own methods for common list handling activities such as headings, sorting, filtering, rendering subtotals, and the like. By adding the standard Functions of the ALV Tool Bar you are using the SALV OO Classes to standardize your reports, and saving development time for delivering results!

ZDEMO_FALV05 - Adding/Removing/Disabling , "Set Gui status to fully dynamic (no standard buttons of ALV Grid) iv_text = ' Enable Print' "In default when we use full screen FALV, Grid toolbar is switched off, we reply on the same question at http://abapblog.com/falv . Once it is open, press F11 on the keyboard to enter full-screen mode. It doesn't matter if the browser is maximized or only taking up part of the screen. Pressing the F11 shortcut key causes it to enter full-screen mode. When you finish using full-screen mode, press F11 on the keyboard again, as F11 acts as a toggle.

Using The SALV OO Class – Adding Functions to the ALV ToolBar, Problems with ABAP output and why using the ALV Toolbar can help Users can invoke functions that refer to a selected column (like hide, search, Developers can allow these settings to be saved in a display variant that then collapse all subtotal levels by clicking on the little buttons of the total line. The first button, the second click in any area of the browser, then starts a full screen mode. Tell me, is there the possibility to switch to fullscreen mode of the game, with 1 click on the button standard template.

Comments
  • Did you activate the CUA interface (containing all GUI status & titles) after you have changed it?
  • What you call "garbage" is the list of all possible standard function codes. Note that you usually don't need to loop at this list to disable one function code (possibly a button), because you know its "name" (in fact its "function code"), it's easier to disable it with r_alv->get_functions( )->set_function( name = 'ZZZ' boolean = abap_false ). (where ZZZ is the function code)
  • Umar, I have created the button (function) 'SELECT' in GUI Status. I added your code but it does not work and have the following error in code: abap enable_function( name = name boolean = if_salv_c_bool_sap=>true ). text = text-001. l_name = name. raise exception type CX_SALV_METHOD_NOT_SUPPORTED exporting class = 'CL_SALV_FUNCTIONS' method = 'ENABLE_FUNCTION' object = l_name key = text. TEXT-001=Only Possible in Grid View NAME=SELECT .
  • ERROR: Class CL_SALV_FUNCTIONS, method ENABLE_FUNCTION not supported for SELECT Only Possible in Grid View
  • My code is example only. You have to declare variables and method calls accordingly.
  • For more detail, You can see in Program SALV_DEMO_TABLE_FUNCTIONS.
  • The method ADD_FUNCTION cannot be used on a Full Screen ALV, because the buttons are statically defined in a GUI status (the one indicated via method SET_SCREEN_STATUS. Only the method SET_FUNCTION can be used to enable or disable a function code (a button in the context of this question).