You perform this procedure as a prerequisite to creating an extension in SAP Asset Strategy and Performance Management.
Procedure
Create a UI5 view for the extension.
To create a UI5 controller, follow these substeps:
Use the same name in the controller as you specified in the view file.
Ensure that the controller inherits an ExtensionBaseController. You can achieve this by following this example:
This enables your controller to access the following using controller instance variables:
The Object Page Controller (this._oParentController)
The Router of the application (this._oRouter)
The Event Bus (this._oEventBus)
The Object Page (this._ oObjectPage)
Application Component (this. _oComponent)
You can add event handlers and other required methods as per standards and conventions of UI5/openUI5.{ id:32-char Id, status: statusCode //("1" - Unpublished, "2" - Published, "3" - In revision), version: versionNumber }
To ensure that the added functionality works fine, wrap each function in a try-catch block. An example is shown here:
Make service calls in your custom sections through the AIN services. Use the following method to make the service call: