on 11-29-2008 2:16 PM
Hi All,
I am using dynpage technology to create a portal application.
My requirement is, I need to have a confirmation window with OK & CANCEL. button on it. I have created it using javascript.
If ok is clicked, the bapi should be executed. How to do this?
stringBuffer strBuf = new stringBuffer();
strBuf.append("winopen = confirm("\do you want to continue?"\));
The above code opens a confirm window, with message 'do you want to continue?'. If you click ok, this window will return true value and it is assigned to winopen variable in the above code. if this window returns true, we can execute the bapi.
Now how to call the bapi execution code inside java script or Is there any other way wherein we can use this winopen variable which holds true value outside the javascript, so that we can execute the bapi?
Please suggest. Hope I am clear.
Thanks in Advance.
Regards,
Subashini.
Hi Subashini,
Better not try an use javascript while using WebDynpro. You never know what SAP will allow in future versions, it may or may not work.
Try the following.
Create 2 eventhandlers in your view (under methods).
onActionOk
onActionCancel
And where you want to open a confirmation dialog:
-
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager()
.createConfirmationWindow("Are you sure? ",controllerInfo.findInEventHandlers("onActionOk"),"yes");
dialog.addChoice(controllerInfo.findInEventHandlers("onActionCancel"), "no");
dialog.show();
-
Now in the eventhandlers you can program you BAPI call.
Jeschael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.