# 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.

- Modules: HCM
- Type: BAPI
- Function group: RH65
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-employee-getdata/

## 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)

```abap
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

PA0001, PA0002, PA0105

