cancel
Showing results for 
Search instead for 
Did you mean: 

How to program the close button in upper-right hand side in CREATE_POPUP_TO_CONFIRM window

Former Member
0 Kudos

Hi All, I have a web-dynpro where if a particular condition is met, I need to redirect the user forcefully to a different view after giving this information in a pop up message. so I used a CREATE_POPUP_TO_CONFIRM with only "OK" button. So far so good, user presses OK and I redirect him in the handler of "OK" button. But the pop up window has a close button in the upper hand side, if user presses the close button instead of "OK", he gets to stay on the same view, while I want to redirect him anyway. Any idea how to achieve this? Thanks .

Accepted Solutions (0)

Answers (2)

Answers (2)

ramakrishnappa
Active Contributor
0 Kudos

Hi Priya,

As you are saying, you need to redirect always, why cannot you just hide the close button. So that user do not have other option i.e. he/she can only click "OK" button.

Just pass parameter CLOSE_BUTTON = ABAP_FALSE while creating confirmation box.

i.e.  call method lo_window_manager->create_popup_to_confirm(

                              exporting

                                   text = 'xyzzzzzzzzzzzz'

                                   buton_kind = ....

                                   close_button = ABAP_FALSE

               receiving

                    result = lo_window )

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi,

You can use the IF_WD_WINDOW->SET_ON_CLOSE_ACTION method to register to the event of closing.

Best regards,

Gabor