Search Results populate_context
Overview
PQH_GEN_FORM is an internal-use PL/SQL package in the APPS schema that provides generic form support functionality for the Oracle E-Business Suite Public Sector/HR (PQH) product family. Based on its header comments, the package was created by Sanej Nair and has existed since at least version 115.1 (February 2000), with the current declaration carrying the $Header identifier pqgnfnf.pkh 115.12 dated 27-Nov-2002. The package is declared AUTHID CURRENT_USER, meaning its SQL executes under the privileges of the invoking user rather than the definer.
At a structural level, PQH_GEN_FORM defines two PL/SQL record types — v_type (column_alias, ddf_column_name, changeable_column_name) and v_r_type (vset_id, code, meaning) — plus corresponding index-by tables v_tab and v_t_tab. These are exposed as global tables g_attrib_tab and g_vset_tab, along with global scalars g_count, g_msg, g_start_with, g_initial_value, g_context, g_gbl_context, g_txn_name, and g_txn_id. In business terms, the package supports the configuration and execution of "copy entity" operations — the mechanism by which HR/PQH setups and transactional data are replicated between contexts, business groups, or legislative environments.
Key Procedures and Functions
ETRM documents 25 procedures and functions. The most commonly referenced — and the object of the "count_source" search — include:
- COUNT_SOURCE — Returns the count of source rows/records selected for a copy-entity operation, typically used to drive progress indicators or validate that a source dataset exists before copying.
- RECOUNT_SOURCE — Re-executes the source count, supporting refresh after filter or selection changes within the generic form.
- DELETE_SOURCE — Removes source-side rows associated with the current copy operation.
- CREATE_SOURCE — Creates a source record (a row in PQH_COPY_ENTITY_TXNS) for later replication.
- UPDATE_SOURCE — Updates an existing source record's attributes.
- CREATE_TARGET — Creates the target-side record resulting from the copy.
- POPULATE_PREFS / POPULATE_CONTEXT — Populate the global preference and context variables (
g_context,g_gbl_context) used throughout the session. - FLIP_SELECTION — Toggles selection state on generic form rows.
- GET_VALUE_FROM_ID, GET_ID_FROM_VALUE, GET_SQL_FROM_VSET_ID — Flexfield value-set helpers that translate between IDs and display values, and generate the SQL for a value set.
- GET_LEGISLATION_CODE, GET_ALR, GET_TRANSACTION_TYPE, CHK_TRANSACTION_CATEGORY — Retrieve legislative/legal context and validate transaction category codes against PQH_TRANSACTION_CATEGORIES.
- GET_LOOK, MY_CON, KF — Utility lookups and internal helpers.
- CHECK_ID_FLEX_STRUCT — Validates key flexfield structure IDs against FND_COMPILED_ID_FLEX_STRUCTS / FND_ID_FLEX_STRUCTURES.
Tables Accessed
The package reads and writes PQH_COPY_ENTITY_ATTRIBS, PQH_COPY_ENTITY_CONTEXTS, PQH_COPY_ENTITY_FUNCTIONS, PQH_COPY_ENTITY_PREFS, PQH_COPY_ENTITY_RESULTS, and PQH_COPY_ENTITY_TXNS — the core tables that store copy-entity configuration, attributes, transaction headers, and results. It reads PQH_TRANSACTION_CATEGORIES and PQH_ATTRIBUTES for transaction type and attribute metadata, and references FND_APPLICATION, FND_RESPONSIBILITY, and FND_SESSIONS for runtime session and responsibility context. Flexfield lookups draw on FND_FLEX_VALUE_SETS, FND_ID_FLEX_SEGMENTS, FND_ID_FLEX_STRUCTURES, and FND_COMPILED_ID_FLEX_STRUCTS. All access occurs through APPS synonyms.
Usage Notes
PQH_GEN_FORM is classified as Internal Use Only and is not a published public API. It is invoked from generic Oracle Forms within the PQH application, particularly the copy-entity configuration and execution screens, and is referenced by one other package in the ETRM object graph. Because it relies on global package state (g_context, g_attrib_tab, g_vset_tab), it assumes a single-user form session and should not be called concurrently from shared server processes. Customizations should not call these procedures directly; instead, use the supported Public Sector APIs. When troubleshooting copy-entity behavior in 12.1.1 or 12.2.2, COUNT_SOURCE and RECOUNT_SOURCE are typically the first procedures instrumented to determine whether the source query returns the expected row set.
-
PACKAGE: APPS.PQH_GEN_FORM
12.1.1
-
PACKAGE BODY: APPS.PQH_CBR_ENGINE
12.1.1
-
PACKAGE: APPS.PQH_GEN_FORM
12.2.2
-
PACKAGE BODY: APPS.PQH_CBR_ENGINE
12.2.2
-
APPS.PQH_GEN_FORM dependencies on PQH_COPY_ENTITY_TXNS
12.2.2
-
APPS.PQH_CBR_ENGINE dependencies on PQH_REFRESH_DATA
12.2.2
-
APPS.PQH_GEN_FORM dependencies on PQH_COPY_ENTITY_TXNS
12.1.1
-
APPS.PQH_CBR_ENGINE dependencies on PQH_REFRESH_DATA
12.1.1
-
PACKAGE BODY: APPS.PQH_GEN_FORM
12.2.2
-
PACKAGE BODY: APPS.PQH_GEN_FORM
12.1.1
-
APPS.PQH_CBR_ENGINE dependencies on HR_UTILITY
12.1.1
-
APPS.PQH_CBR_ENGINE dependencies on HR_UTILITY
12.2.2