Show TOC

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

Use

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

  • Extending the Master list view

    You can add additional attributes in list item on the 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 replace any of the complete views with your own view.

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.

Extending the Master list view

To add additional attributes in the list items on the Master screen 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

S2.view.xml

extS2ListItem

HCM_LEAVE_REQ_APPROVE

HCM_S_LRQ_APR_LEAVE_REQ_INCL

Superclass: CL_HCM_LEAVE_REQ_APPRO_DPC_EXT

Method: LEAVEREQUESTSET_GET_ENTITYSET

Extending the Details view

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

S3.view.xml

extS3Header

HCM_LEAVE_REQ_APPROVE

HCM_S_LRQ_APR_LEAVE_REQ_INCL

Superclass: CL_HCM_LEAVE_REQ_APPRO_DPC_EXT

Method: LEAVEREQUESTSET_GET_ENTITYSET

 

extS3Tab

HCM_LEAVE_REQ_APPROVE

HCM_S_LRQ_APR_LEAVE_REQ_INCL

Superclass: CL_HCM_LEAVE_REQ_APPRO_DPC_EXT

Method: LEAVEREQUESTSET_GET_ENTITYSET

Further Extensibility Entities

Extension Includes

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

DDIC

Extension Include

Use

HCM_S_LRQ_APR_EMPLOYEE

HCM_S_LRQ_APR_EMPLOYEE_INCL

Allows you to extend the Employee Details (with corresponding position) entity.

HCM_S_LRQ_APR_ITEMCOUNT

HCM_S_LRQ_APR_ITEMCOUNT_INCL

Allows you to extend the Item Count entity.

HCM_S_LRQ_FILE_ATTACHMENT

HCM_S_LRQ_FILE_ATTACH_INCL

Allows you to extend the Attachments entity.

/GBHCM/S_MA_TEAM_CALENDAR2

/GBHCM/LRA_TCAL_INCL

Allows you to extend the Team Calendar 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 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

extHookChangeFooterButtons

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

S3.controller.js

extHookChangeFooterButtons

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

S4.controller.js

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

S2.view.xml

page

Allows you to hide page

MAIN_LIST_ITEM

Allows you to hide Object list item

ATTR1

Allows you to hide Leave Type Description

TimeframeList

Allows you you to hide Time Frame (From and To dates)

ATTR2

Allows you to hide Overlaps

S3.view.xml

detailPage

Allows you to hide Detail page

S3_DETAILHEADHER

Allows you to hide Detail header

S3_CHANGEDATE

Allows you to hide Change Date

S3_CANCELSTATUS

Allows you to hide Cancelled Status

S3_REQ_PERNR

Allows you to hide Employee ID/Pernr

S3_LEAVEDESC

Allows you to hide Leave Type Description

S3_TIMEFRAME

Allows you to hide Time Frame (From and To dates)

LRAtc

Allows you to hide Icon tab bar

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.