Search Results pos_debug_trace
Overview
APPS.POS_BULKLOAD_ENTITIES is a PL/SQL package body in Oracle E-Business Suite that provides the server-side engine for the bulk import of "entities" into the Procurement/Supplier and Trading Community Model (TCA) data model. Its primary business function is to process staged interface records — supplier header and site information, party records, and user-defined attribute (descriptive flexfield) values — and to bulk-load them into the corresponding base tables while recording processing status and errors. The package is classified as OTHER under the ETRM API classification scheme and resides in the APPS schema.
The header comment ($Header: POSSBLKB.pls 120.6.12020000.2 2013/04/11 02:49:23 liawei ship $) confirms the file is POSSBLKB.pls, and the .12020000.2 version identifier indicates it was maintained through the 12.2 release family, so it is shipped in both 12.1.1 and 12.2.2. The package maintains process-state constants that drive a rows-uploaded workflow: G_PS_TO_BE_PROCESSED (1), G_PS_IN_PROCESS (2), G_PS_GENERIC_ERROR (3), and G_PS_SUCCESS (4), with G_DATA_ROWS_UPLOADED_NEW (0) representing the initial state. A constant G_RETCODE_SUCCESS_WITH_WARNING ('W') indicates that the engine distinguishes partial success from outright failure.
The package is characterized by a heavy diagnostic and logging infrastructure. Global variables capture the concurrent request ID, program application ID, program ID, user name, user ID, and login ID from FND_GLOBAL, and a G_DEBUG flag is derived from the POS_DEBUG_TRACE profile option. This logging framework is what supports the WRITE_CONCLOG interface referenced in common troubleshooting searches.
Key Procedures and Functions
- SETUP_BULKLOAD_INTF — Establishes the interface context for a bulk-load run, initializing the staging structures and control values used by subsequent processing steps.
- OPEN_DEBUG_SESSION and OPEN_DEBUG_SESSION_INTERNAL — Public and internal entry points for starting a debug/logging session. The internal variant performs the actual session initialization, while the public wrapper exposes the behavior to callers.
- DEVELOPER_DEBUG — Provides developer-oriented diagnostic output, controlled by the debug profile setting.
- CLOSE_DEBUG_SESSION — Terminates the logging session and flushes/closes the associated log output.
- WRITE_CONCLOG — The concurrent-program logging routine. It writes diagnostic and progress messages to the concurrent request log, allowing a Java concurrent program to continue appending to the same error log file (as noted in the source comment concerning the Java concurrent program).
- LOAD_USERATTR_INTF — Loads user-defined attribute (descriptive flexfield / DFF) interface rows into the bulk-load interface table.
- PROCESS_USER_ATTRS_DATA — Processes the staged user-attribute data, validating and applying it to the target entity records.
- BULKLOADENTITIES — The primary driver procedure. It orchestrates the end-to-end bulk load of entity records, managing the process-state transitions and error capture.
- LOAD_PARTY_INTF — Loads party (HZ_PARTIES) interface records for bulk processing within the TCA model.
Tables Accessed
- AP_SUPPLIERS, AP_SUPPLIERS_INT, AP_SUPPLIER_SITES_ALL — Supplier and supplier-site base and interface tables for vendor bulk import.
- HZ_IMP_PARTIES_INT, HZ_PARTY_SITES — TCA party import interface and party-site tables.
- EGO_BULKLOAD_INTF — The central staging table (
G_ERROR_TABLE_NAME) holding rows to be bulk-loaded and their error state. - EGO_RESULTS_FMT_USAGES — Stores format/usage metadata associated with bulk-load results.
- POS_SUPP_PROF_EXT_INTF — Supplier profile extension interface table for additional supplier attributes.
- FND_USER — Source for
G_USER_NAMEand responsible-user resolution. - DBMS_SQL, PLITBLM, V$PARAMETER — Dynamic SQL execution, PL/SQL index-by table handling, and parameter inspection used by the package internals.
Usage Notes
The package is designed primarily for invocation from a concurrent program — the internal comment explicitly addresses a Java concurrent program appending to the same error log file — and process-state constants map directly to concurrent request phases and statuses. The WRITE_CONCLOG routine is the standard mechanism for surfacing diagnostics into the concurrent manager log, and it is commonly referenced during troubleshooting of bulk-load runs. Debug output is gated by the POS_DEBUG_TRACE profile option, so tracing should be enabled at the site or user level before reproducing an issue. The package is referenced by one other package, indicating it functions as a shared service within the supplier/TCA bulk-loading subsystem rather than being called from Oracle Forms directly. Custom extensions should invoke the documented procedures in the intended order — setup, load, process, and session close — and treat the state constants as the authoritative status model.