HCM
BAPI
RFC
Used the same way in S/4HANA
BAPI_EMPLOYEE_GETDATA Find Employees by Search Criteria
Finds personnel numbers by search strings such as name, organizational unit, position, cost center or user ID and returns organizational, personal and communication data for them. It is used in portals, phone directories and interfaces. Set AUTHORITY_CHECK so the standard HR authorization check applies.
- Function group
- RH65
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| EMPLOYEE_ID | BAPIEMPLB-PERNO | Personnel number | — |
| LASTNAME_M | BAPIEMPLB-LASTNAME_M | Search string for last name | — |
| FSTNAME_M | BAPIEMPLB-FSTNAME_M | Search string for first name | — |
| ORGTXT | BAPIEMPLB-ORGTXT | Search string for organizational unit | — |
| JOBTXT | BAPIEMPLB-JOBTXT | Search string for job | — |
| POSTXT | BAPIEMPLB-POSTXT | Search string for position | — |
| COSTCENTER | BAPIEMPLB-COSTCENTER | Search string for cost center | — |
| USERID | BAPIEMPLB-USERID | Search string for communication ID | — |
| DATE | BAPIEMPLB-DATE | Search date | — |
| READDB | BAPIEMPLB-READDB | Re-read the database | — |
| AUTHORITY_CHECK | CHAR1 | Authorization check | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRETURN | Return message |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| ORG_ASSIGNMENT | BAPIP0001B | Result list: organizational assignment | — |
| PERSONAL_DATA | BAPIP0002B | Result list: personal data | — |
| INTERNAL_CONTROL | BAPIP0032B | Result list: internal control | — |
| COMMUNICATION | BAPIP0105B | Result list: communication | — |
| ARCHIVELINK | BAPITOAV0 | Result list: optical archive | — |
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'BAPI_EMPLOYEE_GETDATA'
IMPORTING
return = lv_return
TABLES
org_assignment = lt_org_assignment
personal_data = lt_personal_data
internal_control = lt_internal_control
communication = lt_communication
archivelink = lt_archivelink.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.