Ansicht
Dokumentation

HRHAP_DEQUEUE_OBJECT - Lock HR Objects

HRHAP_DEQUEUE_OBJECT - Lock HR Objects

PERFORM Short Reference   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This module realizes lock management in HR. It enables you to lock entire objects.

Objects that do not belong to Personnel Planning directly can only be locked using this module if the key is an eight-digit numeric key. If the object does not fulfill this prerequisite, the exception ILLEGAL_OTYPE is generated.

Such objects are first locked in Personnel Planning and then in the application to which this object belongs.

The parameter ENQUEUE_ONCE allows you to control whether locks accumulate for a particular object (is cumulatively locked) or whether despite several lock requests the object is only locked and unlocked once.

Example

Locking a Personnel Planning object:

call function 'HR_ENQUEUE_OBJECT'

EXPORTING

plvar = object-plvar otype = object-otype objid = object-objid ENQUEUE_ONCE = ' '

IMPORTING

LOCK_USER = user_owning_the_object

EXCEPTIONS

ENQUEUE_FAILED = 1 OBJID_IS_INITIAL = 2 ILLEGAL_OTYPE = 3 INTERNAL_ERROR = 4 OTHERS = 5.

Locking a person:

call function 'HR_ENQUEUE_OBJECT'

EXPORTING

plvar = ' ' otype = 'P ' objid = act_pernr ENQUEUE_ONCE = ' '

IMPORTING

LOCK_USER = user_owning_the_object

EXCEPTIONS

ENQUEUE_FAILED = 1 OBJID_IS_INITIAL = 2 ILLEGAL_OTYPE = 3 INTERNAL_ERROR = 4 OTHERS = 5.

Notes

If the object is already locked, the exception ENQUEUE_FAILED is generated and the name of the user who has locked the object is returned in parameter LOCK_USER.

Further information

The module performs checks as follows:

  1. If ENQUEUE_ONCE = 'X', the module checks whether the object is already locked. If this is the case, the module is exited.
  2. Validity check for OBJID
  3. Check external object types for NUMC8 key, check whether relationship can be inversed
  4. Lock object in Personnel Planning
  5. If necessary, lock object in external application. If this is not possible, unlock object in Personnel Planning and generate an exception.




Parameters

DEQUEUE_ONCE
OBJID
OTYPE
PLVAR

Exceptions

ILLEGAL_OTYPE
INTERNAL_ERROR
OBJID_IS_INITIAL

Function Group

HRHAP_C_A_GLOBAL

Addresses (Business Address Services)   CPI1466 during Backup  
This documentation is copyright by SAP AG.

Length: 2807 Date: 20240523 Time: 085101     sap01-206 ( 41 ms )