# BAPI_ADDRESSEMP_GETDETAIL — Read Employee Address (Infotype 0006)

> Reads one address record (infotype 0006) by its full key and returns the address fields with country and region names. It is used by portals and interfaces that display or forward address data. The standard HR authorization check applies; check RETURN.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| EMPLOYEENUMBER | BAPIP0006-PERNR | Personnel number | Yes |
| SUBTYPE | BAPIP0006-SUBTY | Subtype | Yes |
| OBJECTID | BAPIP0006-OBJPS | Object identification | Yes |
| LOCKINDICATOR | BAPIP0006-SPRPS | Lock indicator | Yes |
| VALIDITYBEGIN | BAPIP0006-BEGDA | Valid from | Yes |
| VALIDITYEND | BAPIP0006-ENDDA | Valid to | Yes |
| RECORDNUMBER | BAPIP0006-SEQNR | Record number | Yes |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRETURN1 | Return message |
| ADDRESSTYPE | BAPIP0006-SUBTY | Address type |
| NAMEOFADDRESSTYPE | BAPIP0006-NAMEOFANSSA | Address type text |
| CONAME | BAPIP0006-NAME2 | c/o name |
| STREETANDHOUSENO | BAPIP0006-STRAS | Street and house number |
| SCNDADDRESSLINE | BAPIP0006-LOCAT | Second address line |
| CITY | BAPIP0006-ORT01 | City |
| DISTRICT | BAPIP0006-ORT02 | District |
| POSTALCODECITY | BAPIP0006-PSTLZ | Postal code |
| STATE | BAPIP0006-STATE | Region |
| NAMEOFSTATE | BAPIP0006-NAMEOFSTATE | Region text |
| COUNTRY | BAPIP0006-LAND1 | Country key |
| NAMEOFCOUNTRY | BAPIP0006-NAMEOFLAND1 | Country name |
| TELEPHONENUMBER | BAPIP0006-TELNR | Telephone number |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_ADDRESSEMP_GETDETAIL'
  EXPORTING
    employeenumber = lv_employeenumber
    subtype = lv_subtype
    objectid = lv_objectid
    lockindicator = lv_lockindicator
    validitybegin = lv_validitybegin
    validityend = lv_validityend
    recordnumber = lv_recordnumber
  IMPORTING
    return = lv_return
    addresstype = lv_addresstype
    nameofaddresstype = lv_nameofaddresstype
    coname = lv_coname
    streetandhouseno = lv_streetandhouseno
    scndaddressline = lv_scndaddressline
    city = lv_city
    district = lv_district
    postalcodecity = lv_postalcodecity
    state = lv_state.
```

## Related tables

PA0006

