Search Results xla_cmp_create_pkg




Overview

XLA_CMP_CREATE_PKG is a private Oracle Subledger Accounting (XLA) package that provides the programmatic infrastructure for dynamically creating and modifying PL/SQL packages directly in the database. In the Oracle EBS 12.1.1 and 12.2.2 architectures, Subledger Accounting relies on generated database objects — particularly the accounting program packages that encapsulate application accounting definitions, journal line types, and account derivation rules. XLA_CMP_CREATE_PKG serves as the compile-and-deploy utility that converts stored package specifications and bodies into live database objects at runtime.

Because this is declared as an XLA private package, it is not intended as a public integration API. Its audience is internal XLA processing logic, such as the Accounting Program Generation and Subledger Accounting Program flows, which construct source text for generated packages and then require it to be persisted and compiled without manual DBA intervention. The package encapsulates the DDL and dynamic SQL semantics needed to accomplish this through DBMS_SQL.

Key Procedures and Functions

  • CreateSpecPackage — Accepts a product rule name, a package name, and the package specification text, and creates the package specification in the database. It returns a BOOLEAN indicating success or failure, allowing the caller to handle compilation outcomes.
  • CreateBodyPackage — Parallel to the specification function, it accepts a product rule name, package name, and package body text, and creates the package body. Together with CreateSpecPackage it enables the full lifecycle of generating, persisting, and compiling generated PL/SQL units.
  • Push_Database_Object — Added in June 2004, this routine pushes (executes) a database object definition through dynamic SQL. The 18-JUN-2004 revision changed its parameter mode from IN OUT to IN, indicating the object/DDL text is treated as read-only input during deployment. This is the procedure most directly associated with the search term "push_database_object."
  • Execute_Dml — Added alongside Push_Database_Object in June 2004, this procedure performs dynamic DML execution, giving XLA a controlled mechanism to run generated SQL statements from within the package creation workflow.

All four documented routines are classified as public within the package specification, though the package as a whole remains an XLA-private utility.

Tables Accessed

  • USER_OBJECTS — Queried to determine whether a target object (package specification or body) already exists, so the package can decide between creation, replacement, or recompilation.
  • USER_SOURCE — Read to retrieve existing source text, typically to compare or validate against the newly supplied package text before deployment.
  • USER_ERRORS — Inspected after compilation to detect and surface PL/SQL compilation errors, enabling error reporting consistent with the XLA exception framework (G_STANDARD_MESSAGE and G_OA_MESSAGE).
  • DBMS_SQL — Referenced via APPS synonym to parse and execute the dynamically generated DDL and DML statements.
  • PLITBLM — Used to process source text as a PL/SQL table of lines, supporting the multi-line assembly of package specifications and bodies.

Usage Notes

XLA_CMP_CREATE_PKG is invoked programmatically rather than from a standard EBS form, typically during Subledger Accounting setup activity such as generating accounting program packages from application accounting definitions. It is referenced by three other packages, confirming its role as a shared internal utility within the XLA module.

Because it performs DDL and dynamic DML, callers must have appropriate privileges and should invoke it only within controlled XLA processing contexts. Custom code should not depend on this package directly, as its interface and behavior are private and subject to change across EBS point releases. For diagnosing issues with "push_database_object," DBAs and developers should review concurrent request logs generated during accounting program generation, and verify that USER_ERRORS returns no compilation failures for the target package.