Skip to Content

Approve Requisitions Extension Issue | Controller Extension not working

Hi all,

I am working on a requirement to hide the standard Forward button on the Approve Requisitions application. I have tried 2 approaches

1. Using Eclipse Juno and SAP Fiori Toolkit: I have been able to successfully extend the views and add custom fields. For hiding the Forward button, I have written the following code in the controller extension:

extHookSetHeaderFooterOptions: function(l) {

// // Place your hook implementation code here

var t = this;

var l = {

oPositiveAction: {

sI18nBtnTxt: t.resourceBundle.getText("XBUT_APPROVE"),

onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, )

},

oNegativeAction: ,

onBack: jQuery.proxy(function() {

if (sap.ui.Device.system.phone) {

window.history.go(-1)

}

}, this)

};

// if (this.extHookSetHeaderFooterOptions) {

// l = this.extHookSetHeaderFooterOptions(l)

// }

this.setHeaderFooterOptions(l)

}

});

However, this code is not working and when I observe the Network Tab in the Console, I do not see the S3Custom Controller load, although I do see the S2Custom and S3Custom Views being loaded in the Network Tab.

2. I have also tried the local Web IDE approach, using the same code but havent succeeded. Any idea what could be the problem for the controller not getting loaded.

I tried putting alerts as well, but seems since the controller is not getting loaded I get no alerts.

Regards,

Karan

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Jul 04, 2015 at 05:59 AM

    Hi Karan,

    SAP Fiori toolkit is deprecated. Kindly use SAP WEBIDE for hiding or custimizing the app.

    Check here on Ui hooks, where you have to write logic for footer options is given :

    App Extensibility: Approve Requisitions - SAP Fiori Apps - SAP Library

    Regards,

    Tejas

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 06, 2015 at 10:05 AM

    Hi all,

    Any idea, why the controller doesn't load? Usually I get the view and custom controller as below in network tab

    But in my case the controller is not loading. In the same project, view extensions and replacements are working fine. Would request the experts to share the possible reason and solution.

    Please note it is happening for both Web IDE and SAP fiori toolkit.

    Regards,

    Karan


    networktab.png (16.4 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • Aug 27, 2015 at 07:54 PM

    Hello,

    Was there a resolution to this issue? I am seeing the exact same thing, S3Custom.controller.js does not even load. And, as mentioned above, view extensions are working no problem within the same project. I have double and triple check the naming prefixes in Component.js and cannot see why the controller extension does not even load.

    Regards,

    Mike

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 28, 2015 at 09:48 PM

    Resolved. Approve PR has to S3 controllers, one is for PR header level release and the other is for PR item level release. I was extending the wrong controller based on the backend config of the type of PR release.

    Add comment
    10|10000 characters needed characters exceeded