SAP HR_READ_INFOTYPE Function Module for









HR_READ_INFOTYPE is a standard hr read infotype 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 infotype FM, simply by entering the name HR_READ_INFOTYPE into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRAC
Program Name: SAPLHRAC
Main Program: SAPLHRAC
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HR_READ_INFOTYPE 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_INFOTYPE'"
EXPORTING
* TCLAS = 'A' "Transaction Class (Person, Applicant)
PERNR = "Personnel Number/Applicant Number
INFTY = "Infotype
* BEGDA = '18000101' "Start Date
* ENDDA = '99991231' "End Date
* BYPASS_BUFFER = ' ' "
* LEGACY_MODE = ' ' "

IMPORTING
SUBRC = "Return Code

TABLES
INFTY_TAB = "Infotype Table

EXCEPTIONS
INFTY_NOT_FOUND = 1
.



IMPORTING Parameters details for HR_READ_INFOTYPE

TCLAS - Transaction Class (Person, Applicant)

Data type: PSPAR-TCLAS
Default: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)

PERNR - Personnel Number/Applicant Number

Data type: PRELP-PERNR
Optional: No
Call by Reference: No ( called with pass by value option)

INFTY - Infotype

Data type: PRELP-INFTY
Optional: No
Call by Reference: No ( called with pass by value option)

BEGDA - Start Date

Data type: PRELP-BEGDA
Default: '18000101'
Optional: Yes
Call by Reference: No ( called with pass by value option)

ENDDA - End Date

Data type: PRELP-ENDDA
Default: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)

BYPASS_BUFFER -

Data type: FLAG
Default: ' '
Optional: Yes
Call by Reference: Yes

LEGACY_MODE -

Data type: BOOLE_D
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for HR_READ_INFOTYPE

SUBRC - Return Code

Data type: SY-SUBRC
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for HR_READ_INFOTYPE

INFTY_TAB - Infotype Table

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

INFTY_NOT_FOUND - Infotype Does Not Exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for HR_READ_INFOTYPE 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_subrc  TYPE SY-SUBRC, "   
lv_tclas  TYPE PSPAR-TCLAS, "   'A'
lt_infty_tab  TYPE STANDARD TABLE OF PSPAR, "   
lv_infty_not_found  TYPE PSPAR, "   
lv_pernr  TYPE PRELP-PERNR, "   
lv_infty  TYPE PRELP-INFTY, "   
lv_begda  TYPE PRELP-BEGDA, "   '18000101'
lv_endda  TYPE PRELP-ENDDA, "   '99991231'
lv_bypass_buffer  TYPE FLAG, "   ' '
lv_legacy_mode  TYPE BOOLE_D. "   SPACE

  CALL FUNCTION 'HR_READ_INFOTYPE'  "
    EXPORTING
         TCLAS = lv_tclas
         PERNR = lv_pernr
         INFTY = lv_infty
         BEGDA = lv_begda
         ENDDA = lv_endda
         BYPASS_BUFFER = lv_bypass_buffer
         LEGACY_MODE = lv_legacy_mode
    IMPORTING
         SUBRC = lv_subrc
    TABLES
         INFTY_TAB = lt_infty_tab
    EXCEPTIONS
        INFTY_NOT_FOUND = 1
. " HR_READ_INFOTYPE




ABAP code using 7.40 inline data declarations to call FM HR_READ_INFOTYPE

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 SUBRC FROM SY INTO @DATA(ld_subrc).
 
"SELECT single TCLAS FROM PSPAR INTO @DATA(ld_tclas).
DATA(ld_tclas) = 'A'.
 
 
 
"SELECT single PERNR FROM PRELP INTO @DATA(ld_pernr).
 
"SELECT single INFTY FROM PRELP INTO @DATA(ld_infty).
 
"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_legacy_mode) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!