cancel
Showing results for 
Search instead for 
Did you mean: 

Approve Travel Expenses - Removing forward button

0 Kudos

Hello experts,

We are implementing some customized apps of SAP Fiori like Approve Purchase Orders, Approve Purchase Requisition and Approve Travel Expenses and we are asked if we could remove the “Forward” button of this apps. I know the Purchase apps this can be done, but, for the Travel Expenses app the documentation says:

My first question: It’s possible to achieve this on this app?

Assuming that i can, i started to do some coding on WEB IDE to achieve that, but my implementation isn’t working:

I`ve extended S3.view with an extHookOnDateRequest:

sap.ui.controller("travel.expense.approve.ZFIN_TE_APV.view.S3Custom", {

oHeaderFooterOptions : {

oPositiveAction: {

      sI18nBtnTxt: "Aprova", //this.resourceBundle.getText("XBUT_APPROVE"),

      id :"btn_approve",

      onBtnPressed: jQuery.proxy(this.handleApprove, this)

},

oNegativeAction: {

      sI18nBtnTxt: "Rejeita", //this.resourceBundle.getText("XBUT_REJECT"),

      id :"btn_reject",

      onBtnPressed: jQuery.proxy(this.handleReject, this)

},

bSuppressBookmarkButton : false 

},

//set the initial options

onInit: function () {

this.setHeaderFooterOptions(this.oHeaderFooterOptions);

}

  });

I tried many variation of this code but couldn’t achieve the changes on footer (On debugger, no errors related), am I missing something in this customization?

Also comented this.resourceBundle.getText because I getting a syntax error about an misunderstand of command getText.

Do you have idea if and how we can get this done?

Thank you!!!

Best regards,

Bruno Serrão

Accepted Solutions (1)

Accepted Solutions (1)

younghwan_kim
Active Participant
0 Kudos

Hi Bruno.

Standard fiori getHeaderFooterOptions has already defined forward button,

and you can add some buttons by implementing Additionabuttons.

But you have to delete teh forward button,

just copy the whole getHeaderFooterOptions from the standard source to your extension,

then comment out the forward button.

0 Kudos

Hi Young,

Thank you very much! Your solution works fine!

Just to clarify some steps:

1- I have to extend S3 screen copying original code (On WEB IDE, don't select any hooks, just click with right button on it and extend);

2- Comment the lines of function setFooter:

I'm marking as answered and closing the thread.

Thanks all!

Regards,

Bruno Serrao.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Bruno,

I think you might have better luck if you remove the button from the view, not using JS to remove or suppress the button.

Look in the XML file for:

<footer>

  <Toolbar>



Remove the appropriate <Button> tags and the button will not be available.


Regards,

Andy

0 Kudos

Hi Andy,

Thank you for your reply. I opened the S3.view.xml and S2.view.xml but the footer tags are like these:

Do you have any coding example of button remove tags to test on this spots?

Regards,

Bruno Serrao.