Skip to Content

Can't see footer button code but it is visible while running apps

Hi Experts,

I have Purchase requisition approval and GRC approval apps are running properly. I have to hide one button in the footer bar. I have downloaded apps but could not see those button code in the footer bar. Am I doing anything wrong?

Then how it is visible in the application. Your help will be really appreciated.

BR,

RK

Add comment
10|10000 characters needed characters exceeded

  • Hi ram,

    You will need to override the onInit Method in your extension fro GRC App.

    You just need to add the variable bSuppressBookmarkButton : true after the buttonlist array to the existing onInit() method code to hide the button.

    Thanks,

    Vaibhav Maheshwari

  • Thanks Vaibhav for your kind response.

    You mean I have to add suppress button code in extension project but in the extension project onInit function is commented out. Do I need to uncomment and add PR approval code inside init function and comment out rest unused codes?

    Please clarify.

    BR,

    RK

  • hi Ram,

    I am not very sure on this once.

    Try un-comment the init code. Don't paste the PR approval code because the buttons used in both the apps are different.

    In the existing code, just add the bSuppressBookmarkButton : true to the Json which is being set other buttons.

    You code should look something like this after the change

    onInit: function () {
    sap.ca.scfld.md.controller.BaseDetailController.prototype.onInit.call(this);
    var l = this;
    var o = {
    sI18NDetailTitle: "ACCESS_REQUEST_LBL",
    oPositiveAction: {
    sId: "Submit",
    sI18nBtnTxt: "SUBMIT_BTN",
    onBtnPressed: function (e) {
    l.doSubmit();
    }
    },
    oNegativeAction: {
    sId: "Forward",
    sI18nBtnTxt: "FORWARD_TEXT",
    onBtnPressed: function (e) {
    l.handleForward(e);
    }
    },
    bSuppressBookmarkButton : true,
    onBack: jQuery.proxy(function () {
    this.oRouter.navTo("master", {}, false);
    }, this),

    Thanks,

    Vaibhav Maheshwari

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 07 at 06:25 AM

    Hi Ram,

    Check your S3.Controller.js for the app.

    You shoud have the button declared there.

    var l = {
    oPositiveAction: {
    sI18nBtnTxt: t.resourceBundle.getText("XBUT_APPROVE"),
    onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['approve'])
    },
    oNegativeAction: {
    sI18nBtnTxt: t.resourceBundle.getText("XBUT_REJECT"),
    onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['reject'])
    },
    
    // Additional Buttons  // Comment if not required
    buttonList: [{
    sId: "btn_Forward",
    sI18nBtnTxt: "XBUT_FORWARD",
    onBtnPressed: jQuery.proxy(this.handleForward, t)
    }],
    onBack: jQuery.proxy(function () {
    if (sap.ui.Device.system.phone) {
    window.history.go(-1)
    }
    }, this)

    Extend the controller and comment the code for the buttons you don't need.

    Thanks,

    Vaibhav Maheshwari

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Ram,

      Just add the code in the button list array for FORWARD Button as shown below :

      buttonList: [{
      sId: "btn_Forward",
      sI18nBtnTxt: "XBUT_FORWARD",
      onBtnPressed: jQuery.proxy(this.handleForward, t)
      }]
      Your extension method code would look like this after the change .
      
      extHookSetHeaderFooterOptions: function(l) {
      var t = this;
      var l = {
      oPositiveAction: {
      sI18nBtnTxt: t.resourceBundle.getText("XBUT_APPROVE"),
      onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['approve'])
      },
      oNegativeAction: {
      sI18nBtnTxt: t.resourceBundle.getText("XBUT_REJECT"),
      onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['reject'])
      },
      buttonList: [{
      sId: "btn_Forward",
      sI18nBtnTxt: "XBUT_FORWARD",
      onBtnPressed: jQuery.proxy(this.handleForward, t)
      }],
      bSuppressBookmarkButton : true;
      onBack: jQuery.proxy(function () {
      if (sap.ui.Device.system.phone) {
      window.history.go(-1)
      }
      }, this)
      };
      if (this.extHookChangeFooterButtons) {
      l = this.extHookChangeFooterButtons(l)
      }
      this.setHeaderFooterOptions(l)
      
        }

      Thanks,

      Vaibhav Maheshwari

  • Jan 05 at 09:54 AM

    Hi ram mishra, without the source code it's really difficult to answer your question.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 07 at 05:49 AM

    Check in the controller - most probably there will be function in the controller where footer buttons could be added.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 07 at 06:17 AM

    hi Ram,

    It would be very difficult to answer your query without looking at the source code, unless someone has encountered the same issue.

    Can you share your view and controller code ?

    If possible , can you upload the project to Github ?

    Thanks,

    Vaibhav Maheshwari

    Add comment
    10|10000 characters needed characters exceeded