on 09-28-2015 4:13 PM
Hello,
We are extending the My Travel and Expense application (TRV_TE_CRE) to:
(1) Hide the “Add Cost Assignment” button, and
(2) Make the whole “Cost Assignment” area display only. (see screenshot - in red)
From what we can tell, the form is located within the S4 View that loads up the Page “S4DetailPage” using S4 Controller.
We are assuming that we have to do a controller extension on S4, but we can’t seem to get a handle on these controls to make them invisible\readonly?
Any help on this would be great.
Thank you,
Rob
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"😞
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:
Finally, I commented the "Add Cost Assignment" button source code on S4Custom.fragment.xml:
So it worked and the button is not being shown anymore:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
We have used view modification to make field invisible many times, but this application is built differently. These controls (example id: costAssignmentAddButton) is embedded within a page and a Fragment, so using a simple ‘Hide Control’ extension does not work.
In the S4 extension controller, we can’t seem to get any of these statements below to work. Seems like there is a Page S4DetailPage involved, and we don’t know how to get handle of these controls within the page.
Thanks,
Rob,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
try finding out the IDs of the controls and then use view modification for making fields invisible.
controller extension for read only fields.
Regards,
Sarbjeet Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.