Show TOC

App Extensibility: Approve Timesheets (Version 2)Locate this document in the navigation structure

Use

You can extend the Approve Timesheets app according to your business needs for different aspects. For this purpose, the following extensibility options are available:

  • Extending the Master view

    • You can hide or add additional fields in the list item on Master screen.

  • Extending the Details view

    • You can hide fields in the header section on Details screen.

    • You can add additional fields in the header section on Details screen.

    • You can extend the table in the Details screen.

    • You can add or remove the fields in the View details, at the time entry level

Note
  • 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 Information published on SAP site.

  • In addition, any of the complete views can be replaced by your own view.

Extending the Details view

To hide or add additional fields in the header section of the Details screen, 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

S3.view.xml

extS3Header

HCM_TIMESHEET_APPROVE_SRV

HCM_S_ATS_TIME_PENDING_INCL

Superclass: CL_HCM_TIMESHEET_APPRO_DPC_EXT

Method: TIME_PENDING_GET_ENTITYSET

To extend the table in the Details screen, the following extensibility entities 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

S3.view.xml

extS3Column

extS3Cells

HCM_TIMESHEET_APPROVE_SRV

HCM_S_ATS_TIME_DETAIL_EMP_INCL

Superclass: CL_HCM_TIMESHEET_APPRO_DPC_EXT

Method: TIME_DETAILS_EMP_GET_ENTITYSET

HCM_S_ATS_REJ_REASON_INCL

Superclass: CL_HCM_TIMESHEET_APPRO_DPC_EXT

Method: REJ_REASON_GET_ENTITYSET

Further Extensibility Entities

Business Add-Ins (BAdIs)

The following BAdIs are available for extensibility purposes:

  • BAdI for Approve Timesheets(HCM_B_APPROVE_TIMESHEETS)

    You can use this BAdI to retrieve target hours of an employee and to read employees for a manager.

For more information on implementing the BAdIs in the context of enhancement concept, see SAP Library for BAdIs Embedded in the Enhancement Framework under Start of the navigation path Technology Next navigation step SAP NetWeaver Platform Next navigation step SAP NetWeaver Library: Function-Oriented View Next navigation step Application Server Next navigation step Application Server ABAP Next navigation step Application Development on AS ABAP Next navigation step ABAP Customer Development Next navigation step Enhancement Framework Next navigation step Enhancement Technologies Next navigation step Business Add-Ins (BAdIs) Next navigation step Additional Information End of the navigation path.

Extension Includes

In addition to the extension includes described above, the following extension includes are available:

DDIC

Extension Include

Use

HCM_S_ATS_PROFILEFIELD

HCM_S_ATS_PROFILEFIELD_INCL

Allows you to extend the Profile field entity

HCM_S_ATS_SUMMARY

HCM_S_ATS_SUMMARY_INCL

Allows you to change the summary information on the app tile of the Fiori Launchpad.

HCM_S_ATS_REJ_REASON

HCM_S_ATS_REJ_REASON_INCL

Allows you to create additional fields for rejection reason

HCM_S_ATS_VALUEHELP

HCM_S_ATS_VALUEHELP_INCL

Allows you to extend ValueHelp entity

HCM_S_ATS_TIME_DETAILS_EMP

HCM_S_ATS_TIME_DETAIL_EMP_INCL

Allows you to have additional fields to be displayed as the details for an employee timesheet

HCM_S_ATS_TIME_PENDING

HCM_S_ATS_TIME_PENDING_INCL

Allows you to have additional fields for the summarized timesheet in the master list item

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 Start of the navigation path Extensibility Information for SAP Fiori Next navigation step Extending the UI Layer Next navigation step UI Extensibility Workflow Next navigation step  Next navigation step Checking the SAP-Enabled Extension Options Next navigation step Extension Points End of the navigation path.

UI Controller Hooks

To plug in and execute custom code, the following hooks are available in the controller code:

Controller

Hook

Use

S2.controller.js

extHookfillList

Allows you to to add and change the properties of the list

extHookChangeFooterButtons

Allows you to add and change buttons for the master view footer

S3.controller.js

extHookcreateDetailModelData

Allows you to organize the data from extended OData Service as per the UI requirement

extHookviewSummary

Allows you to add or remove the contents in the summary information

extHookChangeFooterButtons

Allows you to add and change buttons for the detail view footer

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 Start of the navigation path Extensibility Information for SAP Fiori Next navigation step Extending the UI Layer Next navigation step UI Extensibility Workflow Next navigation step  Next navigation step Checking the SAP-Enabled Extension Options Next navigation step UI Controller Hooks End of the navigation path.

Display of UI Controls

The following UI controls can be hidden on the app UI:

View

Control ID

Use

S3.view.xml

S3DateColumn

Allows you to hide the date column

S3CheckBoxColumn

Allows you to hide the CheckBox column

S3DescrColumn

Allows you to hide the Description column

S3TimeColumn

Allows you to hide the Time recorded or Weekly target column

S3StatusColumn

Allows you to hide the timesheet status column

S3ButtonColumn

Allows you to hide the Summary column

DetailObjHdr

Allows you to hide the Object header in detail screen

DetailObjHdrAttr1

Allows you to hide the object attribute

DetailObjHdrAttr2

Allows you to hide the object attribute

DetailObjHdrStatus1

Allows you to hides the first status of object header

DetailObjHdrStatus2

Allows you to hide the second status of object header

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 Start of the navigation path Extensibility Information for SAP Fiori Next navigation step Extending the UI Layer Next navigation step UI Extensibility Workflow Next navigation step  Next navigation step Checking the SAP-Enabled Extension Options Next navigation step Hiding UI Controls End of the navigation path.

More Information

For a general description of the extensibility options and procedures of SAP Fiori apps, see http://help.sap.com/fiori_implementation Start of the navigation path Extensibility Information for SAP Fiori End of the navigation path.