cancel
Showing results for 
Search instead for 
Did you mean: 

popup after process

juanluis_ragel
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member188685
Active Contributor
0 Kudos

First Don't place any test messages here..use Test and Playground forum if you want.

I saw the same in ABAP general forum.

use confirm functon of javascript to display the confrimation popup.

juanluis_ragel
Participant
0 Kudos

Sorry for test thread because I had a problem post and I don't know How I can delete.

I can't post xhtmlb code oof my layout here on forums

Can you give me an example of confirmation function?

lot of thanks

former_member188685
Active Contributor
0 Kudos

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 >

juanluis_ragel
Participant
0 Kudos

a lot of thanks and sorry again for the inconvenience

former_member188685
Active Contributor
0 Kudos

welcome and please follow the rules from now.

Best Regards

Vijay

Answers (0)