Skip to Content
author's profile photo Former Member
Former Member

Hide button in webdynpro standard

Hi friends,

In the past some folks guided me to hide and change standard buttons; now I'm stuck with a toolbar which does not respond to my code when I want to hide it

Im enhancing webdybpro HRECM00_PLANNING_UI method WDDOMODIFYVIEW of view v_planning:

lr_lbl ?= view->get_element( ID = 'ADJUST_COMPENSATION' ).

IF lr_lbl IS NOT INITIAL.

lr_lbl->set_visible( 01 ).

endif.

lr_lbl ?= view->get_element( ID = 'SALV_WD_PDF' ).

IF lr_lbl IS NOT INITIAL.

lr_lbl->set_visible( 01 ).

endif.

but when debug it it seems that the method get_element is not getting anything. This is the detail of the webdynpro and toolbar buttons I want to hide (not all of them):

Any help will be greatly appreciated!!

1.png (67.2 kB)
2.png (62.0 kB)
3.png (134.8 kB)
4.png (65.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Jun 09, 2014 at 07:41 PM

    Hi,

    Those buttons are not part of the view but ALV's. So you have to hide the ALV toolbar buttons using if_salv_wd_std_functions.

    write the below code:

    data lr_interfacecontroller type ref to iwci_salv_wd_table .

    data lr_value type ref to cl_salv_wd_config_table.

    lr_interfacecontroller = wd_this->wd_cpifc_alv_comp( ).

    lr_value = lr_interfacecontroller->get_model( ).

    lr_value->if_salv_wd_std_functions~set_pdf_allowed( value = abap_false ).

    You can refer this thread:

    Regards,

    Kiran

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2014 at 04:32 AM

    Hi Federico,

    If you want to hide standard ALV toolbar buttons,following is the code.

    *---->ALV Config table reference
    lv_value = lo_interfacecontroller->get_model( ).

    *----->ALV print,export buttons disabled
    lv_value->if_salv_wd_std_functions~set_pdf_allowed( abap_false ).
    lv_value->if_salv_wd_std_functions~set_export_allowed( abap_false ).

    *----->Alv personalization viewlist disabled

    lv_value->if_salv_wd_std_functions~set_view_list_allowed( abap_false ).

    Thanks

    KH

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.