Search Results g_appl_id




Overview

The APPS.BIL_DO_L1_BASE_GRP_PKG package body is part of the Oracle E-Business Suite Demand Planning / Demand Signal Repository layer associated with the BIL (Bilateral / Demand Planning) product family. Its principal business function is to build and populate the Level 1 base sales-group aggregation hierarchy used by downstream demand planning and hierarchical aggregation logic. The package flattens and denormalizes group hierarchy data into a staging table, BIL_DO_L1_BASE_GRP_TEMP, so that higher-level groups roll up correctly from their lowest-level children.

The package header declares a set of internal global variables and helper procedures that support this aggregation, including G_Debug, G_Trace, G_Degree, and the standard WHO/concurrent-program identifiers G_request_id, G_appl_id, G_program_id, G_user_id, and G_login_id. The presence of G_appl_id reflects the recurring EBS requirement to capture the application identifier of the concurrent request for auditing and multitenancy purposes within the FND/WHO framework. Supporting private procedures include Truncate_Table, Set_Table_Usages, Init_Globals, Insert_Parent_Data, Insert_Hirarchial_Data, Insert_From_Denorm, and Reset_Table_Usages.

Key Procedures and Functions

  • COLLECT_TEMP_DATA — The single documented public procedure. It inserts data into the hierarchy level equal to the value of the profile option BIL_DO_L1_GRP_AGGR_LVL. It accepts error buffer and return code OUT parameters, a parallel degree, and debug/trace mode flags. Internally it opens a cursor (lvl_cur) that reads child_sales_group_id and Hier_level from bil_do_l1_base_grp_temp and drives the hierarchical insertion steps.
  • Insert_Parent_Data — Seeds parent-level rows into the temporary aggregation table.
  • Insert_Hirarchial_Data — Recursively inserts hierarchical data given a group identifier, level, and parallel degree.
  • Insert_From_Denorm — Populates rows from the denormalized source for a specified level and degree.
  • Init_Globals, Truncate_Table, Set_Table_Usages, Reset_Table_Usages — Utility procedures that initialize WHO globals, clear staging data, and manage table usage settings around the load.

Tables Accessed

  • BIL_DO_L1_BASE_GRP_TEMP — The primary staging table. The package truncates, reads, and inserts into it to construct the Level 1 base group hierarchy.
  • DBMS_STATS — Referenced via APPS synonym for statistics gathering on the staging table, supporting efficient aggregation performance during parallel processing.

Usage Notes

BIL_DO_L1_BASE_GRP_PKG.COLLECT_TEMP_DATA is typically invoked from a concurrent program in the Demand Planning responsibility, where the WHO globals (G_request_id, G_appl_id, G_program_id, G_user_id, G_login_id) are populated by the concurrent manager. It may also be called from custom PL/SQL code that performs hierarchical group rollups. The p_degree parameter enables parallel execution, and the debug/trace flags govern whether a diagnostic log is written. The package is self-contained and is not referenced by other packages in the documented metadata, indicating it is an entry-point package rather than a shared library.