Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: Extending the My Travel and Expense app (TRV_TE_CRE) - Hide 'Add Cost Assignment' Button

$
0
0

Hi Guys,

 

I got to solve it using a kind of manually fragment extension.

 

I copied the fragment from the standard project and pasted it to the extension project, renaming it with the "Custom" termination (from "S4.fragment.xml" to "S4Custom.fragment.xml").

 

Screen Shot 2016-08-27 at 7.03.29 PM.png

 

After that, I changed the reference for this fragment at the S4Custom.controller.js, at point of fragment initialization (method handleRouteMatched, line 182, from "mytravelandexpense.view.S4" to "mytravelandexpense.TRV_TE_CREExtension.view.S4Custom"), like the source code below:

 

Screen Shot 2016-08-27 at 6.56.57 PM.png

 

Finally, I commented the "Add Cost Assignment" button source code on S4Custom.fragment.xml:

 

Screen Shot 2016-08-27 at 7.09.02 PM.png

 

So it worked and the button is not being shown anymore:

 

Screen Shot 2016-08-27 at 7.38.35 PM.png

 

As the SAP Web IDE don't provide the fragment extension wizard (as it is provided for view and controller), I think this way we work with fragment extension.

 

 

Regards,

 

Jairo Canuto


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>