Skip to Content

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

popup after process

Hi experts!

I have a button on my my layout:




and do this "OnInputprocessing":

IF event->event_server_name = 'Delete_reservation' AND
     event->event_name = 'toolbarButton'.

      SELECT * FROM resb INTO w_resb WHERE rsnum = l_rsnum.

        resb_bapi-res_item = w_resb-rspos.
        resb_bapi-delete_ind = 'X'.
        APPEND resb_bapi TO it_resb.

        resb_bapix-res_item = w_resb-rspos.
        resb_bapix-delete_ind = 'X'.
        APPEND resb_bapix TO it_resbx.


      ENDSELECT.


      CALL FUNCTION 'BAPI_RESERVATION_CHANGE'
        EXPORTING
          reservation               = l_rsnum
        TABLES
          reservationitems_changed  = it_resb
          reservationitems_changedx = it_resbx
          return                    = it_return.



      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*       EXPORTING
*         WAIT          =
*       IMPORTING
*         RETURN        =
                .
      page->messages->add_message( EXPORTING
        condition = 'X'
        message = 'Reservation deleted'
        severity = page->messages->co_severity_error ).


    ENDIF.

AND I want that when user press button an popup windows appear with text "Are you sure?" and If user press "YES" do all process and If user press No cancel.

A lot of thanks in advance.

Best regards

Edited by: djlu on Oct 1, 2008 3:15 PM

Edited by: djlu on Oct 1, 2008 3:16 PM

Former Member
Former Member replied

you can do some thing like this...

< % @ p age lan gu age="abap" % >

< % @ e xt ens ion name="htmlb" prefix="ht m lb" % >

< h t m lb :con ten t design="design2003" >

< h t ml b:page title=" " >

< s c r i p t ty p e ="t e x t/ja v as crip t" >

f u nc t i o n te s t_c o n f i r m ( )

{

var r= c o n fi r m ("Do you want to continue");

if (r==true)

{

d oc u m ent.w rit e("Continue");

}

e l se

{

d o cu m en t.writ e("Cancel");

}

}

< /s c ri p t >

< ht m lb: fo rm >

< h tml b:textView text = "Hello World!"

design = "EMPHASIZED" / >

< h t m lb:button text = "Press Me"

o nC lie ntC lic k = " test_ confi r m() " / >

< / h tm lb:f o r m >

< / h t m lb:p ag e >

< / h tm l b:co n te n t >

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