on 03-12-2014 7:38 AM
Hi Gurus,
I have created a custom button on my webdynpro screen . When I click that button I want to take print out of the particular screen and at the same time I need to hide the buttons (buttons are displaying on print screen option). Can anybody please help me out .
Thanks & Regards
Suman Kumar
Hi Suman,
To print WDA application, please refer the below document
Printing Web Dynpro ABAP Applications - Web Dynpro for ABAP - SAP Library
I don't think there is a standard method to hide the button from being included in snap shot of print.
Work around solution1:
i.e. hide the button,
DATA lo_view TYPE REF TO if_wd_view.
DATA lo_btn TYPE REF TO cl_wd_button.
lo_view ?= wd_this->wd_get_api( ).
lo_btn ?= lo_view->get_element( 'BTN_PRINT' ).
lo_btn->set_visible( value = cl_wd_button=>e_visible-none ).
" Print page
data:
l_api_componentcontroller type ref to if_wd_component,
l_appl type ref to if_wd_application.
l_api_componentcontroller = wd_comp_controller->wd_get_api( ).
l_appl = l_api_componentcontroller->get_application( ).
l_appl->print_page( ).
Note: this hide the button PRINT and on subsequent action, you can make it visible again
Work around solution2 :
you can just create a button with access key ( CTRL + P ), without button text... So that it will not be visible in printing. Users can print by using short cut keys CTRL+P
Hope this helps you.
Regards,
Rama
Message was edited by: Ramakrishnappa Gangappa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.