Extensibility information for SAP Fiori app.
You can define your own filters for the overview list (S2 view), or change or delete existing filters.
You can change which information should be displayed for the individual tasks in the overview list, and in which form. For example, you can display a concrete date (Due on Oct. 13) instead of a relative date (Due in 4 days).
You can add your own fields on the detail page (S3 view). You need to have already defined these fields in the back end, in the data structure for tasks.
You can add or change/replace pushbuttons on the detail page.
You can change the standard values (defaults) for fields. For example, you can define that the due date is not prefilled with the current date, but instead with the date of the following day.
To define your own filters or change or delete existing filters, the following extensibility entities are available on the different layers. You have to extend each of these entities according to your specific business needs:
UI |
Back End/ABAP |
|||
---|---|---|---|---|
View |
Extension Point |
Design Time: Gateway Entity |
Design Time: Extension Include |
Run Time: Data Structure to Be Redefined |
S2.view.xml |
extListItem |
Task |
CRMS_TASK_ODATA_INCL |
CRMS_TASK_ODATA |
extFilterOptions |
||||
extS2Buttons |
||||
S3.view.xml |
extTaskDetailsTop |
Task |
CRMS_TASK_ODATA_INCL |
CRMS_TASK_ODATA |
extTaskDetailsBottom | ||||
extS3BeforeAttachments |
||||
extTaskDetailEnd |
||||
S4.view.xml |
extTaskOverview |
Task |
CRMS_TASK_ODATA_INCL |
CRMS_TASK_ODATA |
extBeforeAttachments |
||||
extTaskOverviewEnd |
||||
S4.view.xml |
extBeforeDocHistory |
DocumentHistory |
CRMT_ODATA_TASK_DOC_HIST_INCL |
CRMT_ODATA_TASK_DOC_HISTORY |
extDHExtraView |
||||
extDHLabelsStart |
||||
extDHLabelsEnd |
||||
extDHValuesStart |
||||
extDHValuesEnd |
In addition, you can change which filter is set as standard when the user navigates to the overview list using the following methods:
Controller |
Hook |
Use |
---|---|---|
S2.controller.js |
extHookGetDefaultFilterKey() |
Allows you to filter tasks by additional filter keys that you have provided when you select one of these new filter types. This is called when you change the Filter key. @return {string} |
S2.controller.js |
extHookApplyDefaultFilter() |
Allows you to add additional filter types to tasks by providing your logic in the Hook implementation. Tasks can be filtered by this additional filter type when you select one of these new types. This is called when you select the default filter type on Tasks. @return {void} |
S2.controller.js |
extHookHandleCustomFilter(sSelectedKey) |
Allows you to provide additional filter types and filter tasks by these new types when you select one of these new types. This is called when you select the Facet Filter button on the Footer bar. @return {void} @param {string} sSelectedKey |
S3.controller.js |
extHookGetCustomFields(oTask) |
Allows you to get additional fields to add to a task object. This is called when a task object is needed. @return {void} @param {object} oTask |
S3.controller.js |
extHookCheckUIValues(oReturn) |
Allows you to check the values of the additional fields of a task object. This is called while checking the UI values of a task object @return {void} @param {object} oReturn |
S3.controller.js |
extHookCancelCustomFields(oCancelTask) |
Allows you to negate the changes made to the additional fields of a task object. This is called when changes made to an existing task are cancelled. @return {void} @param {object} oCancelTask |
S3.controller.js |
extHookPrepareCustomFields(oNewTask) |
Allows you to manage the additional fields added to a task object. This is called when you select the Facet Filter button on the Footer bar. @return {void} @param {object} oNewTask |
S3.controller.js |
extHookGetS3AccountPhoto() |
Allows you to get the account photo of a task object. This is called when you select the help icon next to the account field of the task object. @return {boolean} |
S3.controller.js |
extHookCustomizeS3HFOptions( oOptions, sContext) |
Allows you to customize the header and footer options of a page while editing tasks. You can use this to display, hide, and create new pushbuttons. This is called while creating a new task or while modifying an existing task. @return {void} @param {object} oOptions @param {string} sContext |
S4.controller.js |
extHookGetS4AccountPhoto() |
Allows you to get the account photo of a task object. This is called when you select the account attribute of a task object. @return {boolean} |
S4.controller.js |
extHookGetS4ContactPhoto() |
Allows you to get the contact photo of a task object. This is called when you select the contact attribute of a task object. @return {boolean} |
S4.controller.js |
extHookAddAdditionalFollowupTypes(aFollowupTexts) |
Allows you to create follow-up documents from the current document or transaction. This is called when you select the Follow Up pushbutton at the Footer of the Overview page. @return {void} @param {array} aFollowupTexts |
S4.controller.js |
extHookCreateFollowupObject(oEvent) |
Allows you to implement your own logic for creating a follow-up document or object. This is called when you select the type of follow-up document you wish to create. @return {void} @param {object} oEvent |
You can change which information should be displayed for the individual tasks in the overview list, and in which form.
For example, the following are conceivable:
For this purpose,the following extensibility entities are available on the different layers. You have to extend each of these entities according to your specific business needs:
UI |
Back End/ABAP |
|||
---|---|---|---|---|
View |
Extension Point |
Design Time: Gateway Entity |
Design Time: Extension Include |
Run Time: Data Structure to Be Redefined |
S2.view.xml |
extListItem |
Task |
CRMS_TASK_ODATA_INCL |
CRMS_TASK_ODATA |
S2.view.xml |
extS2Buttons |
Task |
CRMS_TASK_ODATA_INCL |
CRMS_TASK_ODATA |
To add your own fields on the detail page, you must have already defined them in the back end, in the data structure for tasks. The following extensibility entities are available on the different layers. You have to extend each of these entities according to your specific business needs:
UI |
Back End/ABAP |
|||
---|---|---|---|---|
View |
Extension Point |
Design Time: Gateway Entity |
Design Time: Extension Include |
Data Structure to Be Redefined |
S3.view.xml |
extTaskDetailsTop (add fields above the first field) |
Task |
CRMS_TASK_ODATA_INCL |
CRMS_TASK_ODATA |
extTaskDetailsBottom (add fields below the last field) |
In the S3 controller for the detail page, the following methods are available:
Controller |
Hook |
Use |
---|---|---|
S3.controller.js |
extHookPrepareCustomFields(oNewTask) |
Allows you to manage additional fields to add to the Task object. You can provide filter types and filter tasks by these new types when you selects one of these new types. This is called when you select the Facet Filter button on the Footer bar. @return {void} @param {object} oNewTask |
extHookGetCustomFields(oTask) |
Allows you to get additional fields to add to the Task object. Additional fields added to the Task Entity Type are got by this Hook method. This is called when the Task object is needed. @return {void} @param {object} oTask |
|
extHookCancelCustomFields(oCancelTask) |
Allows you to negate the changes made to additional fields of the Task object. You can revert to the previous values in the custom fields when the Task is not meant to be saved. This is called when you cancel changes made to an existing task. @return {void} @param {object} oCancelTask |
|
extHookCheckUIValues(oReturn) |
Allows you to check the values of the additional fields of the Task object. You can format of the various fields that you have added. This is called when checking the UI values of the Task object. @return {void} @param {object} oReturn |
|
extHookCustomizeS3HFOptions(oOptions, sContext) |
Allows you to add new pushbuttons, and display or hide existing pushbuttons. @param {object} oOptions @param {string} sContext @return {void} |
To add or change pushbuttons on the detail page, use the following methods in the S3 controller for the detail page:
Controller |
Method (Hook) |
---|---|
S3 |
getHeaderFooterOptions |
To change the standard values (defaults) for fields, overwrite the function setDefaultValues (oTask) in class cus.crm.mytasks.util.Util.
Business Add-Ins (BAdIs)
The following Business Add-Ins are available for extensibility purposes:
CRM_TASK_ODATA_BD in enhancement spot CRM_TASK_ODATA_ENH.
You can use this BAdI to define your own logic for reading, creating, or changing tasks. This is necessary if, for example, you want to add your own fields, or use different processing logic for existing fields.
You call the BAdI by using transaction SE18.
Extension Includes
In addition to the extension includes described above, the following extension includes are available:
DDIC |
Extension Include |
Use |
---|---|---|
<DDIC> |
<Extension include> |
|
For more information about extension includes, see the extensibility documentation for the respective SAP NetWeaver release on your front-end server at http://help.sap.com/fiori_implementation .
Extension Points
For <business case>, for example, the following extension points are available:
View |
Extension Point |
Use |
---|---|---|
<DDIC> |
<Extension point> |
|
If there are additional fields available in the OData service, you can display these fields on the UI. For more information, see the extensibility documentation for the respective SAP NetWeaver release on your front-end server at http://help.sap.com/fiori_implementation .
UI Controller Hooks
To plug in and execute custom code to <business case>, for example, the following hooks are available in the controller code:
Controller |
Hook |
Use |
---|---|---|
<Controller> |
<Hook> |
|
If there are additional UI controller hooks available in the controller code, you can add own code. For more information, see the extensibility documentation for the respective SAP NetWeaver release on your front-end server at http://help.sap.com/fiori_implementation .
Display of UI Controls
As an example, the following UI controls can be hidden from the app UI:
View |
Control ID |
Use |
---|---|---|
S2.view.xml |
filterToolBar |
Allows you to display the toolbar on filtering the tasks. |
S2.view.xml |
filterLabel |
Allow you to maintain the text to be displayed on the toolbar on filtering the tasks. |
S2.view.xml |
taskInput |
Allow you to create a task quickly and also provide a name for the task. |
S2.view.xml |
filterSelect |
Allow you to filter tasks. |
S2.view.xml |
showEmptyTask |
Allow you to create a new task. |
S3.view.xml |
TxtTypeInput |
Allows you to view the description of the transaction type. |
S3.view.xml |
descInput |
Allows you to maintain the description of a task. |
S3.view.xml |
dueDateInput |
Allows you to maintain the due date of a task. |
S3.view.xml |
prioSelect |
Allows you to select the priority of a task. |
S3.view.xml |
statSelect |
Allows you to status the priority of a task. |
S3.view.xml |
privateSwitch |
Allows you to make a task private based on Customizing. |
S3.view.xml |
accountInput |
Allows you to maintain the account of a task. |
S3.view.xml |
showAccount |
Allows you to display the overview of an account. |
S3.view.xml |
contactInput |
Allows you to maintain the contact of a task. |
S3.view.xml |
showContact |
Allows you to maintain the overview of a contact. |
S3.view.xml |
noteTa |
Allows you to maintain notes. |
S3.view.xml |
attachmentEdit |
Allows you to maintain attachments for an existing task. |
S4.view.xml |
ohdetail |
Allows you to display the header information of a task. |
S4.view.xml |
oaAccount |
Allows you to display the account information of a task, if maintained. |
S4.view.xml |
oaContact |
Allows you to display the contact information of a task, if maintained. |
S4.view.xml |
notesS4 |
Allows you to display the notes of a task, if maintained. |
S4.view.xml |
attachmentOverview |
Allows you to display the attachments of a task. |
S4.view.xml |
tabDocHistory |
Allows you to display the transaction history of a task. |
S4.view.xml |
transColID |
Allows you to maintain the transaction ID column header text. |
S4.view.xml |
transColType |
Allows you to maintain the transaction type column header text. |
S4.view.xml |
transColDescription |
Allows you to maintain the description column header text. |
S4.view.xml |
transID |
Allows you to enable the hyperlink to navigate to the document, if the document can be viewed in SAP Fiori. |
S4.view.xml |
transType |
Allows you to display the transaction type description of a document. |
S4.view.xml |
transDescription |
Allows you to display the transaction ID of a document. |
For more information about hiding UI controls, see the extensibility documentation for the respective SAP NetWeaver release on your front-end server at http://help.sap.com/fiori_implementation .
For a general description of the extensibility options and procedures of SAP Fiori apps, see http://help.sap.com/fiori_implementation .