You can extend the Average Items Per Transaction
app according to your business needs for different aspects. For this purpose, the following extensibility options are available:
You can remove KPI tiles or add additional ones to the header level of a view.
You can add custom filters to a view.
You can hide existing buttons or add additional ones to the header and footer sections of a view.
You can hide existing columns or add additional ones to a table.
You can hide existing measures or add additional ones to a chart.
You can add custom controls to views.
You can change the number of products to display on the Top
and Bottom
filter tabs.
Note
You can extend many SAP Fiori apps by implementing extension elements that are located in the app files only. For this app however, in addition to extension points and hooks provided in the app, you may also need to implement some extension elements in the app’s library. It is also important to note that even though the KPI apps share a common library, implementing an extension element in the library for use in one app, does not make the same extensibility feature available for any other app that shares the library. In that case, the extension element must be implemented again for the shared library in every subsequent app that requires it.
The following section provides a description of extensibility scenarios that can be achieved using UI controller hooks. For some of these, you may need to implement several hooks, or other extensibility entities in addition to hooks, to fully implement the extension feature. For example, to add a column to a table in the initial view, you need to implement one hook to extend the table and another one to fetch data to display in the new column. Additionally, some controller hooks are located in different development packages and must be implemented in those packages to fully activate the intended extensibility. Details are provided with each extensibility feature where this is the case.
To plug in and execute custom code, the following hooks are available in the controller code.
For more information about UI controller hooks, see
.You can add additional KPI tiles or hide existing tiles in the header bar of the Average Items Per Transaction
views. To fully implement this extensibility option, you must implement each of the following extensibility entities on the specified software layers according to your specific business needs:
To add additional KPI tiles to header bar
Implement all extension hooks under controller fullScreen.controller.js
described in the table in this section to provide the framework in which the new KPI data is contained.
Implement the extension hook under controller main.controller.js
described in the table in this section to extract data from the data source to render the new KPIs.
Note
To fully implement extensibility using this hook, you must also extend the NumberOfSalesItemsPerTransactionHdrQuery
entity in OData service MCSAServices
.
To remove existing KPI tiles from the header bar
Implement extension hook extHookOnInitAddCustomTiles
under controller fullScreen.controller.js
described in the table in this section to remove a KPI tile from the header bar.
Controller | Hook | Use |
---|---|---|
In package
|
| Allows you to define additional KPI tiles or remove existing ones from the header bar in views when the |
| Updates additional KPI tiles defined in the header section when views are rendered | |
| Wipes out controls for the additional KPI tiles defined in the header upon exit from the | |
In package
|
| Allows you to define the OData query results fields for the new KPI tiles |
You can add custom filters to views in the Average Items Per Transaction
application.
To fully implement this extensibility option, you must implement each of the following extensibility entities on the specified software layers according to your specific business needs:
Implement any of the extension hooks under controller headerFilter.controller.js
described in the table in this section according to your desired level of filtering. For example, you can add a new filter to the order channel view but not to any of the other views. You can set filters on all levels, or on any subset of levels you need.
Implement the extension hook under controller Main.controller.js
described in the table in this section. This updates the filter list as the application reads data from the data source.
Note
The filters must exist in the data source.
Controller | Hook | Use |
---|---|---|
In package
|
| Allows you to define OData query fields in the filter list content for the new filters, and define functions required to create the filters in the query |
In package
|
| Adds the custom filters to the order channel view when the initial view is loaded |
| Updates custom filters when the order channel view is rendered during navigation to or from this view | |
| Updates custom filters when the store view is rendered during navigation to or from this view | |
| Updates custom filters when the city view is rendered during navigation to or from this view | |
| Updates custom filters when the region view is rendered during navigation to or from this view | |
| Updates custom filters when the country view is rendered during navigation to or from this view | |
| Updates custom filters when the category view is rendered during navigation to or from this view | |
(Optional) | Adds data retrieved for a custom filter into the corresponding control of the view |
You can hide existing buttons or add additional buttons in the header or footer sections of views in the Average Items Per Transaction
application.
To fully implement this extensibility option, you must implement the following extensibility entity on the specified software layers according to your specific business needs.
Controller | Hook | Use |
---|---|---|
In package
|
| Allows you to hide existing buttons or add additional ones to the header or footer section in views. For example, you can hide the |
This section describes the extensibility entities you can use to hide existing columns, or to add additional columns to a table in the initial view of the Average Items Per Transaction
application. To hide columns or add additional columns to tables in detail views, see To hide columns or add additional ones to a table in the detail view
at the end of this section.
To fully implement this extensibility option, you must implement each of the following extensibility entities on the specified software layers according to your specific business needs:
To hide columns in a table
Implement the UI controls in view detailTable.view.xml
as described in section Display of UI Controls
.
To add additional columns to a table
Implement the extension points in detailTable.view.xml
.
For details, see the Extension Points
section in this document.
Implement extension hooks under controller detailTable.controller.js
described in the table in this section according to your requirements. These are optional.
Implement extension hooks under controller Main.controller.js
described in the table in this section to extract data from the data source to render in the new columns. This is mandatory.
Note
To fully implement extensibility using this hook, you must also update the HANA query entity in the OData service MCSAServices
and the HANA view corresponding to the drill-down view in the Fiori app. This allows data to be provided to the new table column. For example, for the order channel level view in the Fiori app, the corresponding HANA query view would be NumberOfSalesItemsPerTransactionByOC
.
Controller | Hook | Use |
---|---|---|
In package
|
| Initializes new content in the table |
| Updates content in the table upon navigation from one level to another | |
In package
|
| Allows you to redefine the OData query results fields used for the new columns. |
To hide columns or add additional ones to a table in the detail view
You can hide columns or add additional columns to tables at the detail level in the Average Items Per Transaction
application.
To fully implement this extensibility option, you must implement the extension hook under controller Main.controller.js
described in the table in this section to either hide columns in a table or to extract data to render in the new columns. This is mandatory.
Note
To fully implement extensibility using this hook, you must also update the HANA query entity in the OData service MCSAServices
and the HANA view corresponding to the drill-down view in the Fiori application. This allows data to be provided in the new table column. For example, the corresponding HANA query entity for the detail level view in the Fiori app is NumberOfSalesItemsPerTransactionItemOverview
.
Controller | Hook | Use |
---|---|---|
In package
|
|
|
In package
|
|
|
You can hide measures or add additional measures to charts in the Average Items Per Transaction
application views.
Implement extension hooks under controller detailChart.controller.js
described in the table in this section according to your requirements. These hooks allow you to either hide existing measures, or to add new measures to the chart.
Implement the extension hooks under controller Main.controller.js
described in the table in this section to extract data from the data sources and render it in the new measures. This is mandatory for adding new measures to a chart.
Note
To fully implement extensibility using this hook, you must also update the HANA query entity in the OData service MCSAServices
and the HANA view corresponding to the drill-down view in the Fiori app. This provides data to the new measures. For example, for the order channel level view in the Fiori app, the corresponding HANA query view is NumberOfSalesItemsPerTransactionByOC
.
Controller | Hook | Use |
---|---|---|
In package
|
| Allows you to add new measures or hide existing measures in the chart |
| Updates content in the chart upon navigation from one view to another | |
In package
|
| Allows you to define the OData query results fields used for the new measures |
To fully implement this extensibility option, you must implement each of the following extensibility entities on the specified software layers according to your specific business needs:
You can add custom controls to the Average Items Per Transaction
application views.
Implement extension point layout_addCustomControl
as required for the view level. For details, see Extension Points
section.
Implement extension hooks under controller layout.controller.js
described in the table in this section according to your requirements.
Implement the extension hooks under controller main.controller.js
described in the table in this section. This allows you to define the queries and fields to extract data for the new controls. This is mandatory.
Controller | Hook | Use |
---|---|---|
In package
|
| Allows you to define actions for new controls to occur when the views are loaded |
| Performs defined actions on new controls upon navigation from one view to another | |
In package
|
| Allows you to define data to extract from HANA views for the controls |
You can change the number of products to display on the Top
and Bottom
filter tabs from the default of 20 to another value in the Average Items Per Transaction
views.
To fully implement this extensibility option, you must implement the following extensibility entity on the specified software layer according to your specific business needs:
Controller | Hook | Use |
---|---|---|
In package
|
| Allows you to change the number of products to display on the |
The following extensibility options are designed for use along with specific UI controller hooks, or other extensibility entities. They are not designed to be used independently of those hooks. Refer to the extension hook referenced for each extensibility entity for information on all the elements required to implement that particular extensibility option.
View | Extension Point | Use |
---|---|---|
Add custom controls to initial and detail views To fully implement this extensibility option, this extension point is used in conjunction with controller hooks described in the | ||
In package
|
| Allows you to add new custom controls to the initial and detail views in the application |
Add additional columns to a table in initial view To fully implement this extensibility option, this extension point is used in conjunction with controller hooks described in the | ||
In package
|
| Allows you to add new columns to a table in the initial view |
| Allows you to link new columns in a table in the initial view to a data model so that data can be provided to the new column |
For more information about extension points, see
.The following UI controls can be hidden on the app UI:
View | Control ID | Use |
---|---|---|
Hide UI controls in a view | ||
In package
|
| Allows you to hide the breadcrumbs toolbar in a view |
| Allows you to hide the filter list in a view | |
| Allows you to hide the header tiles in a view | |
| Allows you to hide the toolbar for charts and tables in a view | |
| Allows you to hide the charts or tables in a view | |
Hide columns in a table in initial view | ||
In package |
| Allows you to hide the |
| Allows you to hide the | |
| Allows you to hide the |
For more information about hiding UI controls, see
.This app does not use any BAdIs for extensibility.
This app does not use any extension includes for extensibility.
For a general description of the extensibility options and procedures of Fiori apps, see
.