This document explains how to restrict display of no quota balance leave types i.e remaining balance 0.00 in Time Accounts application.


In Time Accounts application, it should not display the no quota balance leave types in list.

Solution Steps:

Step 1: Create enhancement to standard class CL_HRESS_PTARQ_TIMEACC_GUIBBL for method IF_FPM_GUIBB_LIST~GET_DATA

ESS TA.png

Step 2: Write below logic in created enhancement.

 CLASS LCL_ZHRESS_LR_TIMEACCS DEFINITION DEFERRED. CLASS CL_HRESS_PTARQ_TIMEACC_GUIBBL DEFINITION LOCAL FRIENDS LCL_ZHRESS_LR_TIMEACCS. *----------------------------------------------------------------------* *       CLASS LCL_ZHRESS_LR_TIMEACCS DEFINITION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS LCL_ZHRESS_LR_TIMEACCS DEFINITION.    PUBLIC SECTION.      CLASS-DATA OBJ TYPE REF TO LCL_ZHRESS_LR_TIMEACCS.      "#EC NEEDED      DATA CORE_OBJECT TYPE REF TO CL_HRESS_PTARQ_TIMEACC_GUIBBL . "#EC NEEDED      INTERFACES  IPO_ZHRESS_LR_TIMEACCS.      METHODS:       CONSTRUCTOR IMPORTING CORE_OBJECT         TYPE REF TO CL_HRESS_PTARQ_TIMEACC_GUIBBL OPTIONAL. ENDCLASS.                    "LCL_ZHRESS_LR_TIMEACCS DEFINITION *----------------------------------------------------------------------* *       CLASS LCL_ZHRESS_LR_TIMEACCS IMPLEMENTATION *----------------------------------------------------------------------* * *----------------------------------------------------------------------* CLASS LCL_ZHRESS_LR_TIMEACCS IMPLEMENTATION.    METHOD CONSTRUCTOR.      ME->CORE_OBJECT = CORE_OBJECT.    ENDMETHOD.                    "CONSTRUCTOR    METHOD IPO_ZHRESS_LR_TIMEACCS~GET_DATA. *"------------------------------------------------------------------------* *" Declaration of POST-method, do not insert any comments here please! *" *"methods GET_DATA *"  importing *"    !IV_EVENTID type ref to CL_FPM_EVENT *"    !IT_SELECTED_FIELDS type FPMGB_T_SELECTED_FIELDS optional *"    !IV_RAISED_BY_OWN_UI type BOOLE_D optional *"    !IV_VISIBLE_ROWS type I optional *"    !IV_EDIT_MODE type FPM_EDIT_MODE optional *"    !IO_EXTENDED_CTRL type ref to IF_FPM_LIST_ATS_EXT_CTRL optional *"  changing *"    !ET_MESSAGES type FPMGB_T_MESSAGES *"    !EV_DATA_CHANGED type BOOLE_D *"    !EV_FIELD_USAGE_CHANGED type BOOLE_D *"    !EV_ACTION_USAGE_CHANGED type BOOLE_D *"    !EV_SELECTED_LINES_CHANGED type BOOLE_D *"    !EV_DND_ATTR_CHANGED type BOOLE_D *"    !EO_ITAB_CHANGE_LOG type ref to IF_SALV_ITAB_CHANGE_LOG *"    !CT_DATA type DATA *"    !CT_FIELD_USAGE type FPMGB_T_FIELDUSAGE *"    !CT_ACTION_USAGE type FPMGB_T_ACTIONUSAGE *"    !CT_SELECTED_LINES type RSTABIXTAB *"    !CV_LEAD_INDEX type SYTABIX *"    !CV_FIRST_VISIBLE_ROW type I *"    !CS_ADDITIONAL_INFO type FPMGB_S_ADDITIONAL_INFO optional *"    !CT_DND_ATTRIBUTES type FPMGB_T_DND_DEFINITION optional . *"------------------------------------------------------------------------*      DATA: LT_DATA TYPE PTARQ_UIA_QUOTA_STATUS_TAB_CE.      IF CT_DATA IS NOT INITIAL.        LT_DATA = CT_DATA.        DELETE LT_DATA WHERE REST_POSTED_REQUESTED = '     0.00 Days'.        CT_DATA = LT_DATA.      ENDIF.    ENDMETHOD.                    "IPO_ZHRESS_LR_TIMEACCS~GET_DATA ENDCLASS.                    "lcl_zhress_lr_timeaccs IMPLEMENTATION 

Output: It will not display 0 balance quota leave types in list

ESS TA1.png

Note: This is done for WDABAP based applications in EHP5/6.

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !