Skip to Content

Throw POPUP TO CONFIRM and interrup execution

Hi gyus, another challenge for community!

I've a button to do some actions but I want to show a confirmation popup before. If user clicks button Yes the execution should go on, but if user clicks No the execution should be interrupted.

An example:

ONACTIONSAVE

  • Throw popup

  • If YES

  • save_data()

  • else.

  • stop.

  • endif.

Thanks

Edited by: vanbelal on Mar 26, 2010 12:42 PM

Edited by: vanbelal on Mar 26, 2010 12:43 PM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 26, 2010 at 12:59 PM

    Hi,

    here is your clue:

    a) create a popup in your action method onactionsave by using method of if_wd_window_manager "create_popup_to_confirm"

    of type OK, CANCEL.

    b) then create event handlers for OK, Cancel by using method of subscribe_to_button_event of interface if_Wd_window, you will get window referecne as returning param as a result of the pop up created in first step.

    Write only this much of code in this method.

    Now in the event handler method if OK write all you code for save.

    for cancel dont write any code.

    This is it.

    Hope this helps

    Regards

    Manas Dua

    Add comment
    10|10000 characters needed characters exceeded

    • Hi again,

      I want to show a window with an input field and a button to save the value on a variable.

      The problem is I can't interrup general flow execution until user press the button 'Ok' for example.

      I can't do that with CREATE_POPUP_TO_CONFIRM method, and if I use CREATE_WINDOW the execution doesn't stop.

      An example step by step that I want to do:

      1) User press button 'Reject'

      2) Throw confirm popup Yes, No (on YES event I have implemented source code to do the changes)

      3) If Yes => I have to show another kind of popup asking for a value 'Reason for rejection' input field and 'Save' button or similar.

      4) Continue flow of 'Reject' button

      Thank you guys!

  • Apr 06, 2010 at 09:01 AM

    Reopened question for new requirements.

    Thank you

    Edited by: vanbelal on Apr 6, 2010 11:04 AM

    Add comment
    10|10000 characters needed characters exceeded