Search Results create_or_update_rating_scale




Overview

APPS.HR_RATING_SCALES_API is a public PL/SQL API that manages rating scales within Oracle Human Resources. Rating scales define the ordered sets of rating levels used across Oracle EBS talent management, performance management, and compensation functionality — for example the "1–5" or "Outstanding–Unsatisfactory" scales attached to appraisal templates and competency assessments. The package exposes the standard create, update, delete, and create-or-update operations for the rating scale entity, together with the validation, date-tracking, and translation-handling logic that Oracle HRMS APIs apply consistently. It is classified as an API in the ETRM repository and is owned by APPS in both 12.1.1 and 12.2.2.

The header comment block records that the source is perscapi.pkb, version 120.0 (2005/05/31), indicating the package has remained stable across releases. The comment also notes that p_business_group_id was made optional to satisfy PA requirements, so rating scales may be created at the global (non-business-group-specific) level as well as for an individual business group.

Key Procedures and Functions

  • CREATE_RATING_SCALE — Creates a new rating scale. The declaration shows a wide parameter surface: language code (defaulting to the session language at runtime), a validate-only flag, effective date, name, type, default flag (defaulting to 'N'), optional business group, description, an attribute category plus twenty descriptive flexfield attribute columns, and an output rating scale identifier. The procedure validates the language parameter and derives an internal language code, allowing an IN OUT parameter to be passed through.
  • UPDATE_RATING_SCALE — Modifies the attributes of an existing rating scale, using the standard effective-date mechanism so that changes are date-tracked rather than destructive.
  • DELETE_RATING_SCALE — Removes an existing rating scale, subject to the API's own validation of dependent data.
  • CREATE_OR_UPDATE_RATING_SCALE — A convenience entry point that determines whether the supplied scale already exists and routes the transaction to the create or update path accordingly.

All four procedures follow the HRMS API conventions: a p_validate boolean that rolls back all work when true, an effective date for date-tracked entities, and error reporting through the standard HR API message mechanism.

Tables Accessed

  • PER_RATING_SCALES — the base table holding rating scale definitions; the primary insert, update, and delete target.
  • PER_RATING_SCALES_TL — the translation table storing the language-specific name and description of each scale; written alongside the base row for the requested language.
  • PER_RATING_LEVELS — the child table containing the individual levels belonging to a scale; referenced to validate the scale and to detect dependent rows before deletion.
  • FND_LOOKUP_VALUES — the Oracle Application Object Library lookup table; read to validate lookup-backed values such as the rating scale type. This is significant in the context of the searched term return_lookup_code, since lookup codes are the values returned from FND_LOOKUP_VALUES and are the codes validated by this API.

Usage Notes

The package is invoked by the Oracle HRMS setup forms that maintain rating scales, by concurrent programs that load or migrate HR setup data, and by custom PL/SQL that needs to create rating scales programmatically — for instance during a multi-organization or multi-business-group rollout. The recommended pattern is to call the API inside a PL/SQL block, passing p_validate = true first to confirm that all validation succeeds, then re-invoking with p_validate = false to commit. Because the API handles effective dating and translation rows, direct DML against PER_RATING_SCALES, PER_RATING_SCALES_TL, and PER_RATING_LEVELS should be avoided. The package is referenced by three other packages in the ETRM repository, confirming its role as the supported entry point for rating scale maintenance.