Skip to Content

​How to keep control on web page while the code is executed at ECC end ?

Jun 28, 2017 at 05:40 AM


avatar image

Hi All,

I have a dialog box in my sap UI5 web page. When a user clicks on a button( say OK) in the dialog box, the control passes over to DPC class where some code execution takes place. It takes around 2-4 seconds for the code execution at ECC end.

Meanwhile, if the user again clicks on OK button, the other items in my screen are also executed. Is there a way, where clicking on the button is no longer possible until the execution at ECC end completes.

Kindly suggest.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
VIPLOVE KHUSHALANI Jun 28, 2017 at 08:42 AM

Hi Meenakshi Raina,

Put a busy indicator till the request is processed .



Show 4 Share
10 |10000 characters needed characters left characters exceeded


Thanks for the reply. Where should I use this indicator ?

var oButton9 = new sap.m.Button("Waive1", { text: "OK", press: [oController.Execution, oController] });


in the method ?

execute-button.png (23.5 kB)

If you still want to allow the user to make changes to the dialog, then you can use the setBusy() method on the button.

e.g. before you call the create on your oModel, call oEvent.getSource().setBusy(true);

Then in the success and error callback functions, use sap.ui.getCore().byId("Waive1").setBusy(false);

Or you can use the and sap.ui.core.BusyIndicator.hide() if you want to block the entire screen.



I have used busydialog in my create request on the oModel. But it is working only in debug mode, but not normally. Hence, in my create operation, I tried to set an asynchronous property as "true". Still the busydialog is not appearing. Can anyone please help me with it .

busydialog.png (24.3 kB)

Thanks. I used setTimeout(function() { } and now it is working properly

Thanks everyone for the support.

Jun Wu Jun 28, 2017 at 06:26 AM

disable the button when you make call to backend, enable it when the call is finished

10 |10000 characters needed characters left characters exceeded