SAP HR_READ_SUBTYPE Function Module for
HR_READ_SUBTYPE is a standard hr read subtype SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for hr read subtype FM, simply by entering the name HR_READ_SUBTYPE into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRAC
Program Name: SAPLHRAC
Main Program: SAPLHRAC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HR_READ_SUBTYPE pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'HR_READ_SUBTYPE'".
EXPORTING
* TCLAS = 'A' "
* LEGACY_MODE = ' ' "
PERNR = "
INFTY = "
* SUBTY = '*' "
* SPRPS = '*' "
* BEGDA = '18000101' "
* ENDDA = '99991231' "
* BYPASS_BUFFER = ' ' "
* NO_AUTH_CHECK = ' ' "
IMPORTING
MISSING_AUTH = "
TABLES
INFTY_TAB = "
EXCEPTIONS
INFTY_NOT_FOUND = 1 INVALID_INPUT = 2
IMPORTING Parameters details for HR_READ_SUBTYPE
TCLAS -
Data type: PSPAR-TCLASDefault: 'A'
Optional: No
Call by Reference: Yes
LEGACY_MODE -
Data type: BOOLE_DDefault: SPACE
Optional: No
Call by Reference: Yes
PERNR -
Data type: PRELP-PERNROptional: No
Call by Reference: Yes
INFTY -
Data type: PRELP-INFTYOptional: No
Call by Reference: Yes
SUBTY -
Data type: PRELP-SUBTYDefault: '*'
Optional: No
Call by Reference: Yes
SPRPS -
Data type: PRELP-SPRPSDefault: '*'
Optional: No
Call by Reference: Yes
BEGDA -
Data type: PRELP-BEGDADefault: '18000101'
Optional: No
Call by Reference: Yes
ENDDA -
Data type: PRELP-ENDDADefault: '99991231'
Optional: No
Call by Reference: Yes
BYPASS_BUFFER -
Data type: FLAGDefault: SPACE
Optional: No
Call by Reference: Yes
NO_AUTH_CHECK -
Data type: FLAGDefault: SPACE
Optional: No
Call by Reference: Yes
EXPORTING Parameters details for HR_READ_SUBTYPE
MISSING_AUTH -
Data type: BOOLE_DOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HR_READ_SUBTYPE
INFTY_TAB -
Data type:Optional: No
Call by Reference: Yes
EXCEPTIONS details
INFTY_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
INVALID_INPUT -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HR_READ_SUBTYPE Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_tclas | TYPE PSPAR-TCLAS, " 'A' | |||
| lt_infty_tab | TYPE STANDARD TABLE OF PSPAR, " | |||
| lv_missing_auth | TYPE BOOLE_D, " | |||
| lv_infty_not_found | TYPE BOOLE_D, " | |||
| lv_legacy_mode | TYPE BOOLE_D, " SPACE | |||
| lv_pernr | TYPE PRELP-PERNR, " | |||
| lv_invalid_input | TYPE PRELP, " | |||
| lv_infty | TYPE PRELP-INFTY, " | |||
| lv_subty | TYPE PRELP-SUBTY, " '*' | |||
| lv_sprps | TYPE PRELP-SPRPS, " '*' | |||
| lv_begda | TYPE PRELP-BEGDA, " '18000101' | |||
| lv_endda | TYPE PRELP-ENDDA, " '99991231' | |||
| lv_bypass_buffer | TYPE FLAG, " SPACE | |||
| lv_no_auth_check | TYPE FLAG. " SPACE |
|   CALL FUNCTION 'HR_READ_SUBTYPE' " |
| EXPORTING | ||
| TCLAS | = lv_tclas | |
| LEGACY_MODE | = lv_legacy_mode | |
| PERNR | = lv_pernr | |
| INFTY | = lv_infty | |
| SUBTY | = lv_subty | |
| SPRPS | = lv_sprps | |
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| BYPASS_BUFFER | = lv_bypass_buffer | |
| NO_AUTH_CHECK | = lv_no_auth_check | |
| IMPORTING | ||
| MISSING_AUTH | = lv_missing_auth | |
| TABLES | ||
| INFTY_TAB | = lt_infty_tab | |
| EXCEPTIONS | ||
| INFTY_NOT_FOUND = 1 | ||
| INVALID_INPUT = 2 | ||
| . " HR_READ_SUBTYPE | ||
ABAP code using 7.40 inline data declarations to call FM HR_READ_SUBTYPE
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single TCLAS FROM PSPAR INTO @DATA(ld_tclas). | ||||
| DATA(ld_tclas) | = 'A'. | |||
| DATA(ld_legacy_mode) | = ' '. | |||
| "SELECT single PERNR FROM PRELP INTO @DATA(ld_pernr). | ||||
| "SELECT single INFTY FROM PRELP INTO @DATA(ld_infty). | ||||
| "SELECT single SUBTY FROM PRELP INTO @DATA(ld_subty). | ||||
| DATA(ld_subty) | = '*'. | |||
| "SELECT single SPRPS FROM PRELP INTO @DATA(ld_sprps). | ||||
| DATA(ld_sprps) | = '*'. | |||
| "SELECT single BEGDA FROM PRELP INTO @DATA(ld_begda). | ||||
| DATA(ld_begda) | = '18000101'. | |||
| "SELECT single ENDDA FROM PRELP INTO @DATA(ld_endda). | ||||
| DATA(ld_endda) | = '99991231'. | |||
| DATA(ld_bypass_buffer) | = ' '. | |||
| DATA(ld_no_auth_check) | = ' '. | |||
Search for further information about these or an SAP related objects