Show TOC

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

Use

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

  • Extending all the views

    • You can hide fields in all the views, that is, Main view (S1), History view (S3, S6B), and Entitlements (S2).

    • You can add additional fields in all views.

  • Extending the master view

    You can add additional attributes in list item on the Master screen (S3).

    Note

    S3 view is extended using S3.controller.js.

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 Main or Entry view

To hide or add additional fields in the main view, 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

S1.view.xml

extS1Field

HCM_LEAVE_REQ_CREATE

HCM_S_LRQ_REQUEST_LIST_INCL

Superclass: CL_HCM_LEAVE_REQ_CREAT_DPC_EXT

Method: LEAVEREQUESTCOLL_GET_ENTITYSET

     

HCM_S_LRQ_ABS_CUSTOMIZING_INCL

Superclass: CL_HCM_LEAVE_REQ_CREAT_DPC_EXT

Method: ABSENCETYPECOLLE_GET_ENTITYSET

     

HCM_S_LRQ_APPROVER_INCL

Superclass: CL_HCM_LEAVE_REQ_CREAT_DPC_EXT

Method: APPROVERCOLLECTI_GET_ENTITYSET

     

HCM_S_LRQ_CRE_CONFIG_INCL

Superclass: CL_HCM_LEAVE_REQ_CREAT_DPC_EXT

Method: CONFIGURATIONCOL_GET_ENTITYSET

Extending the History view

To hide or add additional fields in the history view, 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

S6B.view.xml

extS6BIconTab

HCM_LEAVE_REQ_CREATE

HCM_S_LRQ_REQUEST_LIST_INCL

Superclass: CL_HCM_LEAVE_REQ_CREAT_DPC_EXT

Method: LEAVEREQUESTCOLL_GET_ENTITYSET

 

extS6BHeaderField

HCM_LEAVE_REQ_CREATE

HCM_S_LRQ_REQUEST_LIST_INCL

Superclass: CL_HCM_LEAVE_REQ_CREAT_DPC_EXT

Method: LEAVEREQUESTCOLL_GET_ENTITYSET

Extending the Entitlements view

To hide or add additional fields in the Entitlements view, 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

extS2ColItem

HCM_LEAVE_REQ_CREATE

HCM_S_LRQ_CRE_TIME_ACC_INCL

Superclass: CL_HCM_LEAVE_REQ_CREAT_DPC_EXT

Method: TIMEACCOUNTCOLLE_GET_ENTITYSET

S2.view.xml

extS2ColHeader

HCM_LEAVE_REQ_CREATE

   
Further Extensibility Entities

Business Add-Ins (BAdIs)

The following BAdIs are available for extensibility purposes:

  • 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).

Extension Includes

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

DDIC

Extension Include

Use

HCM_S_LRQ_CRE_CONFIGURATION

HCM_S_LRQ_CRE_CONFIG_INCL

Allows you to extend the Configuration entity

HCM_S_LRQ_CRE_WORK_SCHEDULE

HCM_S_LRQ_CRE_WORK_SCHED_INCL

Allows you to extend the WorkSchedule entity

HCM_S_LRQ_FILE_ATTACHMENT

HCM_S_LRQ_FILE_ATTACH_INCL

Allows you to extend the File Attachment 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

S1.controller.js

extHookChangeFooterButtons

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

extHookRouteMatchedHome

Allows you to add UI or business logic

extHookRouteMatchedChange

extHookClearData

extHookInitCalendar

extHookTapOnDate

extHookSetHighlightedDays

extHookDeviceDependantLayout

extHookSubmit

extHookOnSubmitLRCfail

extHookOnSubmitLRCsuccess

extHookCallDialog

Allows you to modify the dialog content

S2.controller.js

extHookTimeAccountCollection

Allows you to modify the TimeAccountCollection

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

extHookLeaveRequestCollection

Allows you to modify the LeaveRequestCollection

extHookItemTemplate

Allows you to modify the itemTemplate

S6B.controller.js

extHookDetailView

Allows you to add or change UI and business logic

extHookChangeFooterButtons

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

extHookWithdrawDialogContent

Allows you to add and change content of withdraw dialog

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

S1.view.xml

S1_page

Allows to hide the create page content

LRS4_FLX_TOP

Allows to hide Absence type drop down grid

SLCT_LEAVETYPE

Allows to hide Select drop down menu

LRS4_FRM_MAIN

Allows to hide all content excluding drop down

LRS4_FRM_CNT_CALENDAR

Allows to hide form container of calendar

LRS4_FELEM_CALENDAR

Allows to hide form element of calendar

LRS4_DAT_CALENDAR

Allows to hide calendar

LRS4_LEGEND

Allows to hide calendar legend

LRS4_FRM_CNT_BALANCES

Allows to hide all input elements

LRS4_TXT_BOOKEDDAYS

Allows to hide used balance quantity

LRS4_TXT_REMAININGDAY

Allows to hide available quantity

LRS4_LBL_STARTTIME

Allows to hide Start Time label

LRS4_DAT_STARTTIME

Allows to hide Start Time Input

LRS4_LBL_ENDTIME

Allows to hide End Time label

LRS4_DAT_ENDTIME

Allows to hide End Time Input

LRS4_LBL_ABS_HOURS

Allows to hide Att./Absence label

LRS4_ABS_HOURS

Allows to hide Att./Absence input

LR_APPROVER

Allows to hide Approver Selection (Input and label)

LRS4_LBL_APPROVER

Allows to hide Approver Input label

LRS4_APPROVER_NAME

Allows to hide Approver selection

LRS4_NOTE

Allows to hide Note Input Grid (Input and label)

LRS4_LBL_NOTE

Allows to hide Note Input Label

LRS4_FILEATTACHMENTS

Allows to hide Attachments

S2.view.xml

LRS2_LISTITEM

Allows to hide ColumnListItem

LRS2_LIST_ITEM_ACCOUNT

Allows to hide Time account Name

LRS2_LIST_ITEM_END_DATE

Allows to hide End date

list

Allows to hide master list

LRS6B_HEADER

Allows to hide 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.