08-25-2008 12:30 PM
Hi
After a report is being displayed and the user wants to print it, normally the standard printing screen appears
But the requirements is to have a screen appearing which contains all the documents on the report, a 'Print' and a 'Cancel' button
I have to create a screen in SE41, I guess but I dont know how to link the report and that new screen to avoid the standard print screen
08-25-2008 1:34 PM
Hi Anjali,
Try the following
WINDOW STARTING AT 1 15
ENDING AT 79 23.
START-OF-SELECTION.
SET PF-STATUS 'MAIN'.
WRITE SY-PFKEY.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'F001'.
SET PF-STATUS '0001'.
WRITE SY-PFKEY.
Specify two buttons in window and give FCT code and apply your logic.
Hope this is useful to you.
Regards,
Santosh Kumar M.
08-25-2008 12:37 PM
Hi
call function 'POPUP_TO_CONFIRM'
exporting
text_question = 'Do you want Print "
importing
answer = answer
exception
TEXT_NOT_FOUND = 1
others = 2.
thanks
Sreenivas Reddy
08-25-2008 1:11 PM
08-25-2008 1:34 PM
Hi Anjali,
Try the following
WINDOW STARTING AT 1 15
ENDING AT 79 23.
START-OF-SELECTION.
SET PF-STATUS 'MAIN'.
WRITE SY-PFKEY.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'F001'.
SET PF-STATUS '0001'.
WRITE SY-PFKEY.
Specify two buttons in window and give FCT code and apply your logic.
Hope this is useful to you.
Regards,
Santosh Kumar M.
08-25-2008 1:36 PM
Extension,----
Dont forget to call
"Leave to List-processing statement" after your logic.
Regards,
Santosh Kumar M.
08-25-2008 1:38 PM
Hi Anjali,
You can apply this logic if you want.
method onactionpopup4_1 .
data: l_cmp_api type ref to if_wd_component,
l_window_manager type ref to if_wd_window_manager,
l_popup type ref to if_wd_window,
l_text type string_table,
l_api type ref to if_wd_view_controller.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
insert `Data where changed` into table l_text. "#EC *
insert `Do you want to save?` into table l_text. "#EC *
l_popup = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_yesnocancel
message_type = if_wd_window=>co_msg_type_question
window_title = 'Test: Popup to confirm'
window_position = if_wd_window=>co_center )."#EC *
l_api = wd_this->wd_get_api( ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
action_name = 'YES'
action_view = l_api
is_default_button = abap_true ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_no
action_name = 'NO'
action_view = l_api
is_default_button = abap_false ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_cancel
action_name = 'CANCEL'
action_view = l_api
is_default_button = abap_false ).
l_popup->open( ).
endmethod.