Search Results per_job_definition




Overview

APPS.HR_JOB_API is the public PL/SQL API that governs the creation and maintenance of job definitions within Oracle E-Business Suite Human Resources. A "job" in EBS represents a generic work role, such as "Senior Accountant" or "Warehouse Supervisor," and serves as the container for valid grade assignments, job groups, and work structures used throughout the HRMS suite. The package encapsulates the date-effective logic that Oracle HRMS requires, ensuring that inserts into the base PER_JOBS table, the translated PER_JOBS_S table, and the related job definition flexfield rows remain synchronized and that valid grade relationships are maintained whenever the effective start or end date of a job is changed.

The package body uses a standard error-handling convention, prefixing messages with the package name stored in g_package and using the constants c_date_from and c_date_to to signal which date attribute triggered a maintenance-mode operation. The header comment in the source (pejobapi.pkb, version 120.0.12010000.1) indicates this is a long-standing public API that has remained stable across the 11i and R12 releases, including 12.1.1 and 12.2.2.

Key Procedures and Functions

  • CREATE_JOB — Inserts a new job definition, creating the date-effective job row and the associated job definition flexfield entry. This is the standard entry point for adding a job programmatically.
  • UPDATE_JOB — Modifies an existing job, including changes to its effective dates or end date, invoking internal maintenance logic to keep dependent records consistent.
  • DELETE_JOB — Removes a job definition, respecting referential integrity with valid grades and other dependent work structures.
  • GET_NEXT_SEQUENCE — Returns the next sequence value used when generating job identifiers or ordering within the job hierarchy.
  • GET_JOB_FLEX_STRUCTURE — Retrieves the descriptive flexfield structure definition applicable to job definitions, allowing callers to determine which segments are available.
  • UPDATE_VALID_GRADES — Maintains the PER_VALID_GRADES relationships when a job's effective or end dates change.
  • DELETE_VALID_GRADES — Removes valid grade assignments that no longer fall within the job's effective date range.

The private procedure maintain_valid_grades supports UPDATE_VALID_GRADES and DELETE_VALID_GRADES. When the job date effective is updated, valid grades with an earlier date-to are deleted, and grades spanning the new effective date have their date-from reset. The same logic applies in reverse when the job end date changes.

Tables Accessed

  • PER_JOBS / PER_JOBS_S — The base and translated job definition tables, read and written by the create, update, and delete operations.
  • PER_JOB_DEFINITIONS — Stores the descriptive flexfield definition rows for jobs; this is the table associated with the per_job_definition search term and is populated through the job definition flexfield handling in this API.
  • PER_VALID_GRADES — Holds the job-to-grade validity relationships managed by the valid grade procedures.
  • PER_GRADES — Validated against when grade relationships are created or removed.
  • PER_JOB_GROUPS — Job group membership validated during job maintenance.
  • FND_ID_FLEX_SEGMENTS — Read by GET_JOB_FLEX_STRUCTURE to return segment information for the job flexfield.

Usage Notes

HR_JOB_API is the supported interface for external and internal callers that need to manipulate jobs without writing directly to the PER_JOBS tables. It is referenced by five other packages, reflecting its role as a lower-level building block for work structure and grade management APIs. Typical invocations originate from the Job form (PERWSJOB), from concurrent programs that load job data, and from custom PL/SQL that must respect date-effective and translation rules. Direct DML against PER_JOBS is discouraged precisely because the API coordinates the base table, the translated table, the job definition flexfield, and the valid grade maintenance logic that a manual insert would bypass.