Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

close popup problem

Hi WD Experts!

A popup window has been created for print preview settings (<b>W_PPS</b>) in our application (Output type can be selected here)

An other popup (<b>W_PPV</b>) displays the print preview itself in pdf format. It is called by pressing the Ok button on window W_PPS.

<u>Problem:</u>

Pressing on the Close button on print preview window W_PPV the popup is not closed and WD "hourglass"/"waiting animation" is displayed and waiting and waiting...

(Event handler method for Close button does not contain any code)

What could be the problem?

Any ideas welcome!

My guess:

The problem could be because:

- of the Interactive Form (PDF Form) control in the print preview window

- the 2nd popup (print preview - W_PPV) is called by the 1st popup ( Output selection - W_PPS )

Code snippet:

----


  • Output selection popup

----


[...]

lo_window = mo_window_mgr_ref->create_window(

window_name = 'W_PPS'

title = lv_text

close_in_any_case = abap_true

message_display_mode = if_wd_window=>co_msg_display_mode_none

close_button = abap_true

button_kind = if_wd_window=>co_buttons_okcancel

message_type = if_wd_window=>co_msg_type_none

default_button = if_wd_window=>co_button_ok

).

lo_window->subscribe_to_button_event(

button = if_wd_window=>co_button_ok

action_name = 'PPS_OK'

action_view = mo_view_controller

is_default_button = abap_true ).

lo_window->subscribe_to_button_event(

button = if_wd_window=>co_button_cancel

action_name = 'PPS_CANCEL'

action_view = mo_view_controller

is_default_button = abap_false ).

lo_window->open( ).

[...]

----


  • Print Preview popup

----


lv_text = if_wd_component_assistance~get_text( 'PPT' ).

lo_window = mo_window_mgr_ref->create_window(

window_name = 'W_PPV'

title = lv_text

close_in_any_case = abap_true

message_display_mode = if_wd_window=>co_msg_display_mode_none

close_button = abap_true

button_kind = if_wd_window=>co_buttons_close

message_type = if_wd_window=>co_msg_type_none

default_button = if_wd_window=>co_button_close

).

lo_window->subscribe_to_button_event(

button = if_wd_window=>co_button_close

action_name = 'PPV_CLOSE'

action_view = mo_view_controller

is_default_button = abap_true ).

lo_window->open( ).

Former Member replied

Hello Laszlo,

The "having to click a second time" problem is one side effect of the technical constraint. Integrating interactive forms in Web Dynpro is quite a complex matter, because the world inside of the Adobe Reader needs to be kept in synch with the outside one. Popups add an extra level of complexity to it. Popups in a portal environment add even more, because there the popup is no longer part of the Web Dynpro iView, but hosted by the portal. Things can get really messy then. Just to provide you with an example: I have personally experienced Internet Explorer to behave strangly by using the wrong window pointer in some situations resulting in javascript errors. We (as the WD team) have always been trying to find workaround for such problems, but that's neither an easy task nor can the solution be expected to have the stability customers demand from SAP. Hence, the decision was made to limit the usage of so called active component based ui element, such as InteractiveForm to the main window. As in your example, the side effects cannot always be clearly attributed to the InteractiveForm, but if you remove it, you will see that the popup can be closed without problems.

There are a number of alternate solutions to your problem.

(a) display it inside of the main window i.e. in some kind of review step

(b) display it inside of an external window

(c) transfer it directly to the user using attach_file_to_response

(d) don't make it interactive (enabled=false) => not officially supported in a popup as well, but confirmed to work by one of our customers - you might probably want to take the risk

Best regards,

Thomas

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question