Search Results hr_gen
Overview
APPS.HR_API is one of the foundational utility packages within the Oracle E-Business Suite Human Resources (HRMS) schema. It is classified in the ETRM repository as an API package and is delivered under the APPS schema, with the package header carrying the version marker hrapiapi.pkh 120.0.12010000.1, consistent with the 12.1.1 and 12.2.2 code lines. The package supplies the common infrastructure upon which the majority of Oracle HRMS business APIs are built: a standard set of named exceptions, their associated Oracle error numbers established through PRAGMA EXCEPTION_INIT, a collection of constant system defaults, and reusable validation and retrieval utilities. The exception declarations include Object_Locked (-0054), Check_Integrity_Violated (-2290), Parent_Integrity_Violated (-2291), Child_Integrity_Violated (-2292), Unique_Integrity_Violated (-0001), and Cannot_Find_Prog_Unit (-6508). Constant definitions include the sentinel values g_varchar2 ('$Sys_Def$'), g_number (-987123654), and the "End Of Time" date g_eot (31-12-4712), as well as the standard API operation modes such as INSERT, UPDATE, DELETE, CORRECTION, FUTURE_CHANGE, and UPDATE_OVERRIDE. Because HR_API is referenced by 8,629 other packages, it functions as a shared dependency for virtually all HRMS datetrack and non-datetrack APIs.
Key Procedures and Functions
The ETRM metadata documents 35 procedures and functions in HR_API. Grouped by purpose:
- Error raising utilities: MANDATORY_ARG_ERROR, ARGUMENT_CHANGED_ERROR, and CANNOT_FIND_PROG_UNIT_ERROR raise the standard HRMS exceptions with consistent messaging.
- Environment and profile checks: HR_INSTALLED verifies that Oracle HRMS is installed in the current environment before dependent APIs execute.
- Identifier and context retrieval: RETURN_BUSINESS_GROUP_ID, RETURN_LOOKUP_CODE, RETURN_CONCAT_KF_SEGMENTS, and SET_SECURITY_GROUP_ID retrieve or establish the business group, lookup, key flexfield segment, and security group context required by downstream APIs.
- Validation routines: VALIDATE_BUS_GRP_ID and VALIDATE_COMMIT_UNIT validate their respective inputs before persistence.
- Lookup existence checks: NOT_EXISTS_IN_HR_LOOKUPS, NOT_EXISTS_IN_LEG_LOOKUPS, NOT_EXISTS_IN_HRSTANLOOKUPS, NOT_EXISTS_IN_FND_LOOKUPS, and their datetracked
_DT_counterparts (NOT_EXISTS_IN_DT_HR_LOOKUPS, NOT_EXISTS_IN_DT_LEG_LOOKUPS, NOT_EXISTS_IN_DT_HRSTANLOOKUPS, NOT_EXISTS_IN_DT_FND_LOOKUPS) confirm that a supplied lookup value is valid in the appropriate lookup type. - Miscellaneous helpers: STRIP_CONSTRAINT_NAME normalises database constraint names.
- Commit-unit handling: RETURN_COMMIT_UNIT and VALIDATE_COMMIT_UNIT — the routines the user searched for — supply and check the commit unit value used to partition concurrent processing of HRMS API work.
Tables Accessed
HR_API reads from a small set of reference tables through APPS synonyms. FND_PRODUCT_INSTALLATIONS is queried by HR_INSTALLED to confirm HRMS installation status. FND_LANGUAGES supports language and lookup resolution. FND_ID_FLEX_STRUCTURES and FND_ID_FLEX_SEGMENTS back RETURN_CONCAT_KF_SEGMENTS, which concatenates key flexfield segment values. HR_ORGANIZATION_INFORMATION provides business group and organisation attribute data for the business group retrieval and validation routines. DBMS_LOCK and DBMS_SESSION, Oracle-supplied packages rather than application tables, are used for lock management and session-level context (such as security group settings) respectively.
Usage Notes
HR_API is not intended as an end-user interface; it is called programmatically. Standard HRMS business APIs (for example, those in the HR_EMPLOYEE_API, HR_ORGANIZATION_API, and HR_LOCATION_API families) reference HR_API to raise consistent exceptions, validate lookup values, and resolve business group and security group context. Oracle Forms built on the HR_GEN library and the Forms 4 package HR_API expect the constant defaults to remain unchanged, so administrators must not alter constants such as g_eot or the operation-mode strings. Custom PL/SQL that invokes HRMS APIs should propagate the HR_API exceptions rather than defining replacements, and should call VALIDATE_COMMIT_UNIT and RETURN_COMMIT_UNIT when batching API calls in a concurrent or multithreaded context. In Oracle EBS 12.2.2, the package remains an APPS-owned dependency shipped with the HRMS product family.
-
PACKAGE: APPS.HR_API
12.1.1
-
PACKAGE: APPS.HR_API
12.2.2