cancel
Showing results for 
Search instead for 
Did you mean: 

Window closing after frist click on close

Former Member
0 Kudos

Hi

I have created a new window.


  wd_this->mo_help_window = lo_window_manager->create_window(
                     window_name          = 'W_HELP'
                     message_display_mode   = if_wd_window=>co_msg_display_mode_selected
                     close_button           = abap_false
                     button_kind            = if_wd_window=>co_buttons_close
                     message_type           = if_wd_window=>co_msg_type_none
                     ).

  wd_this->mo_help_window->subscribe_to_button_event(
               button            = if_wd_window=>co_button_close
               action_name       = 'CLOSE_PDF'
               action_view       = lo_view_controller
               is_default_button = abap_true ).

The window is not closing after first click on close button. Where is my mistake?

Best regards,

Marcus

Accepted Solutions (1)

Accepted Solutions (1)

mohammed_anzys
Contributor
0 Kudos

Hi

close_button = abap_false

should be abap_true right?

Thanks

Anzy

Former Member
0 Kudos

Hi,

no close_button = abap_false is right .

As far as I know close_button is only the 'X' .

Thanks

Marcus

Answers (2)

Answers (2)

Former Member
0 Kudos

If set enabled = false on propertiy of ROOTUIELEMENTCONTAINER of the view, it works perfect.

The properties of property of the Interactive Form makes no differenz.

Yashpal
Active Contributor
0 Kudos

Hi,

as with the close button u have subscribe a event handler ... name 'close_pdf ' .so in that method close the window using wd_this->mo_help_window->close( ).

Hope it will solve ur problem.

Regards

Yashpal

Former Member
0 Kudos

Hi,

I already implemented the Method


METHOD onactionclose_pdf .
  wd_this->mo_help_window->close( ).
ENDMETHOD.

Best Regards

Marcus

Message was edited by:

Marcus Schug

Former Member
0 Kudos

Hi Marcus,

I just hope that you have subscribed to the event before opening the popup window.

Regards,

Neha

<i><b>PS: Reward if helpful</b></i>

Former Member
0 Kudos

Hi Neha,

yes I did. The window will be closed after the second click on the button.

Regards Marcus

Former Member
0 Kudos

Hi Marcus,

It can be that the popup is losing focus because of some reason. Do you have anything clickable on the popup? U can try adding a test button which displays some text when clicked. Does it behave in the same way?

Regards,

Neha

Former Member
0 Kudos

Hi Neha,

in the window is only an interactive form to show a pdf.

You can see "please wait" , after the first click.

Best regards

Marcus

Message was edited by:

Marcus Schug