Search Results update_imp_headers
Overview
CN_IMPORT_PVT is a private PL/SQL package body in the Oracle EBS APPS schema that supports the Oracle Channel Revenue Management (also delivered as part of Oracle Trade Management / ETRM) import subsystem. Its purpose is to orchestrate the movement of channel and trade management data from external flat files into the interface and staging structures of the application, and ultimately into the destination transactional tables. The package serves as the private implementation layer behind the public import APIs, encapsulating the loading, staging, and error-handling logic that the concurrent programs invoke.
The package name carries the "_PVT" suffix, indicating that it is internal and not intended to be called directly by external integrations; callers are expected to use the public wrapper package. It is referenced by eight other packages within the EBS data model, confirming its role as a shared internal utility for import processing.
Key Procedures and Functions
The documented package exposes the following procedures and functions:
- IMPORT_DATA — The main driver program. It is described as the primary entry point that calls all the concurrent programs responsible for transferring data from the datafile into the stage table and then into the destination tables. It follows the standard EBS API parameter convention, including API version, initialization of the message list, commit control, validation level, and standard return status / message count / message data out parameters.
- EXPORT_DATA — Handles the outbound side of the import framework, extracting or writing data for external consumption.
- CLIENT_STAGE_DATA — Performs staging of data on the client or middle-tier side prior to server-side processing.
- SERVER_STAGE_DATA — Performs the corresponding staging of data on the database server tier.
- LOAD_DATA — Loads staged records into the destination application tables.
- UPDATE_IMP_HEADERS — Updates the import header records in CN_IMP_HEADERS, typically to reflect processing status, batch identifiers, or completion state for the import run identified by the header.
- UPDATE_IMP_LINES — Updates the corresponding line-level records in CN_IMP_LINES.
- BUILD_ERROR_REC — Constructs an error record capturing validation or load failures encountered during processing.
- WRITE_ERROR_REC — Persists the constructed error record to the error or audit table for later review and correction.
The source excerpt also documents additional internal utilities, including the function get_imp_type_code, which derives the import type code from CN_IMP_HEADERS, and the procedure upd_impline_recnum, an autonomous-transaction routine that renumbers CN_IMP_LINES records sequentially by IMP_LINE_ID for a given header.
Tables Accessed
The package reads and writes the following documented tables:
- CN_IMP_HEADERS — Stores import header-level control and status information; read for import type resolution and updated by UPDATE_IMP_HEADERS.
- CN_IMP_LINES — Stores import line-level detail; renumbered and updated by UPDATE_IMP_LINES and upd_impline_recnum.
- CN_IMPORT_TYPES — Defines the valid import types that govern how a batch is processed.
- CN_IMP_MAPS and CN_IMP_MAP_FIELDS — Define the mapping between source file columns and destination table columns, driving the staging and load logic.
- CN_PROCESS_AUDITS — Records processing audit information for the import run.
- PLITBLM — The PL/SQL interface table (a global temporary table) used for bulk data transfer between client and server, referenced by CLIENT_STAGE_DATA and SERVER_STAGE_DATA.
Usage Notes
CN_IMPORT_PVT is invoked indirectly through the concurrent programs and public APIs of the channel/trade management import flow. Users typically launch an import concurrent request from an application form, supplying the datafile and import type; the concurrent program then calls the public layer, which delegates to this private package to stage, load, and validate the data. Because the UPDATE_IMP_HEADERS procedure and its siblings maintain processing status and error records, the package is central to transactional integrity of the import cycle.
Custom integrations should not call the _PVT procedures directly. Instead, they should use the documented public APIs and honour the standard FND_API conventions for message list initialization, commit control, and validation levels. Note that upd_impline_recnum runs in an autonomous transaction and issues its own COMMIT, so its effects are committed independently of the caller's transaction scope.
-
APPS.CN_IMPORT_PVT SQL Statements
12.1.1
-
APPS.CN_IMPORT_PVT SQL Statements
12.2.2
-
PACKAGE BODY: APPS.CN_IMPORT_PVT
12.2.2
-
PACKAGE BODY: APPS.CN_IMPORT_PVT
12.1.1
-
PACKAGE: APPS.CN_IMPORT_PVT
12.2.2
-
PACKAGE: APPS.CN_IMPORT_PVT
12.1.1
-
PACKAGE BODY: APPS.CN_IMP_REV_CL_PVT
12.2.2
-
PACKAGE BODY: APPS.CN_IMP_REV_CL_PVT
12.1.1
-
APPS.CN_IMPORT_PVT dependencies on FND_MESSAGE
12.2.2
-
APPS.CN_IMPORT_PVT dependencies on FND_MESSAGE
12.1.1
-
APPS.CN_IMPORT_PVT dependencies on CN_MESSAGE_PKG
12.2.2
-
APPS.CN_IMPORT_PVT dependencies on CN_MESSAGE_PKG
12.1.1
-
APPS.CN_IMPORT_PVT dependencies on FND_API
12.2.2
-
APPS.CN_IMPORT_PVT dependencies on FND_API
12.1.1
-
APPS.CN_IMP_REV_CL_PVT dependencies on CN_IMPORT_PVT
12.1.1
-
PACKAGE BODY: APPS.CN_IMP_TRXAPI_PVT
12.1.1
-
APPS.CN_IMP_REV_CL_PVT dependencies on CN_IMPORT_PVT
12.2.2
-
APPS.CN_IMPORT_PVT dependencies on CN_IMP_HEADERS
12.1.1
-
APPS.CN_IMPORT_PVT dependencies on CN_IMP_HEADERS
12.2.2
-
PACKAGE BODY: APPS.CN_IMP_TRXAPI_PVT
12.2.2
-
APPS.CN_IMPORT_PVT dependencies on CN_IMP_LINES
12.1.1
-
APPS.CN_IMPORT_PVT dependencies on CN_IMP_LINES
12.2.2
-
PACKAGE BODY: APPS.CN_IMP_HIERARCHY_PVT
12.1.1
-
PACKAGE BODY: APPS.CN_IMP_HIERARCHY_PVT
12.2.2
-
APPS.CN_IMPORT_PVT dependencies on FND_MSG_PUB
12.1.1
-
APPS.CN_IMPORT_PVT dependencies on FND_MSG_PUB
12.2.2
-
APPS.CN_IMP_HIERARCHY_PVT dependencies on CN_IMPORT_PVT
12.2.2
-
APPS.CN_IMP_HIERARCHY_PVT dependencies on CN_IMPORT_PVT
12.1.1
-
APPS.CN_CALC_SQL_EXPS_PVT dependencies on CN_IMPORT_PVT
12.1.1
-
APPS.CN_CALC_SQL_EXPS_PVT dependencies on CN_IMPORT_PVT
12.2.2
-
APPS.CN_IMPORT_PVT dependencies on STANDARD
12.1.1
-
APPS.CN_IMPORT_PVT dependencies on STANDARD
12.2.2
-
APPS.CN_IMP_TRXAPI_PVT dependencies on CN_IMPORT_PVT
12.2.2
-
PACKAGE BODY: APPS.CN_CALC_SQL_EXPS_PVT
12.1.1
-
PACKAGE BODY: APPS.CN_CALC_SQL_EXPS_PVT
12.2.2
-
APPS.CN_IMP_TRXAPI_PVT dependencies on CN_IMPORT_PVT
12.1.1