cancel
Showing results for 
Search instead for 
Did you mean: 

Approve Requisitions Extension Issue | Controller Extension not working

karanbahl
Active Participant
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

mike_moram3
Explorer
0 Kudos

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.

karanbahl
Active Participant
0 Kudos

Hi Mike,

Can you share the screenshot of the same?

Regards,

Karan

mike_moram3
Explorer
0 Kudos

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

karanbahl
Active Participant
0 Kudos

Hi Mike,

No this issue stands unresolved till now. On another client, another system this issue wasn't occuring.

Regards,

Karan

karanbahl
Active Participant
0 Kudos

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

former_member182874
Active Contributor
0 Kudos

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

karanbahl
Active Participant
0 Kudos

Hi Tejas,

I have already tried Web IDE as the second approach, but still no luck. Still the controller doesnt load. Any idea what could be missing?

Regards,

Karan