https://www.evernote.com/shard/s505/sh/26951388-12c9-47af-94e2-1d729f02af79/d235685719c9808d
This post consists of three parts, their titles are pretty self-explanatory.
PART I. Create a New Extension Project in WebIDE
PART II. Create a View Extension
PART III. Create a Controller Extension
PART I. Create a New Extension Project in WebIDE
Go to https://rde-fiori.dispatcher.neo.ondemand.com/
Create a new Extension Project.
Select Remote -> SAPUI5 ABAP Repository.
Select application from SAPUI5 ABAP repository (GM6_https would be our target system, and CRM_OPPRTNTY would be our application to create extension upon).
Finish up.
Update the Component.js due to one of the existing bug discovered by Jerry Wang (url: “/sap/bc/ui5_ui5/sap/crm_opprtnty”), then run it.
Here’s our familiar Opportunity application.
The idea is to put all the custom extension code in this extension project, and leave the standard product code untouched. Once the extension project is completed, user shall update their Fiori launchpad, to make the extension project as the entry point of the target application.
PART II. Create a View Extension
Locate the ExtensionPoint in the view where you would like to extend, take opportunityItemExtension in the S2.view.xml for example.
Update the extension project Component.js, add the extension information into the customizing property.
Create our extension view.
Write our extension code, we’re essentially replacing the origin list item, in order to add a new object attribute.
Run the extension project again, you will see the extended view ?
PART III. Create a Controller Extension
Same as the view extension, we’ll first locate the hook in the controller, take extHookExtendProductEntryOnAdd in the S5.controller.js for example.
Then, update the extension project Component.js with the controller extensions property.
Lastly, create and write our controller extension code.
Run it, bingo, when the product added, we’ll get the product name and alert it out.