Fonction SAP BAPI_ABSENCE_APPROVE - Unlock absence

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
EMPLOYEENUMBER BAPIP2001-PERNR N 8 Personnel number
LOCKINDICATOR BAPIP2001-SPRPS C 1 Lock indicator for HR master record
NOCOMMIT BAPI_STAND-NO_COMMIT C 1 X COMMIT Control at BAPI Interface
OBJECTID BAPIP2001-OBJPS C 2 Object identification
RECORDNUMBER BAPIP2001-SEQNR N 3 Number of Infotype Record
SUBTYPE BAPIP2001-SUBTY C 4 Subtype
VALIDITYBEGIN BAPIP2001-BEGDA D 8 Valid from date
VALIDITYEND BAPIP2001-ENDDA D 8 Valid to date

Paramètre Reférence Type Long. Description
RETURN BAPIRETURN1 u 470 Structure for return code


Caution! This API method only writes the Absences infotype (2001). Itshould no longer be used as it can lead to inconsistent time data.
Instead, please use the corresponding API method for business objectBUS7007.

Functionality
This method can be used to unlock an Absences infotype record(2001).
Together with the REQUEST method, it allows you to implement the"double verification principle" whereby at least two users are involvedin writing an active data record to the database. One of the userscreates a locked infotype record using the REQUEST method. Another userunlocks the record - that is, activates it using the APPROVE method.

Notes
Messages are returned in the RETURN parameter. The parameterdocumentation contains the return codes and their meanings.
The key fields used by the method are described under the parameters.
The method can only be used if the ENQUEUE method for the businessobject EMPLOYEE has already been called. For more information onthe ENQUEUE method, please see the documentation on the function moduleBAPI_EMPLOYEE_ENQUEUE.
For more information on the REQUEST method, please see thedocumentation on function module BAPI_ABSENCE_REQUEST.

Description
Return code of method

Value range
If an error occurs, the structure may contain the followinginformation:

  • Message type (field TYPE)

  • Message code (field CODE)

  • Message text (field MESSAGE)

  • If no errors occur, the field string is initial.

    Description
    For information on the meaning of the personnel number, please see therelevant data element documentation: Personnelnumber.

    Description
    For information on the meaning of the lock indicator for the HR masterrecord, please see the data element documentation: Lockindicator for HR master record.

    Description
    For information on the meaning of the COMMIT control, please see thedata element documentation: COMMIT control in BAPIinterface.

    Description
    For information on the meaning of the object ID, please see thecorresponding data element documentation: Objectidentification.

    Description
    For information on the meaning of the number of an infotype record withthe same key, see the data element documentation: Numberof infotype record with same key.

    Description
    For information on the meaning of the subtype, please see thecorresponding data element documentation: Subtype.