# BAPI_ABSENCE_DELETE — Delete Absence (Infotype 2001)

> Deletes an absence record (infotype 2001) identified by its full key. Leave interfaces call it when a request is cancelled after it was posted. Lock the employee first and check RETURN; payroll-relevant past periods may trigger retroactive accounting.

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

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| EMPLOYEENUMBER | BAPIP2001-PERNR | Personnel number | Yes |
| SUBTYPE | BAPIP2001-SUBTY | Subtype | Yes |
| OBJECTID | BAPIP2001-OBJPS | Object identification | Yes |
| LOCKINDICATOR | BAPIP2001-SPRPS | Lock indicator | Yes |
| VALIDITYBEGIN | BAPIP2001-BEGDA | Valid from | Yes |
| VALIDITYEND | BAPIP2001-ENDDA | Valid to | Yes |
| RECORDNUMBER | BAPIP2001-SEQNR | Record number | Yes |
| NOCOMMIT | BAPI_STAND-NO_COMMIT | No commit (caller commits) | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| RETURN | BAPIRETURN1 | Return message |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_ABSENCE_DELETE'
  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.
```

## Related tables

PA2001

