Hi All,
We have a requirement in WD to print the contents of the WD view.
Representation of the view is: When the user clicks on Print in the page – the printable contents of the page are opened in a new window (The printable content is different from the original displayed content – that is the reason we open it in a different window.) – In the init method of this view opened in the new window - we write the below code. The printing just works fine. But the problem is the additional windows.
DATA: lo_api_compcontroller TYPE REF TO if_wd_component,
lo_appl TYPE REF TO if_wd_application,
lo_ztest_wd_xgt_print_1 TYPE REF TO ig_ztest_wd_xgt_print_1.
* Get API reference
lo_api_compcontroller = wd_comp_controller->wd_get_api( ).
lo_appl = lo_api_compcontroller->get_application( ).
* Print the page
lo_appl->print_page( ).
lo_ztest_wd_xgt_print_1 = wd_this->get_ztest_wd_xgt_print_1_ctr( ).
lo_ztest_wd_xgt_print_1->fire_exit_win_plg( EXPORTING close_window = 'X' ).
From the portal – printable contents open in a new window – then from init again the print window opens where we have to actually click the print/cancel.
Is there any way I do not have this printable contents view displayed and directly implicitly print it (i.e. open the printable layout directly with Print & Cancel button instead of opening a new window)?
Regards,
Sai