cancel
Showing results for 
Search instead for 
Did you mean: 

Approve Leave Requests (Cancel button problem)

hakan_danaci
Explorer
0 Kudos

Hi,

We're using Approve Leave Requests (Version 1) in Fiori.

When we press cancel button in approve dialog, busy dialog is opening. My problem is that busy dialog does not closed.

Our component's support package for this application

Back-End/Front-End Server

Back-End/Front-End Component

Technical Name of Software Component

Support Package Level

Back-end server

Back-end component

GBHCM003 600

12

Front-end server

Front-end component

UIX01HCM 100

7

1) Press cancel button

2) After cancel button

Accepted Solutions (0)

Answers (2)

Answers (2)

agentry_src
Active Contributor
0 Kudos

Discussion successfully moved from SAPUI5 Developer Center to SAP Fiori

as the more appropriate community for this topic.

Regards, Mike (Moderator)

SAP Technology RIG

jamie_cawley
Advisor
Advisor
0 Kudos

Did you check the browser console for errors?  Your message should be in the Fiori space, I requested it to be moved.

Regards,

Jamie

SAP - Technology RIG

hakan_danaci
Explorer
0 Kudos

Hi Jamie,

After I pressed button, there is no error in browser console.

jamie_cawley
Advisor
Advisor
0 Kudos

Open the network tab prior to choosing cancel and check if a call is being made to the backend when you press it.

Regards,

Jamie

SAP - Technology RIG

hakan_danaci
Explorer
0 Kudos

I opened network tab, then press cancel button. But no change in network tab.

I looked application code in front-end server. When I press button, _handleApprove function is called.

Then _handleApproveRejectExecute is called. In this function busy dialog open but there is no closed method for busy dialog in this function.


I search note, but i did not find anything.

************************************************************************************************

    _handleApprove: function() {

         "use strict";
         var oDataObj = this.oView.getModel().getProperty(this.oView.getBindingContext().getPath()),
             bApprove = true,
             fnClose = function(oResult) {
                 this._handleApproveRejectExecute(oResult, bApprove, oDataObj);
             },

     }

    _handleApproveRejectExecute: function(oResult, bApprove, oDataObj) {

         "use strict";
         this.oBusyDialog.open();
         sap.ui.getCore().lock();
         if (oResult.isConfirmed) {

             var oEntry = {}, sDecision, sURL;

             if (oResult.sNote) {
                 oEntry.Comment = oResult.sNote;
             } else {
                 oEntry.Comment = "";
             }

             oEntry.RequestId = oDataObj.RequestId;
             oEntry.Version = oDataObj.Version;

             if (bApprove) {
                 sDecision = "PREPARE_APPROVE";
                 this.sTextKey = "dialog.success.approve";
             } else {
                 sDecision = "PREPARE_REJECT";
                 this.sTextKey = "dialog.success.reject";
             }

             oEntry.Decision = sDecision;
             oEntry.SAP__Origin = oDataObj.SAP__Origin;

             sURL = "ApplyLeaveRequestDecision?SAP__Origin='" + oDataObj.SAP__Origin + "'&RequestId='" + oDataObj.RequestId + "'&Version=" + oDataObj.Version + "&Comment='" + oResult.sNote + "'&Decision='" + sDecision + "'";

             this.oDataModel.setRefreshAfterChange(false);
            
             this.oDataModel.create(sURL, oEntry, null, jQuery.proxy(this._handleApproveRejectSuccess, this), jQuery.proxy(this._handleApproveRejectFailure, this));
         }
     },

*********************************************************************************************************

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Hakan,

If it is new implementation, please use version 2.

UIX01HCM SP08 is available.

What is the SAPUI5 library version?


Regards,

Masa / SAP Technology RIG

hakan_danaci
Explorer
0 Kudos

Hi Masa,

We can not use version 2, because our back-end system is EHP5.

Our SAUI5 library version is 1.32.1.

We could not see UIX01HCM SP08 in SAP software download center.

Latest version is SP07.

Best regards,

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Hakan,

Please check the version 2. Ehp5 is listed.

https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detail/Apps('F1315')

Regards,

Masa / SAP Technology RIG

hakan_danaci
Explorer
0 Kudos

Thank you Masa, we try to implement version 2.

But if we find problem for version 1, it solves our problem fastly.

Do you have an idea when UIX01HCM SP08 is released?

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Hakan,

SP08 was wrong info in the app reference library. SP07 is the latest.

Regards,

Masa / SAP Technology RIG