cancel
Showing results for 
Search instead for 
Did you mean: 

Disable ALV buttons in Web Dynpro

Former Member
0 Kudos

Hi frnds,

Is it possible to disable buttons on the ALV out put in web dynpro.

In my ALV output when i select a left side button it's doing some process , my client dont want that buttons, is there any process to hide the buttons?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

Yes it is possible.

Say i want to make FILTER OPTION disappear from the ALV grid on web dynpro.

I have written this code in WDDOINIT in my DISPLAY VIEW to achive this.


 DATA: filter TYPE REF TO cl_salv_wd_config_table,
           l_salv_wd_table TYPE REF TO iwci_salv_wd_table .

  CREATE OBJECT filter.
  l_salv_wd_table = wd_this->wd_cpifc_alv( ).
  filter = l_salv_wd_table->get_model( ).

  CALL METHOD filter->if_salv_wd_std_functions~set_filter_filterline_allowed
    EXPORTING
      value = abap_false.

I hope it helps.

Regards and Best wishes.

ChrisPaine
Active Contributor
0 Kudos


  CREATE OBJECT filter.
   l_salv_wd_table = wd_this->wd_cpifc_alv( ).
   filter = l_salv_wd_table->get_model( ).
 

Why do you instantiate a reference to a filter and then almost immediately replace it with the ALV one?

I don't think you need the line

>   CREATE OBJECT filter.

But a good example of how to get at the ALV table model!

Former Member
0 Kudos

Hi chris,

You are right, there is no necessary of that piece of code.

Regards and Best wishes.

Former Member
0 Kudos

Thanks frnds problem is solved

I added this code in on_select method

l_table1 TYPE REF TO cl_salv_wd_config_table,

L_table1->if_salv_wd_TABLE_settings~SET_ROW_SELECTABLE( ABAP_FALSE ).

Thanks & Regards ,

Rajesh.j

Former Member
0 Kudos

Yes

this is possible

lr_button TYPE REF TO cl_salv_wd_fe_button, will give you alv butten reference.

lr_button->set_enabled( abap_true ).

lr_function = lr_toolbar->get_function( l_id ).

lr_button ?= lr_function->get_editor( ).

Get that and do what you want to do lr_button->set_enabled( abap_true )

Best regards,

Rohit

Former Member
0 Kudos

But it is not given proper out put

Former Member
0 Kudos

Hi

Which buttons you are talking about ? Can you please provide some more information ?

Regards,

Srikanth

Former Member
0 Kudos

i am displaying output in alv format in web dynpro ,so the ting is in that output when i select a row some action was happening

but it is not showing any output .

so i dont want it.

it is possible to disable that action?

Former Member
0 Kudos

Try to use the method IF_SALV_WD_STD_FUNCTIONS~IS_FILTER_FILTERLINE_ALLOWED of class CL_SALV_WD_CONFIG_TABLE.

Refer to the below code:

CALL METHOD wd_this->alv_conf_table->IF_SALV_WD_STD_FUNCTIONS~IS_FILTER_FILTERLINE_ALLOWED

EXPORTING

value = ABAP_false..

Here alv_conf_table refers to CL_SALV_WD_CONFIG_TABLE.