HRGPBS_HER_GET_YEAR_DATES is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name HRGPBS_HER_GET_YEAR_DATES into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
HRGPBS_HER
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'HRGPBS_HER_GET_YEAR_DATES' "From Return Year Derive Return Year Start & End Dates
CHANGING
p_iyear = " p08_ussc02 Return Year
p_begda = " sydatum Return Year Start Date
p_endda = " sydatum Return Year End Date
p_date_range_display = " p08p_char23 Return Year as '01.04.XXXX - 31.03.YYYY'
EXCEPTIONS
RETURN_YEAR_BEFORE_1999 = 1 " Return Year is BEFORE 1999
. " HRGPBS_HER_GET_YEAR_DATES
The ABAP code below is a full code listing to execute function module HRGPBS_HER_GET_YEAR_DATES including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
DATA(ld_p_iyear) = 'Check type of data required'.
DATA(ld_p_begda) = '20210129'.
DATA(ld_p_endda) = '20210129'.
DATA(ld_p_date_range_display) = '20210129'. . CALL FUNCTION 'HRGPBS_HER_GET_YEAR_DATES' CHANGING p_iyear = ld_p_iyear p_begda = ld_p_begda p_endda = ld_p_endda p_date_range_display = ld_p_date_range_display EXCEPTIONS RETURN_YEAR_BEFORE_1999 = 1 . " HRGPBS_HER_GET_YEAR_DATES
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_p_iyear | TYPE P08_USSC02 , |
| ld_p_begda | TYPE SYDATUM , |
| ld_p_endda | TYPE SYDATUM , |
| ld_p_date_range_display | TYPE P08P_CHAR23 . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name HRGPBS_HER_GET_YEAR_DATES or its description.
HRGPBS_HER_GET_YEAR_DATES - From Return Year Derive Return Year Start & End Dates HRGPBS_HER_GET_WAGE_TYPES - Derive All the wage types from the Wage Type Group HRGPBS_HER_GET_SURNAME_NINO - Derive Surname and NI Number from IT0002 HRGPBS_HER_GET_LIVE_DATE - Derive Institution Code & Name From T5GPBS_ALL (USS/INST) HRGPBS_HER_GET_INST_CODE - Derive Institution Code & Name From T5GPBS_ALL (USS/INST) HRGPBS_HER_GET_GSALC_WAGE_TYPE - Derive Salary Calculation Wage Type from feature GSALC