HCM BAPI RFC Used the same way in S/4HANA

BAPI_ABSENCE_CREATE Create Absence (Infotype 2001)

Creates an absence record (infotype 2001) such as leave or sickness for a personnel number and period. Leave request and time recording interfaces use it to post approved absences. Lock the employee with BAPI_EMPLOYEE_ENQUEUE, check RETURN for collisions with existing records, and unlock afterwards.

Function group
ABSE
Remote-enabled (RFC)
Yes
Type
BAPI

Importing parameters

ParameterTypeDescriptionRequired
EMPLOYEENUMBERBAPIP2001-PERNRPersonnel numberYes
VALIDITYBEGINBAPIP2001-BEGDAValid fromYes
VALIDITYENDBAPIP2001-ENDDAValid toYes
ABSENCETYPEBAPIP2001-AWARTAbsence typeYes
STARTBAPIP2001-BEGUZStart time—
ENDBAPIP2001-ENDUZEnd time—
ABSENCEHOURSBAPIP2001-STDAZAbsence hours—
NOCOMMITBAPI_STAND-NO_COMMITNo commit (caller commits)—

Exporting parameters

ParameterTypeDescription
RETURNBAPIRETURN1Return message
EMPLOYEENUMBERBAPIP2001-PERNRPersonnel number
SUBTYPEBAPIP2001-SUBTYSubtype
OBJECTIDBAPIP2001-OBJPSObject identification
LOCKINDICATORBAPIP2001-SPRPSLock indicator
VALIDITYBEGINBAPIP2001-BEGDAValid from
VALIDITYENDBAPIP2001-ENDDAValid to
RECORDNUMBERBAPIP2001-SEQNRRecord number

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_ABSENCE_CREATE'
  EXPORTING
    employeenumber = lv_employeenumber
    validitybegin = lv_validitybegin
    validityend = lv_validityend
    absencetype = lv_absencetype
  IMPORTING
    return = lv_return
    employeenumber = lv_employeenumber
    subtype = lv_subtype
    objectid = lv_objectid
    lockindicator = lv_lockindicator
    validitybegin = lv_validitybegin
    validityend = lv_validityend
    recordnumber = lv_recordnumber.

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.

Request a custom report