You can extend the My Timesheet app according to your business needs for different aspects. For this purpose, the following extensibility options are available:
Extending the Create Entry view
You can add a new field in the Time entry section of the Create Entry view.
You can add a new field in the Time Assignment section of the Create Entry view.
For more information on migration from SAP Fiori principal apps for SAP ERP 1.0 to SAP Fiori for SAP ERP HCM 1.0, see SAP Note 2112514 .
In addition, any of the complete views can be replaced by your own view.
To add a new field in the Create Entry view of the app, the extensibility entities listed below are available on the different software 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 (in DDIC Structure) |
Runtime: Superclass/ Method to Be Redefined |
S31.view.xml |
extS31FormElementForInputs |
HCM_TIMESHEET_MAN_SRV |
- |
- |
S31.view.xml |
extS31FormElementAccountingInfos |
HCM_TIMESHEET_MAN_SRV |
HCM_TIMESHEET_GET_PROFILEFIELD |
Superclass: CL_HCM_TIMESHEET_MAN_DPC_EXT Method: PROFILEFIELDS_GET_ENTITYSET |
HCM_TIMESHEET_GET_WORKLIST |
Superclass: CL_HCM_TIMESHEET_MAN_DPC_EXT Method: WORKLISTCOLLECTI_GET_ENTITYSET |
Business Add-Ins (BAdIs)
The following BAdIs are available for extensibility purposes:
BAdI to change the field rankings for time assignment(HCM_B_TSH_FIELDRANKINGS)
You can use this BAdI to set or change the order in which the cost assignment fields are displayed.
BAdI to filter the project picklist by text(HCM_B_TSH_PICKLIST_TXTFILTER)
You can use this BAdI to define your own search implementation to retrieve texts for a particular field in the app (Network Number, WBS Element).
BAdI for work calendar statuses(HCM_B_TSH_WCSTATUSES)
You can use this BAdI to set or change the status of a particular day in the calendar.
BAdI definition for favorites in HCM My Timesheet(HCM_B_TSH_FAVORITES)
You can use this BAdI to implement Favorites in this app.
BAdI Definition for Employee Assignments(HCM_B_EMPLOYEE_ASSIGNMENT)
You can use this BAdI to retrieve the employee's assignment information (for employees who are concurrently employed).
For more information on implementing the BAdIs in the context of enhancement concept, see SAP Library for BAdIs Embedded in the Enhancement Framework under .
Extension Includes
In addition to the extension includes described above, the following extension includes are available:
DDIC |
Extension Include |
Use |
---|---|---|
HCM_S_TIMESHEET_INITIALINFO |
HCM_S_TIMESHEET_INITINFO_INCL |
Extends the InitialInfo entity |
HCM_S_TIMESHEET_PROFILEFIELD |
HCM_S_TIMESHEET_PROFFIELD_INCL |
Extends the Profile field entity |
HCM_S_TIMESHEET_SUMMARY |
HCM_S_TIMESHEET_SUMMARY_INCL |
Extends the Summary entity |
HCM_S_TIMESHEET_TIMEDATA |
HCM_S_TIMESHEET_TIMEDATA_INCL |
Extends the TimeData entity |
HCM_S_TIMESHEET_TIMEENTRY_ENTY |
HCM_S_TIMESHEET_TIMEENTRY_INCL |
Extends the TimeEntry Entity |
HCM_S_TIMESHEET_VALUEHELP |
HCM_S_TIMESHEET_VALUEHELP_INCL |
Extends the ValueHelp entity |
HCM_S_TIMESHEET_WORKCALENDAR |
HCM_S_TIMESHEET_WORKCAL_INCL |
Extends the WorkCalendar entity |
HCM_S_TIMESHEET_WORKLIST |
HCM_S_TIMESHEET_WORKLIST_INCL |
Extends the WorkList entity |
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, the following hooks are available in the controller code:
Controller |
Hook |
Use |
---|---|---|
S3.controller.js |
extHookChangeHeaderFooterOptions |
Allows you to modify the header and footer |
extHookAlterColumns |
Allows you to add or remove columns in the table |
|
extHookChangeObjectBeforePost |
Allows you to modify the posting data of a time entry |
|
S31.controller.js |
extHookChangeHeaderFooterOption |
Allows you to modify the header and footer |
extHookChangeObjectBeforePost |
Allows you to modify the posting data of a time entry |
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
The following UI controls can be hidden on the app UI:
View |
Control ID |
Use |
---|---|---|
S3.view.xml |
WEEKLY_CALENDAR |
Allows you to hide the calendar control |
MTS3_SUMMARY_GRID |
Allows you to hide the Allows you to hide the calendar control |
|
ENTRY_LIST_CONTENTS |
Allows you to hide the display table control |
|
LEGEND |
Allows you to hide the calendar legends |
|
S31.view.xml |
weeklyCalendar |
Allows you to hide the calendar control |
createFormTitle |
Allows you to hide the time entry form |
|
accountingInfoPanel |
Allows you to hide the panel to display the accounting info |
|
editBtn |
Allows you to edit the Favorites button |
|
updateBtn |
Allows you to edit the Favorites button |
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 .