cancel
Showing results for 
Search instead for 
Did you mean: 

remove print button from ALV table

Former Member
0 Kudos

Can someone please help me with this? I need to stop the 'Print Version' button from showing on the top of the ALV table. My knowledge of ABAP Objects is light, and my implementation is very simple, a minor modification from the tutorials, so please have your explanation be complete. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

frank_ruggaber
Explorer
0 Kudos

Hi Bob!

You can do it like that:


DATA:
        lr_if_controller  TYPE REF TO iwci_salv_wd_table,
        lr_cmdl           TYPE REF TO cl_salv_wd_config_table.

* get reference to the ALV model
  lr_if_controller = wd_this->wd_cpifc_alv( ). "supposed your reference is called alv
  lr_cmdl = lr_if_controller->get_model( ).

* disable print button
  lr_cmdl->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).

Hope it helps.

Greetings

Frank

Former Member
0 Kudos

Hello Bob,

I have similar requirement of disabling a button from ALV toolbar. That button is dynamically created in the toolbar. How can I do this.

I have main web dynpro application POWL and dynpro component is POWL_UI_COMP. when it displayed from portal there is button change order created dynamically alongwith print button. I want to disable that change order button.

Pl can you suggest on this.

thanks,

Sharada

Answers (3)

Answers (3)

Former Member
0 Kudos

lr_ref_cmp_usage = wd_this->wd_cpuse_alv_component( ).

IF lr_ref_cmp_usage->has_active_component( ) IS INITIAL.

lr_ref_cmp_usage->create_component( ).

ENDIF.

lr_interfacecontroller = wd_this->wd_cpifc_alv_component( ).

lr_value = lr_interfacecontroller->get_model( ).

lr_value->if_salv_wd_std_functions~delete_function( 'Your function ID' ).

Former Member
0 Kudos

hello ,

I am facing error in same kind of requirement ( I have to add a button to ALV toolbar).

I have opened a message on sdn.error is wd_cpuse_alv is unknown or its private or protected.

Pl can you look into that and suggest something on error .

thanks,

Sharada

Former Member
0 Kudos

Hi Sharada,

Porbably you have not declared the attributes in the in your WD Component's views.

Regards,

Satya

Former Member
0 Kudos

Thanks Frank, You are DA MAN!!!