SAP HR_SELECT_PERSONS Function Module for









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

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



Function HR_SELECT_PERSONS 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_SELECT_PERSONS'"
EXPORTING
* BEGDA = '18000101' "
* ENDDA = '99991231' "
* TCLAS = 'A' "
* AUTHORITY_CHECK = 'X' "
* IGNORELOCKEDRECORDS = 'Y' "
* AUTHORITY_LEVEL = 'R' "
* NO_MESSAGE = ' ' "

TABLES
CONDITIONTABLE = "
* PERNRS_IN = "
PERNRS_FOUND = "
* GENERATED_CODING = "

EXCEPTIONS
EMPTY_TABLE = 1 WRONG_TABLEFIELD = 2 ONLY_PNP_OR_PAP = 3 UNSUPPORTED_CONDITION = 4 UNSUPPORTED_FIELDKIND = 5 WRONG_TCLAS = 6 INTERNAL_ERROR = 7
.



IMPORTING Parameters details for HR_SELECT_PERSONS

BEGDA -

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

ENDDA -

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

TCLAS -

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

AUTHORITY_CHECK -

Data type: CHAR01
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IGNORELOCKEDRECORDS -

Data type: CHAR01
Default: 'Y'
Optional: Yes
Call by Reference: Yes

AUTHORITY_LEVEL -

Data type: AUTHC_D
Default: 'R'
Optional: Yes
Call by Reference: Yes

NO_MESSAGE -

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

TABLES Parameters details for HR_SELECT_PERSONS

CONDITIONTABLE -

Data type: HRTABLECONDITION_T
Optional: No
Call by Reference: Yes

PERNRS_IN -

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

PERNRS_FOUND -

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

GENERATED_CODING -

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

EXCEPTIONS details

EMPTY_TABLE -

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

WRONG_TABLEFIELD -

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

ONLY_PNP_OR_PAP -

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

UNSUPPORTED_CONDITION -

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

UNSUPPORTED_FIELDKIND -

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

WRONG_TCLAS -

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

INTERNAL_ERROR -

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

Copy and paste ABAP code example for HR_SELECT_PERSONS 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_begda  TYPE D, "   '18000101'
lv_empty_table  TYPE D, "   
lt_conditiontable  TYPE STANDARD TABLE OF HRTABLECONDITION_T, "   
lv_endda  TYPE D, "   '99991231'
lt_pernrs_in  TYPE STANDARD TABLE OF HRPERNR, "   
lv_wrong_tablefield  TYPE HRPERNR, "   
lv_tclas  TYPE TCLAS, "   'A'
lt_pernrs_found  TYPE STANDARD TABLE OF HRPERNR, "   
lv_only_pnp_or_pap  TYPE HRPERNR, "   
lv_authority_check  TYPE CHAR01, "   'X'
lt_generated_coding  TYPE STANDARD TABLE OF CHAR01, "   
lv_unsupported_condition  TYPE CHAR01, "   
lv_ignorelockedrecords  TYPE CHAR01, "   'Y'
lv_unsupported_fieldkind  TYPE CHAR01, "   
lv_wrong_tclas  TYPE CHAR01, "   
lv_authority_level  TYPE AUTHC_D, "   'R'
lv_no_message  TYPE FLAG_X, "   ' '
lv_internal_error  TYPE FLAG_X. "   

  CALL FUNCTION 'HR_SELECT_PERSONS'  "
    EXPORTING
         BEGDA = lv_begda
         ENDDA = lv_endda
         TCLAS = lv_tclas
         AUTHORITY_CHECK = lv_authority_check
         IGNORELOCKEDRECORDS = lv_ignorelockedrecords
         AUTHORITY_LEVEL = lv_authority_level
         NO_MESSAGE = lv_no_message
    TABLES
         CONDITIONTABLE = lt_conditiontable
         PERNRS_IN = lt_pernrs_in
         PERNRS_FOUND = lt_pernrs_found
         GENERATED_CODING = lt_generated_coding
    EXCEPTIONS
        EMPTY_TABLE = 1
        WRONG_TABLEFIELD = 2
        ONLY_PNP_OR_PAP = 3
        UNSUPPORTED_CONDITION = 4
        UNSUPPORTED_FIELDKIND = 5
        WRONG_TCLAS = 6
        INTERNAL_ERROR = 7
. " HR_SELECT_PERSONS




ABAP code using 7.40 inline data declarations to call FM HR_SELECT_PERSONS

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.

DATA(ld_begda) = '18000101'.
 
 
 
DATA(ld_endda) = '99991231'.
 
 
 
DATA(ld_tclas) = 'A'.
 
 
 
DATA(ld_authority_check) = 'X'.
 
 
 
DATA(ld_ignorelockedrecords) = 'Y'.
 
 
 
DATA(ld_authority_level) = 'R'.
 
DATA(ld_no_message) = ' '.
 
 


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!