cancel
Showing results for 
Search instead for 
Did you mean: 

Confirmation popup in webdynpro

ankit_30
Explorer
0 Kudos

Hi,

How to display a confirmation popup without creating a separate window and view.

For example: I want to delete an entry. So when I click on the delete button, a popup should appear for confirming the delete action.

How to achieve this without creating a separate window.

Thanks in advance.

Regards,

Ankit

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ankit,

You can create a popup window for the same. Create a popup window using the below method:

CREATE_POPUP_TO_CONFIRM method of the interface IF_WD_WINDOW_MANAGER.

You can also add action to the popup screen buttons.

Regards,

Sanjeev Kotwal.

Former Member
0 Kudos

Hi Ankit,

Go to the code wizard,

choose General ,

go down and select Generate popup and provide the component use and window name.

now edit the texts as per your requirement.

Thanks

Shony KJ

former_member210804
Active Participant
0 Kudos

Dear Ankit,

Call the same window which you have been used for displaying the view( s ). It works fine.

lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
ls_string = 'Are you sure you want to delete the record?'.
append ls_string to lt_string.

CALL METHOD lo_window_manager->create_popup_to_confirm
   EXPORTING
     text                 = lt_string
     button_kind          = 4
*    message_type         =
*    close_button         = ABAP_TRUE
*    window_title         =
     window_left_position = '3'
     window_top_position  = '3'
     window_position      = '10'
     window_width         = '50'
     window_height        = '50'
*    default_button       =
   RECEIVING
     RESULT               = lo_window
     .

  lo_window->open( ).