DBA Data[Home] [Help]

APPS.XLA_AAD_MERGE_ANALYSIS_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 37

C_MERGE_IMPACT_UPDATED   CONSTANT VARCHAR2(30):= 'UPDATED';
Line: 39

C_MERGE_IMPACT_DELETED   CONSTANT VARCHAR2(30):= 'DELETED';
Line: 56

g_num_updated_props INTEGER;
Line: 57

g_updated_props     xla_amb_updated_prop_tbl_type := xla_amb_updated_prop_tbl_type();
Line: 58

g_num_updated_comps INTEGER;
Line: 59

g_updated_comps     xla_amb_updated_comp_tbl_type := xla_amb_updated_comp_tbl_type();
Line: 114

    SELECT *
      FROM xla_appli_amb_contexts
     WHERE application_id   = g_application_id
       AND amb_context_code = g_amb_context_code
    FOR UPDATE OF application_id NOWAIT;
Line: 159

  DELETE FROM xla_amb_updated_comps
        WHERE application_id   = g_application_id
          AND amb_context_code = g_amb_context_code;
Line: 256

PROCEDURE record_updated_property
(p_component_type          VARCHAR2
,p_component_key           VARCHAR2
,p_property                VARCHAR2
,p_old_value               VARCHAR2
,p_new_value               VARCHAR2
,p_lookup_type             VARCHAR2)
IS
  l_prop      xla_amb_updated_prop_rec_type :=
       xla_amb_updated_prop_rec_type (null, null, null, null, null, null, null
                                     ,null, null, null, null, null, null);
Line: 271

    l_log_module := C_DEFAULT_MODULE||'.record_updated_property';
Line: 275

    trace(p_msg    => 'BEGIN of function record_updated_property',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 309

  g_num_updated_props := g_num_updated_props+1;
Line: 310

  g_updated_props.extend;
Line: 311

  g_updated_props(g_num_updated_props) := l_prop;
Line: 314

    trace(p_msg    => 'END of function record_updated_property',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 325

END record_updated_property;
Line: 332

PROCEDURE record_updated_property
(p_component_type          VARCHAR2
,p_component_key           VARCHAR2
,p_property                VARCHAR2
,p_old_value               VARCHAR2
,p_new_value               VARCHAR2)
IS
  l_log_module             VARCHAR2(240);
Line: 342

    l_log_module := C_DEFAULT_MODULE||'.record_updated_property';
Line: 345

  record_updated_property
          (p_component_type => p_component_type
          ,p_component_key  => p_component_key
          ,p_property       => p_property
          ,p_old_value      => p_old_value
          ,p_new_value      => p_new_value
          ,p_lookup_type    => NULL);
Line: 359

END record_updated_property;
Line: 367

PROCEDURE record_updated_value
(p_component_type          VARCHAR2
,p_component_key           VARCHAR2
,p_property                VARCHAR2
,p_old_value               VARCHAR2
,p_old_source_app_id       INTEGER
,p_old_source_type_code    VARCHAR2
,p_old_source_code         VARCHAR2
,p_new_value               VARCHAR2
,p_new_source_app_id       INTEGER
,p_new_source_type_code    VARCHAR2
,p_new_source_code         VARCHAR2)
IS
  l_prop      xla_amb_updated_prop_rec_type :=
       xla_amb_updated_prop_rec_type (null, null, null, null, null, null, null
                                     ,null, null, null, null, null, null);
Line: 387

    l_log_module := C_DEFAULT_MODULE||'.record_updated_value';
Line: 391

    trace(p_msg    => 'BEGIN of function record_updated_value',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 441

  g_num_updated_props := g_num_updated_props+1;
Line: 442

  g_updated_props.extend;
Line: 443

  g_updated_props(g_num_updated_props) := l_prop;
Line: 446

    trace(p_msg    => 'END of function record_updated_value',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 457

END record_updated_value;
Line: 465

PROCEDURE record_updated_source
(p_component_type          VARCHAR2
,p_component_key           VARCHAR2
,p_property                VARCHAR2
,p_old_source_app_id       INTEGER
,p_old_source_type_code    VARCHAR2
,p_old_source_code         VARCHAR2
,p_new_source_app_id       INTEGER
,p_new_source_type_code    VARCHAR2
,p_new_source_code         VARCHAR2)
IS
  l_log_module             VARCHAR2(240);
Line: 479

    l_log_module := C_DEFAULT_MODULE||'.record_updated_source';
Line: 482

  record_updated_value
            (p_component_type          => p_component_type
            ,p_component_key           => p_component_key
            ,p_property                => p_property
            ,p_old_value               => NULL
            ,p_old_source_app_id       => p_old_source_app_id
            ,p_old_source_type_code    => p_old_source_type_code
            ,p_old_source_code         => p_old_source_code
            ,p_new_value               => NULL
            ,p_new_source_app_id       => p_new_source_app_id
            ,p_new_source_type_code    => p_new_source_type_code
            ,p_new_source_code         => p_new_source_code);
Line: 501

END record_updated_source;
Line: 509

PROCEDURE record_updated_component
(p_parent_component_type          VARCHAR2
,p_parent_component_key           VARCHAR2
,p_component_type                 VARCHAR2
,p_component_key                  VARCHAR2
,p_merge_impact                   VARCHAR2
,p_event_class_code               VARCHAR2 DEFAULT NULL
,p_event_type_code                VARCHAR2 DEFAULT NULL
,p_component_appl_id              NUMBER   DEFAULT NULL
,p_component_owner_code           VARCHAR2 DEFAULT NULL
,p_component_code                 VARCHAR2 DEFAULT NULL
,p_parent_component_owner_code    VARCHAR2 DEFAULT NULL
,p_parent_component_code          VARCHAR2 DEFAULT NULL
,p_property                       VARCHAR2 DEFAULT NULL
,p_old_value                      VARCHAR2 DEFAULT NULL
,p_lookup_type                    VARCHAR2 DEFAULT NULL)
IS
  l_comp      xla_amb_updated_comp_rec_type :=
              xla_amb_updated_comp_rec_type (null, null, null, null, null, null
                                           , null, null, null, null, null, null
                                           , null, null, null, null, null, null);
Line: 534

    l_log_module := C_DEFAULT_MODULE||'.record_updated_component';
Line: 538

    trace(p_msg    => 'BEGIN of function record_updated_component',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 571

  g_num_updated_comps := g_num_updated_comps+1;
Line: 572

  g_updated_comps.extend;
Line: 573

  g_updated_comps(g_num_updated_comps) := l_comp;
Line: 576

    trace(p_msg    => 'END of function record_updated_component',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 587

END record_updated_component;
Line: 641

PROCEDURE record_updated_aad
(p_product_rule_type_code     VARCHAR2
,p_product_rule_code          VARCHAR2
,p_merge_impact               VARCHAR2)
IS
  l_key                    VARCHAR2(240);
Line: 650

    l_log_module := C_DEFAULT_MODULE||'.record_updated_aad';
Line: 654

    trace(p_msg    => 'BEGIN of function record_updated_aad: '||
                      'p_product_rule_type_code = '||p_product_rule_type_code||
                      ', p_product_rule_code = '||p_product_rule_code||
                      ', p_merge_impact = '||p_merge_impact,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 666

    record_updated_component
            (p_parent_component_type => 'APPLICATION'
            ,p_parent_component_key  => g_application_id
            ,p_component_type        => 'AMB_AAD'
            ,p_component_key         => l_key
            ,p_merge_impact          => p_merge_impact
            ,p_component_owner_code  => p_product_rule_type_code
            ,p_component_code        => p_product_rule_code);
Line: 677

    trace(p_msg    => 'END of function record_updated_aad',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 688

END record_updated_aad;
Line: 696

PROCEDURE record_updated_header_assgn
(p_product_rule_type_code     VARCHAR2
,p_product_rule_code          VARCHAR2
,p_event_class_code           VARCHAR2
,p_event_type_code            VARCHAR2
,p_merge_impact               VARCHAR2)
IS
  l_key                    VARCHAR2(240);
Line: 707

    l_log_module := C_DEFAULT_MODULE||'.record_updated_header_assgn';
Line: 711

    trace(p_msg    => 'BEGIN of function record_updated_header_assgn',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 722

    record_updated_component
            (p_parent_component_type => 'AMB_AAD_EVENT_CLASS'
            ,p_parent_component_key  => p_product_rule_type_code||C_CHAR||
                                        p_product_rule_code||C_CHAR||
                                        p_event_class_code
            ,p_component_type        => 'AMB_AAD_EVENT_TYPE'
            ,p_component_key         => l_key
            ,p_merge_impact          => p_merge_impact
            ,p_event_class_code      => p_event_class_code
            ,p_event_type_code       => p_event_type_code
            ,p_component_code        => p_event_type_code);
Line: 739

      record_updated_component
            (p_parent_component_type => 'AMB_AAD'
            ,p_parent_component_key  => p_product_rule_type_code||C_CHAR||
                                        p_product_rule_code
            ,p_component_type        => 'AMB_AAD_EVENT_CLASS'
            ,p_component_key         => l_key
            ,p_merge_impact          => C_MERGE_IMPACT_UPDATED
            ,p_event_class_code      => p_event_class_code
            ,p_component_code        => p_event_class_code);
Line: 749

      record_updated_aad
            (p_product_rule_type_code => p_product_rule_type_code
            ,p_product_rule_code      => p_product_rule_code
            ,p_merge_impact           => C_MERGE_IMPACT_UPDATED);
Line: 758

    trace(p_msg    => 'END of function record_updated_header_assgn',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 768

END record_updated_header_assgn;
Line: 775

PROCEDURE record_updated_jld_assgn
(p_product_rule_type_code     VARCHAR2
,p_product_rule_code          VARCHAR2
,p_event_class_code           VARCHAR2
,p_event_type_code            VARCHAR2
,p_line_defn_owner_code       VARCHAR2
,p_line_defn_code             VARCHAR2
,p_merge_impact               VARCHAR2)
IS
  l_parent_key             VARCHAR2(240);
Line: 789

    l_log_module := C_DEFAULT_MODULE||'.record_updated_jld_assgn';
Line: 793

    trace(p_msg    => 'BEGIN of function record_updated_jld_assgn',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 809

    record_updated_component
          (p_parent_component_type => 'AMB_AAD_EVENT_TYPE'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_JLD'
          ,p_component_key         => l_key
          ,p_merge_impact          => p_merge_impact
          ,p_event_class_code      => p_event_class_code
          ,p_event_type_code       => p_event_type_code
          ,p_component_owner_code  => p_line_defn_owner_code
          ,p_component_code        => p_line_defn_code);
Line: 820

    record_updated_header_assgn
          (p_product_rule_type_code => p_product_rule_type_code
          ,p_product_rule_code      => p_product_rule_code
          ,p_event_class_code       => p_event_class_code
          ,p_event_type_code        => p_event_type_code
          ,p_merge_impact           => C_MERGE_IMPACT_UPDATED);
Line: 829

    trace(p_msg    => 'END of function record_updated_jld_assgn',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 839

END record_updated_jld_assgn;
Line: 849

PROCEDURE record_updated_jld
(p_event_class_code           VARCHAR2
,p_event_type_code            VARCHAR2
,p_line_definition_owner_code VARCHAR2
,p_line_definition_code       VARCHAR2)
IS
  CURSOR c_assgns IS
    SELECT w.product_rule_type_code
         , w.product_rule_code
      FROM xla_aad_line_defn_assgns w
         , xla_aad_line_defn_assgns s
     WHERE s.application_id             = g_application_id
       AND s.amb_context_code           = g_staging_context_code
       AND s.product_rule_type_code     = w.product_rule_type_code
       AND s.product_rule_code          = w.product_rule_code
       AND s.event_class_code           = w.event_class_code
       AND s.event_type_code            = w.event_type_code
       AND s.line_definition_owner_code = w.line_definition_owner_code
       AND s.line_definition_code       = w.line_definition_code
       AND w.application_id             = g_application_id
       AND w.amb_context_code           = g_amb_context_code
       AND w.event_class_code           = p_event_class_code
       AND w.event_type_code            = p_event_type_code
       AND w.line_definition_owner_code = p_line_definition_owner_code
       AND w.line_definition_code       = p_line_definition_code;
Line: 879

    l_log_module := C_DEFAULT_MODULE||'.record_updated_jld';
Line: 883

    trace(p_msg    => 'BEGIN of function record_updated_jld: '||
                      'p_event_class_code = '||p_event_class_code||
                      ', p_event_type_code = '||p_event_type_code||
                      ', p_line_definition_owner_code = '||p_line_definition_owner_code||
                      ', p_line_definition_code = '||p_line_definition_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 900

      record_updated_jld_assgn
            (p_product_rule_type_code     => l_assgn.product_rule_type_code
            ,p_product_rule_code          => l_assgn.product_rule_code
            ,p_event_class_code           => p_event_class_code
            ,p_event_type_code            => p_event_type_code
            ,p_line_defn_owner_code       => p_line_definition_owner_code
            ,p_line_defn_code             => p_line_definition_code
            ,p_merge_impact               => C_MERGE_IMPACT_UPDATED);
Line: 914

    trace(p_msg    => 'END of function record_updated_jld',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 925

END record_updated_jld;
Line: 932

PROCEDURE record_updated_line_assgn
(p_event_class_code           VARCHAR2
,p_event_type_code            VARCHAR2
,p_line_definition_owner_code VARCHAR2
,p_line_definition_code       VARCHAR2
,p_accounting_line_type_code  VARCHAR2
,p_accounting_line_code       VARCHAR2
,p_merge_impact               VARCHAR2)
IS
  l_parent_key             VARCHAR2(240);
Line: 946

    l_log_module := C_DEFAULT_MODULE||'.record_updated_line_assgn';
Line: 950

    trace(p_msg    => 'BEGIN of function record_updated_line_assgn: '||
                      'p_event_class_code = '||p_event_class_code||
                      ', p_event_type_code = '||p_event_type_code||
                      ', p_line_definition_owner_code = '||p_line_definition_owner_code||
                      ', p_line_definition_code = '||p_line_definition_code||
                      ', p_accounting_line_type_code = '||p_accounting_line_type_code||
                      ', p_accounting_line_code = '||p_accounting_line_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 971

    record_updated_component
              (p_parent_component_type => 'AMB_JLD'
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_LINE_ASSIGNMENT'
              ,p_component_key         => l_key
              ,p_merge_impact          => p_merge_impact
              ,p_event_class_code      => p_event_class_code
              ,p_event_type_code       => NULL
              ,p_component_owner_code  => p_accounting_line_type_code
              ,p_component_code        => p_accounting_line_code);
Line: 982

    record_updated_jld
             (p_event_class_code           => p_event_class_code
             ,p_event_type_code            => p_event_type_code
             ,p_line_definition_owner_code => p_line_definition_owner_code
             ,p_line_definition_code       => p_line_definition_code);
Line: 991

    trace(p_msg    => 'END of function record_updated_line_assgn',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1002

END record_updated_line_assgn;
Line: 1009

PROCEDURE record_updated_mpa_assgn
(p_event_class_code           VARCHAR2
,p_event_type_code            VARCHAR2
,p_line_definition_owner_code VARCHAR2
,p_line_definition_code       VARCHAR2
,p_accounting_line_type_code  VARCHAR2
,p_accounting_line_code       VARCHAR2
,p_merge_impact               VARCHAR2)
IS
  l_key                    VARCHAR2(240);
Line: 1022

    l_log_module := C_DEFAULT_MODULE||'.record_updated_mpa_assgn';
Line: 1026

    trace(p_msg    => 'BEGIN of function record_updated_mpa_assgn: '||
                      'p_event_class_code = '||p_event_class_code||
                      ', p_event_type_code = '||p_event_type_code||
                      ', p_line_definition_owner_code = '||p_line_definition_owner_code||
                      ', p_line_definition_code = '||p_line_definition_code||
                      ', p_accounting_line_type_code = '||p_accounting_line_type_code||
                      ', p_accounting_line_code = '||p_accounting_line_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1045

    record_updated_component
              (p_parent_component_type => 'AMB_LINE_ASSIGNMENT'
              ,p_parent_component_key  => l_key
              ,p_component_type        => 'AMB_MPA_ASSIGNMENT'
              ,p_component_key         => l_key||C_CHAR||'MPA'
              ,p_merge_impact          => p_merge_impact
              ,p_event_class_code      => NULL
              ,p_event_type_code       => NULL
              ,p_component_owner_code  => NULL
              ,p_component_code        => NULL);
Line: 1056

    record_updated_line_assgn
             (p_event_class_code           => p_event_class_code
             ,p_event_type_code            => p_event_type_code
             ,p_line_definition_owner_code => p_line_definition_owner_code
             ,p_line_definition_code       => p_line_definition_code
             ,p_accounting_line_type_code  => p_accounting_line_type_code
             ,p_accounting_line_code       => p_accounting_line_code
             ,p_merge_impact               => C_MERGE_IMPACT_UPDATED);
Line: 1068

    trace(p_msg    => 'END of function record_updated_mpa_assgn',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1079

END record_updated_mpa_assgn;
Line: 1086

PROCEDURE record_updated_mpa_line_assgn
(p_event_class_code               VARCHAR2
,p_event_type_code                VARCHAR2
,p_line_definition_owner_code     VARCHAR2
,p_line_definition_code           VARCHAR2
,p_accounting_line_type_code      VARCHAR2
,p_accounting_line_code           VARCHAR2
,p_mpa_acct_line_type_code        VARCHAR2
,p_mpa_acct_line_code             VARCHAR2
,p_merge_impact                   VARCHAR2)
IS
  l_parent_key             VARCHAR2(240);
Line: 1102

    l_log_module := C_DEFAULT_MODULE||'.record_updated_mpa_line_assgn';
Line: 1106

    trace(p_msg    => 'BEGIN of function record_updated_mpa_line_assgn: '||
                      'p_event_class_code = '||p_event_class_code||
                      ', p_event_type_code = '||p_event_type_code||
                      ', p_line_definition_owner_code = '||p_line_definition_owner_code||
                      ', p_line_definition_code = '||p_line_definition_code||
                      ', p_accounting_line_type_code = '||p_accounting_line_type_code||
                      ', p_accounting_line_code = '||p_accounting_line_code||
                      ', p_mpa_acct_line_type_code = '||p_mpa_acct_line_type_code||
                      ', p_mpa_acct_line_code = '||p_mpa_acct_line_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1132

    record_updated_component
              (p_parent_component_type => 'AMB_MPA_ASSIGNMENT'
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_MPA_LINE_ASSIGNMENT'
              ,p_component_key         => l_key
              ,p_event_class_code      => p_event_class_code
              ,p_component_owner_code  => p_mpa_acct_line_type_code
              ,p_component_code        => p_mpa_acct_line_code
              ,p_merge_impact          => p_merge_impact);
Line: 1142

    record_updated_mpa_assgn
             (p_event_class_code           => p_event_class_code
             ,p_event_type_code            => p_event_type_code
             ,p_line_definition_owner_code => p_line_definition_owner_code
             ,p_line_definition_code       => p_line_definition_code
             ,p_accounting_line_type_code  => p_accounting_line_type_code
             ,p_accounting_line_code       => p_accounting_line_code
             ,p_merge_impact               => C_MERGE_IMPACT_UPDATED);
Line: 1154

    trace(p_msg    => 'END of function record_updated_mpa_line_assgn',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1165

END record_updated_mpa_line_assgn;
Line: 1172

PROCEDURE record_updated_assignment
(p_parent_component_type          IN VARCHAR2
,p_product_rule_type_code         IN VARCHAR2
,p_product_rule_code              IN VARCHAR2
,p_event_class_code               IN VARCHAR2
,p_event_type_code                IN VARCHAR2
,p_line_definition_owner_code     IN VARCHAR2
,p_line_definition_code           IN VARCHAR2
,p_accounting_line_type_code      IN VARCHAR2
,p_accounting_line_code           IN VARCHAR2
,p_mpa_acct_line_type_code        IN VARCHAR2
,p_mpa_acct_line_code             IN VARCHAR2
,p_merge_impact                   IN VARCHAR2
,x_parent_key                     IN OUT NOCOPY VARCHAR2)
IS
  l_log_module             VARCHAR2(240);
Line: 1190

    l_log_module := C_DEFAULT_MODULE||'.record_updated_assignment';
Line: 1194

    trace(p_msg    => 'BEGIN of function record_updated_assignment',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1205

    record_updated_header_assgn
            (p_product_rule_type_code => p_product_rule_type_code
            ,p_product_rule_code      => p_product_rule_code
            ,p_event_class_code       => p_event_class_code
            ,p_event_type_code        => p_event_type_code
            ,p_merge_impact           => p_merge_impact);
Line: 1220

    record_updated_line_assgn
             (p_event_class_code           => p_event_class_code
             ,p_event_type_code            => p_event_type_code
             ,p_line_definition_owner_code => p_line_definition_owner_code
             ,p_line_definition_code       => p_line_definition_code
             ,p_accounting_line_type_code  => p_accounting_line_type_code
             ,p_accounting_line_code       => p_accounting_line_code
             ,p_merge_impact               => p_merge_impact);
Line: 1239

    record_updated_mpa_assgn
             (p_event_class_code           => p_event_class_code
             ,p_event_type_code            => p_event_type_code
             ,p_line_definition_owner_code => p_line_definition_owner_code
             ,p_line_definition_code       => p_line_definition_code
             ,p_accounting_line_type_code  => p_accounting_line_type_code
             ,p_accounting_line_code       => p_accounting_line_code
             ,p_merge_impact               => p_merge_impact);
Line: 1260

    record_updated_mpa_line_assgn
             (p_event_class_code              => p_event_class_code
             ,p_event_type_code               => p_event_type_code
             ,p_line_definition_owner_code    => p_line_definition_owner_code
             ,p_line_definition_code          => p_line_definition_code
             ,p_accounting_line_type_code     => p_accounting_line_type_code
             ,p_accounting_line_code          => p_accounting_line_code
             ,p_mpa_acct_line_type_code       => p_mpa_acct_line_type_code
             ,p_mpa_acct_line_code            => p_mpa_acct_line_code
             ,p_merge_impact                  => p_merge_impact);
Line: 1274

    trace(p_msg    => 'END of function record_updated_assignment',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1285

END record_updated_assignment;
Line: 1294

PROCEDURE record_deleted_jld
(p_event_class_code           VARCHAR2
,p_event_type_code            VARCHAR2
,p_line_definition_owner_code VARCHAR2
,p_line_definition_code       VARCHAR2)
IS
  CURSOR c_assgns IS
    SELECT w.product_rule_type_code
         , w.product_rule_code
      FROM xla_aad_line_defn_assgns w
           LEFT OUTER JOIN xla_aad_line_defn_assgns s
           ON  s.amb_context_code               = g_staging_context_code
           AND s.application_id                 = g_application_id
           AND s.product_rule_type_code         = w.product_rule_type_code
           AND s.product_rule_code              = w.product_rule_code
           AND s.event_class_code               = w.event_class_code
           AND s.event_type_code                = w.event_type_code
           AND s.line_definition_owner_code     = w.line_definition_owner_code
           AND s.line_definition_code           = w.line_definition_code
     WHERE w.amb_context_code            = g_amb_context_code
       AND w.application_id              = g_application_id
       AND w.event_class_code            = p_event_class_code
       AND w.event_type_code             = p_event_type_code
       AND w.line_definition_owner_code  = p_line_definition_owner_code
       AND w.line_definition_code        = p_line_definition_code
       AND (w.event_type_code           = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL);
Line: 1326

    l_log_module := C_DEFAULT_MODULE||'.record_deleted_jld';
Line: 1330

    trace(p_msg    => 'BEGIN of function record_deleted_jld: '||
                      'p_event_class_code = '||p_event_class_code||
                      ', p_event_type_code = '||p_event_type_code||
                      ', p_line_definition_owner_code = '||p_line_definition_owner_code||
                      ', p_line_definition_code = '||p_line_definition_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1347

      record_updated_jld_assgn
            (p_product_rule_type_code     => l_assgn.product_rule_type_code
            ,p_product_rule_code          => l_assgn.product_rule_code
            ,p_event_class_code           => p_event_class_code
            ,p_event_type_code            => p_event_type_code
            ,p_line_defn_owner_code       => p_line_definition_owner_code
            ,p_line_defn_code             => p_line_definition_code
            ,p_merge_impact               => C_MERGE_IMPACT_DELETED);
Line: 1360

    trace(p_msg    => 'END of function record_deleted_jld',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1371

END record_deleted_jld;
Line: 1380

PROCEDURE record_updated_jlt
(p_event_class_code          VARCHAR2
,p_accounting_line_type_code VARCHAR2
,p_accounting_line_code      VARCHAR2)
IS
    CURSOR c_assgns IS
    SELECT 'AMB_LINE_ASSIGNMENT' parent_component_type
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL mpa_accounting_line_type_code
         , NULL mpa_accounting_line_code
      FROM xla_line_defn_jlt_assgns w
         , xla_line_defn_jlt_assgns s
     WHERE s.application_id              = g_application_id
       AND s.amb_context_code            = g_staging_context_code
       AND s.event_class_code            = w.event_class_code
       AND s.event_type_code             = w.event_type_code
       AND s.line_definition_owner_code  = w.line_definition_owner_code
       AND s.line_definition_code        = w.line_definition_code
       AND s.accounting_line_type_code   = w.accounting_line_type_code
       AND s.accounting_line_code        = w.accounting_line_code
       AND w.application_id              = g_application_id
       AND w.amb_context_code            = g_amb_context_code
       AND w.event_class_code            = p_event_class_code
       AND w.accounting_line_type_code   = p_accounting_line_type_code
       AND w.accounting_line_code        = p_accounting_line_code
     UNION
    SELECT 'AMB_MPA_LINE_ASSIGNMENT'
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , w.mpa_accounting_line_type_code
         , w.mpa_accounting_line_code
      FROM xla_mpa_jlt_assgns w
         , xla_mpa_jlt_assgns s
     WHERE s.application_id                = g_application_id
       AND s.amb_context_code              = g_staging_context_code
       AND s.event_class_code              = w.event_class_code
       AND s.event_type_code               = w.event_type_code
       AND s.line_definition_owner_code    = w.line_definition_owner_code
       AND s.line_definition_code          = w.line_definition_code
       AND s.accounting_line_type_code     = w.accounting_line_type_code
       AND s.accounting_line_code          = w.accounting_line_code
       AND s.mpa_accounting_line_type_code = w.mpa_accounting_line_type_code
       AND s.mpa_accounting_line_code      = w.mpa_accounting_line_code
       AND w.application_id                = g_application_id
       AND w.amb_context_code              = g_amb_context_code
       AND w.event_class_code              = p_event_class_code
       AND w.mpa_accounting_line_type_code = p_accounting_line_type_code
       AND w.mpa_accounting_line_code      = p_accounting_line_code;
Line: 1443

    l_log_module := C_DEFAULT_MODULE||'.record_updated_jlt';
Line: 1447

    trace(p_msg    => 'BEGIN of function record_updated_jlt: '||
                      'p_event_class_code = '||p_event_class_code||
                      ', p_accounting_line_type_code = '||p_accounting_line_type_code||
                      ', p_accounting_line_code = '||p_accounting_line_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1462

      record_updated_assignment
         (p_parent_component_type          => l_assgn.parent_component_type
         ,p_product_rule_type_code         => NULL
         ,p_product_rule_code              => NULL
         ,p_event_class_code               => l_assgn.event_class_code
         ,p_event_type_code                => l_assgn.event_type_code
         ,p_line_definition_owner_code     => l_assgn.line_definition_owner_code
         ,p_line_definition_code           => l_assgn.line_definition_code
         ,p_accounting_line_type_code      => l_assgn.accounting_line_type_code
         ,p_accounting_line_code           => l_assgn.accounting_line_code
         ,p_mpa_acct_line_type_code        => l_assgn.mpa_accounting_line_type_code
         ,p_mpa_acct_line_code             => l_assgn.mpa_accounting_line_code
         ,p_merge_impact                   => C_MERGE_IMPACT_UPDATED
         ,x_parent_key                     => l_parent_key);
Line: 1477

      record_updated_component
              (p_parent_component_type => l_assgn.parent_component_type
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_JLT'
              ,p_component_key         => l_key
              ,p_merge_impact          => C_MERGE_IMPACT_UPDATED
              ,p_event_class_code      => p_event_class_code
              ,p_component_owner_code  => p_accounting_line_type_code
              ,p_component_code        => p_accounting_line_code);
Line: 1491

    trace(p_msg    => 'END of function record_updated_jlt',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1502

END record_updated_jlt;
Line: 1509

PROCEDURE record_updated_jlt_acct_attr
(p_event_class_code          VARCHAR2
,p_accounting_line_type_code VARCHAR2
,p_accounting_line_code      VARCHAR2
,p_accounting_attribute_code VARCHAR2
,p_merge_impact              VARCHAR2)
IS
  l_parent_key             VARCHAR2(240);
Line: 1521

    l_log_module := C_DEFAULT_MODULE||'.record_updated_jlt_acct_attr';
Line: 1525

    trace(p_msg    => 'BEGIN of function record_updated_jlt_acct_attr: '||
                      'p_event_class_code = '||p_event_class_code||
                      ', p_accounting_line_type_code = '||p_accounting_line_type_code||
                      ', p_accounting_line_code = '||p_accounting_line_code||
                      ', p_accounting_attribute_code = '||p_accounting_attribute_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1541

    record_updated_jlt
          (p_event_class_code          => p_event_class_code
          ,p_accounting_line_type_code => p_accounting_line_type_code
          ,p_accounting_line_code      => p_accounting_line_code);
Line: 1546

    record_updated_component
          (p_parent_component_type => 'AMB_JLT'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_JLT_ACCT_ATTR'
          ,p_component_key         => l_key
          ,p_merge_impact          => p_merge_impact
          ,p_component_code        => p_accounting_attribute_code);
Line: 1556

    trace(p_msg    => 'END of function record_updated_jlt_acct_attr',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1567

END record_updated_jlt_acct_attr;
Line: 1575

PROCEDURE record_deleted_jlt
(p_event_class_code          VARCHAR2
,p_accounting_line_type_code VARCHAR2
,p_accounting_line_code      VARCHAR2)
IS
  CURSOR c_assgns IS
    SELECT 'AMB_LINE_ASSIGNMENT' parent_component_type
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL mpa_accounting_line_type_code
         , NULL mpa_accounting_line_code
      FROM xla_line_defn_jlt_assgns w
           LEFT OUTER JOIN xla_line_defn_jlt_assgns   s
           ON  s.amb_context_code            = g_staging_context_code
           AND s.application_id              = g_application_id
           AND s.event_class_code            = w.event_class_code
           AND s.event_type_code             = w.event_type_code
           AND s.line_definition_owner_code  = w.line_definition_owner_code
           AND s.line_definition_code        = w.line_definition_code
           AND s.accounting_line_type_code   = w.accounting_line_type_code
           AND s.accounting_line_code        = w.accounting_line_code
     WHERE w.application_id              = g_application_id
       AND w.amb_context_code            = g_amb_context_code
       AND w.event_class_code            = p_event_class_code
       AND w.accounting_line_type_code   = p_accounting_line_type_code
       AND w.accounting_line_code        = p_accounting_line_code
       AND (w.line_definition_owner_code = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL)
     UNION
    SELECT 'AMB_MPA_LINE_ASSIGNMENT'
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , w.mpa_accounting_line_type_code
         , w.mpa_accounting_line_code
      FROM xla_mpa_jlt_assgns w
           LEFT OUTER JOIN xla_mpa_jlt_assgns s
           ON  s.amb_context_code              = g_staging_context_code
           AND s.application_id                = g_application_id
           AND s.event_class_code              = w.event_class_code
           AND s.event_type_code               = w.event_type_code
           AND s.line_definition_owner_code    = w.line_definition_owner_code
           AND s.line_definition_code          = w.line_definition_code
           AND s.accounting_line_type_code     = w.accounting_line_type_code
           AND s.accounting_line_code          = w.accounting_line_code
           AND s.mpa_accounting_line_type_code = w.mpa_accounting_line_type_code
           AND s.mpa_accounting_line_code      = w.mpa_accounting_line_code
     WHERE w.application_id                = g_application_id
       AND w.amb_context_code              = g_amb_context_code
       AND w.event_class_code              = p_event_class_code
       AND w.mpa_accounting_line_type_code = p_accounting_line_type_code
       AND w.mpa_accounting_line_code      = p_accounting_line_code
       AND (w.line_definition_owner_code = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL);
Line: 1642

    l_log_module := C_DEFAULT_MODULE||'.record_deleted_jlt';
Line: 1646

    trace(p_msg    => 'BEGIN of function record_deleted_jlt: '||
                      'p_event_class_code = '||p_event_class_code||
                      ', p_accounting_line_type_code = '||p_accounting_line_type_code||
                      ', p_accounting_line_code = '||p_accounting_line_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1661

      record_updated_assignment
         (p_parent_component_type          => l_assgn.parent_component_type
         ,p_product_rule_type_code         => NULL
         ,p_product_rule_code              => NULL
         ,p_event_class_code               => l_assgn.event_class_code
         ,p_event_type_code                => l_assgn.event_type_code
         ,p_line_definition_owner_code     => l_assgn.line_definition_owner_code
         ,p_line_definition_code           => l_assgn.line_definition_code
         ,p_accounting_line_type_code      => l_assgn.accounting_line_type_code
         ,p_accounting_line_code           => l_assgn.accounting_line_code
         ,p_mpa_acct_line_type_code        => l_assgn.mpa_accounting_line_type_code
         ,p_mpa_acct_line_code             => l_assgn.mpa_accounting_line_code
         ,p_merge_impact                   => C_MERGE_IMPACT_DELETED
         ,x_parent_key                     => l_parent_key);
Line: 1680

    trace(p_msg    => 'END of function record_deleted_jlt',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1691

END record_deleted_jlt;
Line: 1698

PROCEDURE record_updated_adr_assgn
(p_parent_component_type      VARCHAR2
,p_event_class_code           VARCHAR2
,p_event_type_code            VARCHAR2
,p_line_definition_owner_code VARCHAR2
,p_line_definition_code       VARCHAR2
,p_accounting_line_type_code  VARCHAR2
,p_accounting_line_code       VARCHAR2
,p_mpa_acct_line_type_code    VARCHAR2
,p_mpa_acct_line_code         VARCHAR2
,p_flexfield_segment_code     VARCHAR2
,p_side_code                  VARCHAR2
,p_segment_rule_appl_id       INTEGER
,p_segment_rule_type_code     VARCHAR2
,p_segment_rule_code          VARCHAR2
,p_accounting_coa_id          INTEGER
,p_merge_impact               VARCHAR2)
IS
  l_key                    VARCHAR2(240);
Line: 1723

    l_log_module := C_DEFAULT_MODULE||'.record_updated_adr_assgn';
Line: 1727

    trace(p_msg    => 'BEGIN of function record_updated_adr_assgn: '||
                      'p_segment_rule_type_code = '||p_segment_rule_type_code||
                      ', p_segment_rule_code = '||p_segment_rule_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1744

  record_updated_assignment
            (p_parent_component_type          => l_parent_component_type2
            ,p_product_rule_type_code         => NULL
            ,p_product_rule_code              => NULL
            ,p_event_class_code               => p_event_class_code
            ,p_event_type_code                => p_event_type_code
            ,p_line_definition_owner_code     => p_line_definition_owner_code
            ,p_line_definition_code           => p_line_definition_code
            ,p_accounting_line_type_code      => p_accounting_line_type_code
            ,p_accounting_line_code           => p_accounting_line_code
            ,p_mpa_acct_line_type_code        => p_mpa_acct_line_type_code
            ,p_mpa_acct_line_code             => p_mpa_acct_line_code
            ,p_merge_impact                   => C_MERGE_IMPACT_UPDATED
            ,x_parent_key                     => l_parent_key);
Line: 1772

  record_updated_component
              (p_parent_component_type => l_parent_component_type2
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => p_parent_component_type
              ,p_component_key         => l_key
              ,p_merge_impact          => C_MERGE_IMPACT_UPDATED
              ,p_event_class_code      => NULL
              ,p_event_type_code       => NULL
              ,p_component_owner_code  => TO_CHAR(p_accounting_coa_id)
              ,p_component_code        => p_flexfield_segment_code);
Line: 1783

  record_updated_component
              (p_parent_component_type => p_parent_component_type
              ,p_parent_component_key  => l_key
              ,p_component_type        => 'AMB_ADR'
              ,p_component_key         => l_adr_key
              ,p_merge_impact          => p_merge_impact
              ,p_event_class_code      => NULL
              ,p_event_type_code       => NULL
              ,p_component_appl_id     => p_segment_rule_appl_id
              ,p_component_owner_code  => p_segment_rule_type_code
              ,p_component_code        => p_segment_rule_code);
Line: 1796

    trace(p_msg    => 'END of function record_updated_adr_assgn',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1807

END record_updated_adr_assgn;
Line: 1815

PROCEDURE record_updated_adr
(p_segment_rule_appl_id   INTEGER
,p_segment_rule_type_code VARCHAR2
,p_segment_rule_code      VARCHAR2)
IS
  CURSOR c_assgns IS
    SELECT 'AMB_ADR_ASSGN' parent_component_type
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL mpa_accounting_line_type_code
         , NULL mpa_accounting_line_code
         , w.flexfield_segment_code
         , w.side_code
         , l.accounting_coa_id
      FROM xla_line_defn_adr_assgns w
         , xla_line_defn_adr_assgns s
         , xla_line_definitions_b l
     WHERE s.application_id              = g_application_id
       AND s.amb_context_code            = g_staging_context_code
       AND s.event_class_code            = w.event_class_code
       AND s.event_type_code             = w.event_type_code
       AND s.line_definition_owner_code  = w.line_definition_owner_code
       AND s.line_definition_code        = w.line_definition_code
       AND s.flexfield_segment_code      = w.flexfield_segment_code
       AND s.side_code                   = w.side_code
       AND s.segment_rule_type_code      = w.segment_rule_type_code
       AND s.segment_rule_code           = w.segment_rule_code
       AND l.application_id              = g_application_id
       AND l.amb_context_code            = g_staging_context_code
       AND l.event_class_code            = w.event_class_code
       AND l.event_type_code             = w.event_type_code
       AND l.line_definition_owner_code  = w.line_definition_owner_code
       AND l.line_definition_code        = w.line_definition_code
       AND w.application_id              = g_application_id
       AND w.amb_context_code            = g_amb_context_code
       AND w.segment_rule_type_code      = p_segment_rule_type_code
       AND w.segment_rule_code           = p_segment_rule_code
     UNION
    SELECT 'AMB_MPA_ADR_ASSGN' parent_component_type
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , w.mpa_accounting_line_type_code
         , w.mpa_accounting_line_code
         , w.flexfield_segment_code
         , NULL
         , l.accounting_coa_id
      FROM xla_mpa_jlt_adr_assgns w
         , xla_mpa_jlt_adr_assgns s
         , xla_mpa_jlt_assgns     j
         , xla_line_definitions_b l
     WHERE s.application_id                = g_application_id
       AND s.amb_context_code              = g_staging_context_code
       AND s.event_class_code              = w.event_class_code
       AND s.event_type_code               = w.event_type_code
       AND s.line_definition_owner_code    = w.line_definition_owner_code
       AND s.line_definition_code          = w.line_definition_code
       AND s.accounting_line_type_code     = w.accounting_line_type_code
       AND s.accounting_line_code          = w.accounting_line_code
       AND s.mpa_accounting_line_type_code = w.mpa_accounting_line_type_code
       AND s.mpa_accounting_line_code      = w.mpa_accounting_line_code
       AND s.flexfield_segment_code        = w.flexfield_segment_code
       AND s.segment_rule_type_code        = w.segment_rule_type_code
       AND s.segment_rule_code             = w.segment_rule_code
       AND j.application_id                = g_application_id
       AND j.amb_context_code              = g_staging_context_code
       AND j.event_class_code              = w.event_class_code
       AND j.event_type_code               = w.event_type_code
       AND j.line_definition_owner_code    = w.line_definition_owner_code
       AND j.line_definition_code          = w.line_definition_code
       AND j.accounting_line_type_code     = w.accounting_line_type_code
       AND j.accounting_line_code          = w.accounting_line_code
       AND l.application_id                = g_application_id
       AND l.amb_context_code              = g_staging_context_code
       AND l.event_class_code              = w.event_class_code
       AND l.event_type_code               = w.event_type_code
       AND l.line_definition_owner_code    = w.line_definition_owner_code
       AND l.line_definition_code          = w.line_definition_code
       AND w.application_id                = g_application_id
       AND w.amb_context_code              = g_amb_context_code
       AND w.segment_rule_type_code        = p_segment_rule_type_code
       AND w.segment_rule_code             = p_segment_rule_code;
Line: 1909

    l_log_module := C_DEFAULT_MODULE||'.record_updated_adr';
Line: 1913

    trace(p_msg    => 'BEGIN of function record_updated_adr: '||
                      'p_segment_rule_type_code = '||p_segment_rule_type_code||
                      ', p_segment_rule_code = '||p_segment_rule_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1940

      record_updated_adr_assgn
            (p_parent_component_type          => l_assgn.parent_component_type
            ,p_event_class_code               => l_assgn.event_class_code
            ,p_event_type_code                => l_assgn.event_type_code
            ,p_line_definition_owner_code     => l_assgn.line_definition_owner_code
            ,p_line_definition_code           => l_assgn.line_definition_code
            ,p_accounting_line_type_code      => l_assgn.accounting_line_type_code
            ,p_accounting_line_code           => l_assgn.accounting_line_code
            ,p_mpa_acct_line_type_code        => l_assgn.mpa_accounting_line_type_code
            ,p_mpa_acct_line_code             => l_assgn.mpa_accounting_line_code
            ,p_flexfield_segment_code         => l_assgn.flexfield_segment_code
            ,p_side_code                      => l_assgn.side_code
            ,p_segment_rule_appl_id           => p_segment_rule_appl_id
            ,p_segment_rule_type_code         => p_segment_rule_type_code
            ,p_segment_rule_code              => p_segment_rule_code
            ,p_accounting_coa_id              => l_assgn.accounting_coa_id
            ,p_merge_impact                   => C_MERGE_IMPACT_UPDATED);
Line: 1969

    trace(p_msg    => 'END of function record_updated_adr',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 1980

END record_updated_adr;
Line: 1987

PROCEDURE record_deleted_adr
(p_segment_rule_appl_id   INTEGER
,p_segment_rule_type_code VARCHAR2
,p_segment_rule_code      VARCHAR2)
IS
  CURSOR c_assgns IS
    SELECT 'AMB_ADR_ASSGN' parent_component_type
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL mpa_accounting_line_type_code
         , NULL mpa_accounting_line_code
         , w.flexfield_segment_code
         , w.side_code
         , l.accounting_coa_id
      FROM xla_line_defn_adr_assgns w
           JOIN xla_line_definitions_b l
           ON  l.amb_context_code            = g_amb_context_code
           AND l.application_id              = g_application_id
           AND l.event_class_code            = w.event_class_code
           AND l.event_type_code             = w.event_type_code
           AND l.line_definition_owner_code  = w.line_definition_owner_code
           AND l.line_definition_code        = w.line_definition_code
           LEFT OUTER JOIN xla_line_defn_adr_assgns s
           ON  s.amb_context_code            = g_staging_context_code
           AND s.application_id              = g_application_id
           AND s.event_class_code            = w.event_class_code
           AND s.event_type_code             = w.event_type_code
           AND s.line_definition_owner_code  = w.line_definition_owner_code
           AND s.line_definition_code        = w.line_definition_code
           AND s.accounting_line_type_code   = w.accounting_line_type_code
           AND s.accounting_line_code        = w.accounting_line_code
           AND s.flexfield_segment_code      = w.flexfield_segment_code
           AND s.side_code                   = w.side_code
     WHERE w.application_id              = g_application_id
       AND w.amb_context_code            = g_amb_context_code
       AND w.segment_rule_type_code      = p_segment_rule_type_code
       AND w.segment_rule_code           = p_segment_rule_code
       AND (w.line_definition_owner_code = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL)
     UNION
    SELECT 'AMB_MPA_ADR_ASSGN'
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , w.mpa_accounting_line_type_code
         , w.mpa_accounting_line_code
         , w.flexfield_segment_code
         , NULL
         , l.accounting_coa_id
      FROM xla_mpa_jlt_adr_assgns w
           JOIN xla_line_definitions_b l
           ON  l.amb_context_code            = g_amb_context_code
           AND l.application_id              = g_application_id
           AND l.event_class_code            = w.event_class_code
           AND l.event_type_code             = w.event_type_code
           AND l.line_definition_owner_code  = w.line_definition_owner_code
           AND l.line_definition_code        = w.line_definition_code
           JOIN xla_mpa_jlt_assgns j
           ON  j.amb_context_code              = g_amb_context_code
           AND j.application_id                = g_application_id
           AND j.event_class_code              = w.event_class_code
           AND j.event_type_code               = w.event_type_code
           AND j.line_definition_owner_code    = w.line_definition_owner_code
           AND j.line_definition_code          = w.line_definition_code
           AND j.accounting_line_type_code     = w.accounting_line_type_code
           AND j.accounting_line_code          = w.accounting_line_code
           AND j.mpa_accounting_line_type_code = w.mpa_accounting_line_type_code
           AND j.mpa_accounting_line_code      = w.mpa_accounting_line_code
           LEFT OUTER JOIN xla_mpa_jlt_adr_assgns s
           ON  s.amb_context_code              = g_staging_context_code
           AND s.application_id                = g_application_id
           AND s.event_class_code              = w.event_class_code
           AND s.event_type_code               = w.event_type_code
           AND s.line_definition_owner_code    = w.line_definition_owner_code
           AND s.line_definition_code          = w.line_definition_code
           AND s.accounting_line_type_code     = w.accounting_line_type_code
           AND s.accounting_line_code          = w.accounting_line_code
           AND s.mpa_accounting_line_type_code = w.mpa_accounting_line_type_code
           AND s.mpa_accounting_line_code      = w.mpa_accounting_line_code
           AND s.flexfield_segment_code        = w.flexfield_segment_code
     WHERE w.application_id              = g_application_id
       AND w.amb_context_code            = g_amb_context_code
       AND w.segment_rule_type_code      = p_segment_rule_type_code
       AND w.segment_rule_code           = p_segment_rule_code
       AND (w.line_definition_owner_code = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL);
Line: 2085

    l_log_module := C_DEFAULT_MODULE||'.record_deleted_adr';
Line: 2089

    trace(p_msg    => 'BEGIN of function record_deleted_adr: '||
                      'p_segment_rule_type_code = '||p_segment_rule_type_code||
                      ', p_segment_rule_code = '||p_segment_rule_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2103

      record_updated_adr_assgn
            (p_parent_component_type          => l_assgn.parent_component_type
            ,p_event_class_code               => l_assgn.event_class_code
            ,p_event_type_code                => l_assgn.event_type_code
            ,p_line_definition_owner_code     => l_assgn.line_definition_owner_code
            ,p_line_definition_code           => l_assgn.line_definition_code
            ,p_accounting_line_type_code      => l_assgn.accounting_line_type_code
            ,p_accounting_line_code           => l_assgn.accounting_line_code
            ,p_mpa_acct_line_type_code        => l_assgn.mpa_accounting_line_type_code
            ,p_mpa_acct_line_code             => l_assgn.mpa_accounting_line_code
            ,p_flexfield_segment_code         => l_assgn.flexfield_segment_code
            ,p_side_code                      => l_assgn.side_code
            ,p_segment_rule_appl_id           => p_segment_rule_appl_id
            ,p_segment_rule_type_code         => p_segment_rule_type_code
            ,p_segment_rule_code              => p_segment_rule_code
            ,p_accounting_coa_id              => l_assgn.accounting_coa_id
            ,p_merge_impact                   => C_MERGE_IMPACT_DELETED);
Line: 2126

    trace(p_msg    => 'END of function record_deleted_adr',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2137

END record_deleted_adr;
Line: 2144

PROCEDURE record_updated_adr_detail
(p_segment_rule_appl_id   INTEGER
,p_segment_rule_type_code VARCHAR2
,p_segment_rule_code      VARCHAR2
,p_user_sequence          INTEGER
,p_merge_impact           VARCHAR2)
IS
  l_key                    VARCHAR2(240);
Line: 2155

    l_log_module := C_DEFAULT_MODULE||'.record_updated_adr_detail';
Line: 2159

    trace(p_msg    => 'BEGIN of function record_updated_adr_detail: '||
                      'p_segment_rule_type_code = '||p_segment_rule_type_code||
                      ', p_segment_rule_code = '||p_segment_rule_code||
                      ', p_user_sequence = '||p_user_sequence,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2174

    record_updated_component
              (p_parent_component_type => 'AMB_ADR'
              ,p_parent_component_key  => p_segment_rule_appl_id||C_CHAR||
                                          p_segment_rule_type_code||C_CHAR||
                                          p_segment_rule_code
              ,p_component_type        => 'AMB_ADR_DETAIL'
              ,p_component_key         => l_key
              ,p_merge_impact          => p_merge_impact
              ,p_event_class_code      => NULL
              ,p_event_type_code       => NULL
              ,p_component_owner_code  => NULL
              ,p_component_code        => p_user_sequence);
Line: 2187

    record_updated_adr
            (p_segment_rule_appl_id   => p_segment_rule_appl_id
            ,p_segment_rule_type_code => p_segment_rule_type_code
            ,p_segment_rule_code      => p_segment_rule_code);
Line: 2194

    trace(p_msg    => 'END of function record_updated_adr_detail',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2205

END record_updated_adr_detail;
Line: 2212

PROCEDURE record_updated_ms
(p_mapping_set_code       VARCHAR2
,p_merge_impact           VARCHAR2)
IS
  CURSOR c_assgns IS
    SELECT application_id segment_rule_appl_id
         , segment_rule_type_code
         , segment_rule_code
         , user_sequence
      FROM xla_seg_rule_details s
     WHERE application_id         = g_application_id
       AND amb_context_code       = g_amb_context_code
       AND value_mapping_set_code = p_mapping_set_code;
Line: 2231

    l_log_module := C_DEFAULT_MODULE||'.record_updated_ms';
Line: 2235

    trace(p_msg    => 'BEGIN of function record_updated_ms: '||
                      ', p_mapping_set_code = '||p_mapping_set_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2251

        record_updated_component
              (p_parent_component_type => 'AMB_ADR_DETAIL'
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_MS'
              ,p_component_key         => l_key
              ,p_merge_impact          => p_merge_impact
              ,p_event_class_code      => NULL
              ,p_event_type_code       => NULL
              ,p_component_owner_code  => NULL
              ,p_component_code        => p_mapping_set_code);
Line: 2262

        record_updated_adr_detail
            (p_segment_rule_appl_id   => l_assgn.segment_rule_appl_id
            ,p_segment_rule_type_code => l_assgn.segment_rule_type_code
            ,p_segment_rule_code      => l_assgn.segment_rule_code
            ,p_user_sequence          => l_assgn.user_sequence
            ,p_merge_impact           => C_MERGE_IMPACT_UPDATED);
Line: 2275

    trace(p_msg    => 'END of function record_updated_ms',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2286

END record_updated_ms;
Line: 2293

PROCEDURE record_updated_ms_value
(p_mapping_set_code           VARCHAR2
,p_flexfield_assign_mode_code VARCHAR2
,p_value_set_id               INTEGER
,p_view_application_id        INTEGER
,p_lookup_type                VARCHAR2
,p_value_constant             VARCHAR2
,p_effective_date_from        DATE
,p_effective_date_to          DATE
,p_enabled_flag               VARCHAR2
,p_input_value_type_code      VARCHAR2
,p_input_value_constant       VARCHAR2
,p_merge_impact               VARCHAR2)
IS
  l_key                    VARCHAR2(720);
Line: 2311

    l_log_module := C_DEFAULT_MODULE||'.record_updated_ms_value';
Line: 2315

    trace(p_msg    => 'BEGIN of function record_updated_ms_value: '||
                      'p_mapping_set_code = '||p_mapping_set_code||
                      ', p_input_value_type_code = '||p_input_value_type_code||
                      ', p_input_value_constant = '||p_input_value_constant||
                      ', p_value_constant = '||p_value_constant||
                      ', p_effective_date_from = '||p_effective_date_from||
                      ', p_effective_date_to = '||p_effective_date_to||
                      ', p_enabled_flag = '||p_enabled_flag,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2335

  record_updated_property
          (p_component_type => 'AMB_MS_VALUE'
          ,p_component_key  => l_key
          ,p_property       => 'INPUT_VALUE_TYPE'
          ,p_old_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_DELETED
                                    THEN p_input_value_type_code ELSE NULL END
          ,p_new_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_NEW
                                    THEN p_input_value_type_code ELSE NULL END);
Line: 2345

    record_updated_value
            (p_component_type          => 'AMB_MS_VALUE'
            ,p_component_key           => l_key
            ,p_property                => 'INPUT_VALUE'
            ,p_old_value               => CASE WHEN p_merge_impact = C_MERGE_IMPACT_DELETED
                                          THEN p_input_value_constant ELSE NULL END
            ,p_old_source_app_id       => CASE WHEN p_merge_impact = C_MERGE_IMPACT_DELETED
                                          THEN p_value_set_id ELSE NULL END
            ,p_old_source_type_code    => CASE WHEN p_merge_impact = C_MERGE_IMPACT_DELETED
                                          THEN p_view_application_id ELSE NULL END
            ,p_old_source_code         => CASE WHEN p_merge_impact = C_MERGE_IMPACT_DELETED
                                          THEN p_lookup_type ELSE NULL END
            ,p_new_value               => CASE WHEN p_merge_impact = C_MERGE_IMPACT_NEW
                                          THEN p_input_value_constant ELSE NULL END
            ,p_new_source_app_id       => CASE WHEN p_merge_impact = C_MERGE_IMPACT_NEW
                                          THEN p_value_set_id ELSE NULL END
            ,p_new_source_type_code    => CASE WHEN p_merge_impact = C_MERGE_IMPACT_NEW
                                          THEN p_view_application_id ELSE NULL END
            ,p_new_source_code         => CASE WHEN p_merge_impact = C_MERGE_IMPACT_NEW
                                          THEN p_lookup_type ELSE NULL END);
Line: 2368

    record_updated_property
          (p_component_type => 'AMB_MS_VALUE'
          ,p_component_key  => l_key
          ,p_property       => 'OUTPUT_VALUE'
          ,p_old_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_DELETED
                                    THEN p_value_constant ELSE NULL END
          ,p_new_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_NEW
                                    THEN p_value_constant ELSE NULL END);
Line: 2378

  record_updated_property
          (p_component_type => 'AMB_MS_VALUE'
          ,p_component_key  => l_key
          ,p_property       => 'EFFECTIVE_DATE_FROM'
          ,p_old_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_DELETED
                                    THEN p_effective_date_from ELSE NULL END
          ,p_new_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_NEW
                                    THEN p_effective_date_from ELSE NULL END);
Line: 2387

  record_updated_property
          (p_component_type => 'AMB_MS_VALUE'
          ,p_component_key  => l_key
          ,p_property       => 'EFFECTIVE_DATE_TO'
          ,p_old_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_DELETED
                                    THEN p_effective_date_to ELSE NULL END
          ,p_new_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_NEW
                                    THEN p_effective_date_to ELSE NULL END);
Line: 2396

  record_updated_property
          (p_component_type => 'AMB_MS_VALUE'
          ,p_component_key  => l_key
          ,p_property       => 'ENABLED'
          ,p_old_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_DELETED
                                    THEN p_enabled_flag ELSE NULL END
          ,p_new_value      => CASE WHEN p_merge_impact = C_MERGE_IMPACT_NEW
                                    THEN p_enabled_flag ELSE NULL END
          ,p_lookup_type    => 'XLA_YES_NO');
Line: 2407

    record_updated_component
          (p_parent_component_type => 'AMB_MS'
          ,p_parent_component_key  => p_mapping_set_code
          ,p_component_type        => 'AMB_MS_VALUE'
          ,p_component_key         => l_key
          ,p_merge_impact          => p_merge_impact
          ,p_event_class_code      => NULL
          ,p_event_type_code       => NULL
          ,p_component_owner_code  => NULL
          ,p_component_code        => NULL);
Line: 2419

  record_updated_ms
            (p_mapping_set_code => p_mapping_set_code
            ,p_merge_impact     => C_MERGE_IMPACT_UPDATED);
Line: 2424

    trace(p_msg    => 'END of function record_updated_ms_value',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2435

END record_updated_ms_value;
Line: 2442

PROCEDURE record_updated_desc
(p_description_type_code       VARCHAR2
,p_description_code            VARCHAR2)
IS
  CURSOR c_assgns IS
    SELECT 'AMB_AAD_EVENT_TYPE' parent_component_type
         , w.product_rule_type_code
         , w.product_rule_code
         , w.event_class_code
         , w.event_type_code
         , NULL line_definition_owner_code
         , NULL line_definition_code
         , NULL accounting_line_type_code
         , NULL accounting_line_code
         , NULL mpa_accounting_line_type_code
         , NULL mpa_accounting_line_code
      FROM xla_prod_acct_headers w
         , xla_prod_acct_headers s
     WHERE s.application_id         = g_application_id
       AND s.amb_context_code       = g_staging_context_code
       AND s.product_rule_type_code = w.product_rule_type_code
       AND s.product_rule_code      = w.product_rule_code
       AND s.event_class_code       = w.event_class_code
       AND s.event_type_code        = w.event_type_code
       AND s.description_type_code  = w.description_type_code
       AND s.description_code       = w.description_code
       AND w.application_id         = g_application_id
       AND w.amb_context_code       = g_amb_context_code
       AND w.description_type_code  = p_description_type_code
       AND w.description_code       = p_description_code
   UNION
    SELECT 'AMB_LINE_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL
         , NULL
      FROM xla_line_defn_jlt_assgns w
         , xla_line_defn_jlt_assgns s
     WHERE s.application_id              = g_application_id
       AND s.amb_context_code            = g_staging_context_code
       AND s.event_class_code            = w.event_class_code
       AND s.event_type_code             = w.event_type_code
       AND s.line_definition_owner_code  = w.line_definition_owner_code
       AND s.line_definition_code        = w.line_definition_code
       AND s.accounting_line_type_code   = w.accounting_line_type_code
       AND s.accounting_line_code        = w.accounting_line_code
       AND s.description_type_code       = w.description_type_code
       AND s.description_code            = w.description_code
       AND w.application_id              = g_application_id
       AND w.amb_context_code            = g_amb_context_code
       AND w.description_type_code       = p_description_type_code
       AND w.description_code            = p_description_code
   UNION
    SELECT 'AMB_MPA_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL
         , NULL
      FROM xla_line_defn_jlt_assgns w
         , xla_line_defn_jlt_assgns s
     WHERE s.application_id              = g_application_id
       AND s.amb_context_code            = g_staging_context_code
       AND s.event_class_code            = w.event_class_code
       AND s.event_type_code             = w.event_type_code
       AND s.line_definition_owner_code  = w.line_definition_owner_code
       AND s.line_definition_code        = w.line_definition_code
       AND s.accounting_line_type_code   = w.accounting_line_type_code
       AND s.accounting_line_code        = w.accounting_line_code
       AND s.mpa_header_desc_type_code   = w.mpa_header_desc_type_code
       AND s.mpa_header_desc_code        = w.mpa_header_desc_code
       AND w.application_id              = g_application_id
       AND w.amb_context_code            = g_amb_context_code
       AND w.mpa_header_desc_type_code   = p_description_type_code
       AND w.mpa_header_desc_code        = p_description_code
   UNION
    SELECT 'AMB_MPA_LINE_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , w.mpa_accounting_line_type_code
         , w.mpa_accounting_line_code
      FROM xla_mpa_jlt_assgns w
         , xla_mpa_jlt_assgns s
     WHERE s.application_id                = g_application_id
       AND s.amb_context_code              = g_staging_context_code
       AND s.event_class_code              = w.event_class_code
       AND s.event_type_code               = w.event_type_code
       AND s.line_definition_owner_code    = w.line_definition_owner_code
       AND s.line_definition_code          = w.line_definition_code
       AND s.accounting_line_type_code     = w.accounting_line_type_code
       AND s.accounting_line_code          = w.accounting_line_code
       AND s.mpa_accounting_line_type_code = w.mpa_accounting_line_type_code
       AND s.mpa_accounting_line_code      = w.mpa_accounting_line_code
       AND s.description_type_code         = w.description_type_code
       AND s.description_code              = w.description_code
       AND w.application_id                = g_application_id
       AND w.amb_context_code              = g_amb_context_code
       AND w.description_type_code         = p_description_type_code
       AND w.description_code              = p_description_code;
Line: 2564

    l_log_module := C_DEFAULT_MODULE||'.record_updated_desc';
Line: 2568

    trace(p_msg    => 'BEGIN of function record_updated_desc: '||
                      ', p_description_type_code = '||p_description_type_code||
                      ', p_description_code = '||p_description_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2581

      record_updated_assignment
         (p_parent_component_type          => l_assgn.parent_component_type
         ,p_product_rule_type_code         => l_assgn.product_rule_type_code
         ,p_product_rule_code              => l_assgn.product_rule_code
         ,p_event_class_code               => l_assgn.event_class_code
         ,p_event_type_code                => l_assgn.event_type_code
         ,p_line_definition_owner_code     => l_assgn.line_definition_owner_code
         ,p_line_definition_code           => l_assgn.line_definition_code
         ,p_accounting_line_type_code      => l_assgn.accounting_line_type_code
         ,p_accounting_line_code           => l_assgn.accounting_line_code
         ,p_mpa_acct_line_type_code        => l_assgn.mpa_accounting_line_type_code
         ,p_mpa_acct_line_code             => l_assgn.mpa_accounting_line_code
         ,p_merge_impact                   => C_MERGE_IMPACT_UPDATED
         ,x_parent_key                     => l_parent_key);
Line: 2596

      record_updated_component
              (p_parent_component_type => l_assgn.parent_component_type
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_DESCRIPTION'
              ,p_component_key         => l_key
              ,p_merge_impact          => C_MERGE_IMPACT_UPDATED
              ,p_component_owner_code  => p_description_type_code
              ,p_component_code        => p_description_code);
Line: 2609

    trace(p_msg    => 'END of function record_updated_desc',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2620

END record_updated_desc;
Line: 2627

PROCEDURE record_deleted_desc
(p_description_type_code       VARCHAR2
,p_description_code            VARCHAR2)
IS
  CURSOR c_assgns IS
    SELECT 'AMB_AAD_EVENT_TYPE' parent_component_type
         , w.product_rule_type_code
         , w.product_rule_code
         , w.event_class_code
         , w.event_type_code
         , NULL line_definition_owner_code
         , NULL line_definition_code
         , NULL accounting_line_type_code
         , NULL accounting_line_code
         , NULL mpa_accounting_line_type_code
         , NULL mpa_accounting_line_code
      FROM xla_prod_acct_headers w
           LEFT OUTER JOIN xla_prod_acct_headers s
           ON  s.amb_context_code               = g_staging_context_code
           AND s.application_id                 = g_application_id
           AND s.product_rule_type_code         = w.product_rule_type_code
           AND s.product_rule_code              = w.product_rule_code
           AND s.event_class_code               = w.event_class_code
           AND s.event_type_code                = w.event_type_code
     WHERE w.application_id         = g_application_id
       AND w.amb_context_code       = g_amb_context_code
       AND w.description_type_code  = p_description_type_code
       AND w.description_code       = p_description_code
       AND (w.product_rule_type_code = C_OWNER_CUSTOM OR
            s.product_rule_type_code IS NOT NULL)
    UNION
    SELECT 'AMB_LINE_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL
         , NULL
      FROM xla_line_defn_jlt_assgns w
           LEFT OUTER JOIN xla_line_defn_jlt_assgns   s
           ON  s.amb_context_code            = g_staging_context_code
           AND s.application_id              = g_application_id
           AND s.event_class_code            = w.event_class_code
           AND s.event_type_code             = w.event_type_code
           AND s.line_definition_owner_code  = w.line_definition_owner_code
           AND s.line_definition_code        = w.line_definition_code
           AND s.accounting_line_type_code   = w.accounting_line_type_code
           AND s.accounting_line_code        = w.accounting_line_code
     WHERE w.application_id         = g_application_id
       AND w.amb_context_code       = g_amb_context_code
       AND w.description_type_code  = p_description_type_code
       AND w.description_code       = p_description_code
       AND (w.line_definition_owner_code = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL)
     UNION
    SELECT 'AMB_MPA_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL
         , NULL
      FROM xla_line_defn_jlt_assgns w
           LEFT OUTER JOIN xla_line_defn_jlt_assgns   s
           ON  s.amb_context_code            = g_staging_context_code
           AND s.application_id              = g_application_id
           AND s.event_class_code            = w.event_class_code
           AND s.event_type_code             = w.event_type_code
           AND s.line_definition_owner_code  = w.line_definition_owner_code
           AND s.line_definition_code        = w.line_definition_code
           AND s.accounting_line_type_code   = w.accounting_line_type_code
           AND s.accounting_line_code        = w.accounting_line_code
     WHERE w.application_id             = g_application_id
       AND w.amb_context_code           = g_amb_context_code
       AND w.mpa_header_desc_type_code  = p_description_type_code
       AND w.mpa_header_desc_code       = p_description_code
       AND (w.line_definition_owner_code = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL)
     UNION
    SELECT 'AMB_MPA_LINE_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , w.mpa_accounting_line_type_code
         , w.mpa_accounting_line_code
      FROM xla_mpa_jlt_assgns w
           LEFT OUTER JOIN xla_mpa_jlt_assgns s
           ON  s.amb_context_code              = g_staging_context_code
           AND s.application_id                = g_application_id
           AND s.event_class_code              = w.event_class_code
           AND s.event_type_code               = w.event_type_code
           AND s.line_definition_owner_code    = w.line_definition_owner_code
           AND s.line_definition_code          = w.line_definition_code
           AND s.accounting_line_type_code     = w.accounting_line_type_code
           AND s.accounting_line_code          = w.accounting_line_code
           AND s.mpa_accounting_line_type_code = w.mpa_accounting_line_type_code
           AND s.mpa_accounting_line_code      = w.mpa_accounting_line_code
     WHERE w.application_id         = g_application_id
       AND w.amb_context_code       = g_amb_context_code
       AND w.description_type_code  = p_description_type_code
       AND w.description_code       = p_description_code
       AND (w.line_definition_owner_code = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL);
Line: 2749

    l_log_module := C_DEFAULT_MODULE||'.record_deleted_desc';
Line: 2753

    trace(p_msg    => 'BEGIN of function record_deleted_desc: '||
                      ', p_description_type_code = '||p_description_type_code||
                      ', p_description_code = '||p_description_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2766

      record_updated_assignment
         (p_parent_component_type          => l_assgn.parent_component_type
         ,p_product_rule_type_code         => l_assgn.product_rule_type_code
         ,p_product_rule_code              => l_assgn.product_rule_code
         ,p_event_class_code               => l_assgn.event_class_code
         ,p_event_type_code                => l_assgn.event_type_code
         ,p_line_definition_owner_code     => l_assgn.line_definition_owner_code
         ,p_line_definition_code           => l_assgn.line_definition_code
         ,p_accounting_line_type_code      => l_assgn.accounting_line_type_code
         ,p_accounting_line_code           => l_assgn.accounting_line_code
         ,p_mpa_acct_line_type_code        => l_assgn.mpa_accounting_line_type_code
         ,p_mpa_acct_line_code             => l_assgn.mpa_accounting_line_code
         ,p_merge_impact                   => C_MERGE_IMPACT_UPDATED
         ,x_parent_key                     => l_parent_key);
Line: 2781

      record_updated_component
              (p_parent_component_type => l_assgn.parent_component_type
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_DESCRIPTION'
              ,p_component_key         => l_key
              ,p_merge_impact          => C_MERGE_IMPACT_DELETED
              ,p_event_class_code      => NULL
              ,p_event_type_code       => NULL
              ,p_component_owner_code  => p_description_type_code
              ,p_component_code        => p_description_code);
Line: 2797

    trace(p_msg    => 'END of function record_deleted_desc',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2808

END record_deleted_desc;
Line: 2815

PROCEDURE record_updated_desc_priority
(p_description_type_code       VARCHAR2
,p_description_code            VARCHAR2
,p_user_sequence               VARCHAR2
,p_merge_impact                VARCHAR2)
IS
  l_key                    VARCHAR2(240);
Line: 2825

    l_log_module := C_DEFAULT_MODULE||'.record_updated_desc_priority';
Line: 2829

    trace(p_msg    => 'BEGIN of function record_updated_desc_priority: '||
                      ', p_description_type_code = '||p_description_type_code||
                      ', p_description_code = '||p_description_code||
                      ', p_user_sequence = '||p_user_sequence,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2842

    record_updated_component
              (p_parent_component_type        => 'AMB_DESCRIPTION'
              ,p_parent_component_key         => p_description_type_code||C_CHAR||
                                                 p_description_code
              ,p_component_type               => 'AMB_DESC_PRIO'
              ,p_component_key                => l_key
              ,p_merge_impact                 => p_merge_impact
              ,p_event_class_code             => NULL
              ,p_event_type_code              => NULL
              ,p_component_code               => p_user_sequence
              ,p_parent_component_owner_code  => p_description_type_code
              ,p_parent_component_code        => p_description_code);
Line: 2855

    record_updated_desc
              (p_description_type_code => p_description_type_code
              ,p_description_code      => p_description_code);
Line: 2862

    trace(p_msg    => 'END of function record_updated_desc_priority',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 2873

END record_updated_desc_priority;
Line: 2882

PROCEDURE record_updated_ac
(p_ac_type_code       VARCHAR2
,p_ac_code            VARCHAR2
,p_merge_impact       VARCHAR2)
IS
  CURSOR c_assgns IS
    SELECT 'AMB_AAD_EVENT_TYPE' parent_component_type
         , w.product_rule_type_code
         , w.product_rule_code
         , w.event_class_code
         , w.event_type_code
         , NULL line_definition_owner_code
         , NULL line_definition_code
         , NULL accounting_line_type_code
         , NULL accounting_line_code
         , NULL mpa_accounting_line_type_code
         , NULL mpa_accounting_line_code
      FROM xla_aad_header_ac_assgns w
         , xla_prod_acct_headers b
     WHERE b.amb_context_code               = g_staging_context_code
       AND b.application_id                 = g_application_id
       AND b.product_rule_type_code         = w.product_rule_type_code
       AND b.product_rule_code              = w.product_rule_code
       AND b.event_class_code               = w.event_class_code
       AND b.event_type_code                = w.event_type_code
       AND w.amb_context_code               = g_amb_context_code
       AND w.analytical_criterion_type_code = p_ac_type_code
       AND w.analytical_criterion_code      = p_ac_code
     UNION
    SELECT 'AMB_LINE_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL
         , NULL
      FROM xla_line_defn_ac_assgns w
         , xla_line_defn_jlt_assgns b
     WHERE b.amb_context_code               = g_staging_context_code
       AND b.application_id                 = g_application_id
       AND b.event_class_code               = w.event_class_code
       AND b.event_type_code                = w.event_type_code
       AND b.line_definition_owner_code     = w.line_definition_owner_code
       AND b.line_definition_code           = w.line_definition_code
       AND b.accounting_line_type_code      = w.accounting_line_type_code
       AND b.accounting_line_code           = w.accounting_line_code
       AND w.amb_context_code               = g_amb_context_code
       AND w.analytical_criterion_type_code = p_ac_type_code
       AND w.analytical_criterion_code      = p_ac_code
     UNION
    SELECT 'AMB_MPA_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL
         , NULL
      FROM xla_mpa_header_ac_assgns w
         , xla_line_defn_jlt_assgns b
     WHERE b.amb_context_code               = g_staging_context_code
       AND b.application_id                 = g_application_id
       AND b.event_class_code               = w.event_class_code
       AND b.event_type_code                = w.event_type_code
       AND b.line_definition_owner_code     = w.line_definition_owner_code
       AND b.line_definition_code           = w.line_definition_code
       AND b.accounting_line_type_code      = w.accounting_line_type_code
       AND b.accounting_line_code           = w.accounting_line_code
       AND w.amb_context_code               = g_amb_context_code
       AND w.analytical_criterion_type_code = p_ac_type_code
       AND w.analytical_criterion_code      = p_ac_code
     UNION
    SELECT 'AMB_MPA_LINE_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , w.mpa_accounting_line_type_code
         , w.mpa_accounting_line_code
      FROM xla_mpa_jlt_ac_assgns w
         , xla_mpa_jlt_assgns    b
     WHERE b.amb_context_code               = g_staging_context_code
       AND b.application_id                 = g_application_id
       AND b.event_class_code               = w.event_class_code
       AND b.event_type_code                = w.event_type_code
       AND b.line_definition_owner_code     = w.line_definition_owner_code
       AND b.line_definition_code           = w.line_definition_code
       AND b.accounting_line_type_code      = w.accounting_line_type_code
       AND b.accounting_line_code           = w.accounting_line_code
       AND b.mpa_accounting_line_type_code  = w.mpa_accounting_line_type_code
       AND b.mpa_accounting_line_code       = w.mpa_accounting_line_code
       AND w.amb_context_code               = g_amb_context_code
       AND w.analytical_criterion_type_code = p_ac_type_code
       AND w.analytical_criterion_code      = p_ac_code;
Line: 2993

    l_log_module := C_DEFAULT_MODULE||'.record_updated_ac';
Line: 2997

    trace(p_msg    => 'BEGIN of function record_updated_ac: '||
                      ', p_ac_type_code = '||p_ac_type_code||
                      ', p_ac_code = '||p_ac_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3010

      record_updated_assignment
         (p_parent_component_type          => l_assgn.parent_component_type
         ,p_product_rule_type_code         => l_assgn.product_rule_type_code
         ,p_product_rule_code              => l_assgn.product_rule_code
         ,p_event_class_code               => l_assgn.event_class_code
         ,p_event_type_code                => l_assgn.event_type_code
         ,p_line_definition_owner_code     => l_assgn.line_definition_owner_code
         ,p_line_definition_code           => l_assgn.line_definition_code
         ,p_accounting_line_type_code      => l_assgn.accounting_line_type_code
         ,p_accounting_line_code           => l_assgn.accounting_line_code
         ,p_mpa_acct_line_type_code        => l_assgn.mpa_accounting_line_type_code
         ,p_mpa_acct_line_code             => l_assgn.mpa_accounting_line_code
         ,p_merge_impact                   => C_MERGE_IMPACT_UPDATED
         ,x_parent_key                     => l_parent_key);
Line: 3025

      record_updated_component
              (p_parent_component_type => l_assgn.parent_component_type
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_AC'
              ,p_component_key         => l_key
              ,p_merge_impact          => p_merge_impact
              ,p_event_class_code      => NULL
              ,p_event_type_code       => NULL
              ,p_component_owner_code  => p_ac_type_code
              ,p_component_code        => p_ac_code);
Line: 3040

    trace(p_msg    => 'END of function record_updated_ac',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3051

END record_updated_ac;
Line: 3060

PROCEDURE record_deleted_ac
(p_ac_type_code       VARCHAR2
,p_ac_code            VARCHAR2)
IS
  --
  -- Marked the AC is deleted from the assignment if
  -- 1. The AC is assigned to any CUSTOM component in the working context OR
  -- 2. The AC assignment exists in the staging context
  --
  CURSOR c_assgns IS
    SELECT 'AMB_AAD_EVENT_TYPE' parent_component_type
         , w.product_rule_type_code
         , w.product_rule_code
         , w.event_class_code
         , w.event_type_code
         , NULL line_definition_owner_code
         , NULL line_definition_code
         , NULL accounting_line_type_code
         , NULL accounting_line_code
         , NULL mpa_accounting_line_type_code
         , NULL mpa_accounting_line_code
      FROM xla_aad_header_ac_assgns w
           LEFT OUTER JOIN xla_prod_acct_headers s
           ON  s.amb_context_code               = g_staging_context_code
           AND s.application_id                 = g_application_id
           AND s.product_rule_type_code         = w.product_rule_type_code
           AND s.product_rule_code              = w.product_rule_code
           AND s.event_class_code               = w.event_class_code
           AND s.event_type_code                = w.event_type_code
     WHERE w.amb_context_code               = g_amb_context_code
       AND w.analytical_criterion_type_code = p_ac_type_code
       AND w.analytical_criterion_code      = p_ac_code
       AND (w.product_rule_type_code = C_OWNER_CUSTOM OR
            s.product_rule_type_code IS NOT NULL)
     UNION
    SELECT 'AMB_LINE_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL
         , NULL
      FROM xla_line_defn_ac_assgns w
           LEFT OUTER JOIN xla_line_defn_jlt_assgns s
           ON  s.amb_context_code           = g_staging_context_code
           AND s.event_class_code           = w.event_class_code
           AND s.event_type_code            = w.event_type_code
           AND s.line_definition_owner_code = w.line_definition_owner_code
           AND s.line_definition_code       = w.line_definition_code
           AND s.accounting_line_type_code  = w.accounting_line_type_code
           AND s.accounting_line_code       = w.accounting_line_code
     WHERE w.amb_context_code               = g_amb_context_code
       AND w.analytical_criterion_type_code = p_ac_type_code
       AND w.analytical_criterion_code      = p_ac_code
       AND (w.accounting_line_type_code = C_OWNER_CUSTOM OR
            s.accounting_line_type_code IS NOT NULL)
     UNION
    SELECT 'AMB_MPA_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , NULL
         , NULL
      FROM xla_mpa_header_ac_assgns w
           LEFT OUTER JOIN xla_line_defn_jlt_assgns s
           ON  s.amb_context_code           = g_staging_context_code
           AND s.event_class_code           = w.event_class_code
           AND s.event_type_code            = w.event_type_code
           AND s.line_definition_owner_code = w.line_definition_owner_code
           AND s.line_definition_code       = w.line_definition_code
           AND s.accounting_line_type_code  = w.accounting_line_type_code
           AND s.accounting_line_code       = w.accounting_line_code
     WHERE w.amb_context_code               = g_amb_context_code
       AND w.analytical_criterion_type_code = p_ac_type_code
       AND w.analytical_criterion_code      = p_ac_code
       AND (w.line_definition_owner_code = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL)
     UNION
    SELECT 'AMB_MPA_LINE_ASSIGNMENT'
         , NULL
         , NULL
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , w.mpa_accounting_line_type_code
         , w.mpa_accounting_line_code
      FROM xla_mpa_jlt_ac_assgns w
           LEFT OUTER JOIN xla_mpa_jlt_assgns s
           ON  s.amb_context_code              = g_staging_context_code
           AND s.event_class_code              = w.event_class_code
           AND s.event_type_code               = w.event_type_code
           AND s.line_definition_owner_code    = w.line_definition_owner_code
           AND s.line_definition_code          = w.line_definition_code
           AND s.accounting_line_type_code     = w.accounting_line_type_code
           AND s.accounting_line_code          = w.accounting_line_code
           AND s.mpa_accounting_line_type_code = w.mpa_accounting_line_type_code
           AND s.mpa_accounting_line_code      = w.mpa_accounting_line_code
     WHERE w.amb_context_code               = g_amb_context_code
       AND w.analytical_criterion_type_code = p_ac_type_code
       AND w.analytical_criterion_code      = p_ac_code
       AND (w.line_definition_owner_code = C_OWNER_CUSTOM OR
            s.line_definition_owner_code IS NOT NULL);
Line: 3180

    l_log_module := C_DEFAULT_MODULE||'.record_deleted_ac';
Line: 3184

    trace(p_msg    => 'BEGIN of function record_deleted_ac: '||
                      ', p_ac_type_code = '||p_ac_type_code||
                      ', p_ac_code = '||p_ac_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3197

      record_updated_assignment
         (p_parent_component_type          => l_assgn.parent_component_type
         ,p_product_rule_type_code         => l_assgn.product_rule_type_code
         ,p_product_rule_code              => l_assgn.product_rule_code
         ,p_event_class_code               => l_assgn.event_class_code
         ,p_event_type_code                => l_assgn.event_type_code
         ,p_line_definition_owner_code     => l_assgn.line_definition_owner_code
         ,p_line_definition_code           => l_assgn.line_definition_code
         ,p_accounting_line_type_code      => l_assgn.accounting_line_type_code
         ,p_accounting_line_code           => l_assgn.accounting_line_code
         ,p_mpa_acct_line_type_code        => l_assgn.mpa_accounting_line_type_code
         ,p_mpa_acct_line_code             => l_assgn.mpa_accounting_line_code
         ,p_merge_impact                   => C_MERGE_IMPACT_UPDATED
         ,x_parent_key                     => l_parent_key);
Line: 3212

      record_updated_component
              (p_parent_component_type => l_assgn.parent_component_type
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_AC'
              ,p_component_key         => l_key
              ,p_merge_impact          => C_MERGE_IMPACT_DELETED
              ,p_component_owner_code  => p_ac_type_code
              ,p_component_code        => p_ac_code);
Line: 3226

    trace(p_msg    => 'END of function record_deleted_ac',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3237

END record_deleted_ac;
Line: 3244

PROCEDURE record_updated_ac_detail
(p_ac_type_code       VARCHAR2
,p_ac_code            VARCHAR2
,p_ac_detail_code     VARCHAR2
,p_merge_impact       VARCHAR2)
IS
  l_key                    VARCHAR2(240);
Line: 3254

    l_log_module := C_DEFAULT_MODULE||'.record_updated_ac_detail';
Line: 3258

    trace(p_msg    => 'BEGIN of function record_updated_ac_detail: '||
                      ', p_ac_type_code = '||p_ac_type_code||
                      ', p_ac_code = '||p_ac_code||
                      ', p_ac_detail_code = '||p_ac_detail_code,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3272

    record_updated_component
              (p_parent_component_type        => 'AMB_AC'
              ,p_parent_component_key         => p_ac_type_code||C_CHAR||
                                                 p_ac_code
              ,p_component_type               => 'AMB_AC_DETAIL'
              ,p_component_key                => l_key
              ,p_merge_impact                 => p_merge_impact
              ,p_event_class_code             => NULL
              ,p_event_type_code              => NULL
              ,p_component_owner_code         => NULL
              ,p_component_code               => p_ac_detail_code
              ,p_parent_component_owner_code  => p_ac_type_code
              ,p_parent_component_code        => p_ac_code);
Line: 3286

    record_updated_ac
              (p_ac_type_code          => p_ac_type_code
              ,p_ac_code               => p_ac_code
              ,p_merge_impact          => C_MERGE_IMPACT_UPDATED);
Line: 3294

    trace(p_msg    => 'END of function record_updated_ac_detail',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3305

END record_updated_ac_detail;
Line: 3317

FUNCTION update_group_number
(p_product_rule_type_code  VARCHAR2
,p_product_rule_code       VARCHAR2
,p_group_number            INTEGER)
RETURN BOOLEAN
IS
  l_retcode       BOOLEAN;
Line: 3327

    l_log_module := C_DEFAULT_MODULE||'.update_group_number';
Line: 3331

    trace(p_msg    => 'BEGIN of function update_group_number: '||
                      p_product_rule_type_code||','||
                      p_product_rule_code||','||
                      p_group_number,
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3353

    trace(p_msg    => 'END of function update_group_number',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3365

      (p_location => 'xla_aad_merge_analysis_pvt.update_group_number');
Line: 3367

END update_group_number;
Line: 3411

PROCEDURE analyze_deleted_oracle_aads
IS
  CURSOR c_comp IS
    SELECT w.product_rule_type_code
         , w.product_rule_code
      FROM xla_product_rules_b w
     WHERE w.application_id         = g_application_id
       AND w.amb_context_code       = g_amb_context_code
       AND w.product_rule_type_code = C_OWNER_ORACLE
       AND NOT EXISTS (
           SELECT 1
             FROM xla_product_rules_b s
            WHERE s.application_id         = g_application_id
              AND s.amb_context_code       = g_staging_context_code
              AND s.product_rule_type_code = w.product_rule_type_code
              AND s.product_rule_code      = w.product_rule_code);
Line: 3431

    l_log_module := C_DEFAULT_MODULE||'.analyze_deleted_oracle_aads';
Line: 3435

    trace(p_msg    => 'BEGIN of function analyze_deleted_oracle_aads',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3441

    trace(p_msg    => 'BEGIN LOOP: deleted oracle aads',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3448

      trace(p_msg    => 'LOOP: deleted oracle aad '||
                        '- product_rule_type_code = '||l_comp.product_rule_type_code||
                        ', product_rule_code = '||l_comp.product_rule_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 3455

    record_updated_aad
          (p_product_rule_type_code => l_comp.product_rule_type_code
          ,p_product_rule_code      => l_comp.product_rule_code
          ,p_merge_impact           => C_MERGE_IMPACT_DELETED);
Line: 3462

    trace(p_msg    => 'END LOOP: deleted oracle aads',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3468

    trace(p_msg    => 'END of function analyze_deleted_oracle_aads',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3479

END analyze_deleted_oracle_aads;
Line: 3487

PROCEDURE analyze_deleted_oracle_ems
IS
  CURSOR c_comp IS
    SELECT w.product_rule_type_code
         , w.product_rule_code
         , w.event_class_code
         , w.event_type_code
      FROM xla_prod_acct_headers w
         , xla_product_rules_b b
     WHERE b.application_id         = g_application_id
       AND b.amb_context_code       = g_staging_context_code
       AND b.product_rule_type_code = w.product_rule_type_code
       AND b.product_rule_code      = w.product_rule_code
       AND w.application_id         = g_application_id
       AND w.amb_context_code       = g_amb_context_code
       AND w.product_rule_type_code = C_OWNER_ORACLE
       AND NOT EXISTS (
           SELECT 1
             FROM xla_prod_acct_headers s
            WHERE s.application_id         = g_application_id
              AND s.amb_context_code       = g_staging_context_code
              AND s.product_rule_type_code = w.product_rule_type_code
              AND s.product_rule_code      = w.product_rule_code
              AND s.event_class_code       = w.event_class_code
              AND s.event_type_code        = w.event_type_code);
Line: 3516

    l_log_module := C_DEFAULT_MODULE||'.analyze_deleted_oracle_ems';
Line: 3520

    trace(p_msg    => 'BEGIN of function analyze_deleted_oracle_ems',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3526

    trace(p_msg    => 'BEGIN LOOP: deleted oracle event types',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3533

      trace(p_msg    => 'LOOP: deleted oracle event type '||
                        '- product_rule_type_code = '||l_comp.product_rule_type_code||
                        ', product_rule_code = '||l_comp.product_rule_code||
                        ', event_class_code = '||l_comp.event_class_code||
                        ', event_type_code = '||l_comp.event_type_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 3542

    record_updated_header_assgn
          (p_product_rule_type_code => l_comp.product_rule_type_code
          ,p_product_rule_code      => l_comp.product_rule_code
          ,p_event_class_code       => l_comp.event_class_code
          ,p_event_type_code        => l_comp.event_type_code
          ,p_merge_impact           => C_MERGE_IMPACT_DELETED);
Line: 3551

    trace(p_msg    => 'END LOOP: deleted oracle event types',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3557

    trace(p_msg    => 'END of function analyze_deleted_oracle_ems',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3568

END analyze_deleted_oracle_ems;
Line: 3576

PROCEDURE analyze_deleted_oracle_adrs
IS
  CURSOR c_comp IS
    SELECT w.application_id segment_rule_appl_id
          ,w.segment_rule_type_code
         , w.segment_rule_code
      FROM xla_seg_rules_b w
     WHERE w.application_id        = g_application_id
       AND w.amb_context_code      = g_amb_context_code
       AND w.segment_rule_type_code = C_OWNER_ORACLE
       AND NOT EXISTS (
           SELECT 1
             FROM xla_seg_rules_b s
            WHERE s.application_id         = g_application_id
              AND s.amb_context_code       = g_staging_context_code
              AND s.segment_rule_type_code = w.segment_rule_type_code
              AND s.segment_rule_code      = w.segment_rule_code);
Line: 3595

    SELECT w.application_id segment_rule_appl_id
          ,w.segment_rule_type_code
          ,w.segment_rule_code
          ,w.user_sequence
          ,C_MERGE_IMPACT_DELETED
      FROM xla_seg_rule_details w
         , xla_seg_rules_b b
     WHERE b.application_id         = g_application_id
       AND b.amb_context_code       = g_staging_context_code
       AND b.segment_rule_type_code = w.segment_rule_type_code
       AND b.segment_rule_code      = w.segment_rule_code
       AND w.application_id         = g_application_id
       AND w.amb_context_code       = g_amb_context_code
       AND w.segment_rule_type_code = C_OWNER_ORACLE
       AND NOT EXISTS
           (SELECT 1
              FROM xla_seg_rule_details s
             WHERE s.application_id         = g_application_id
               AND s.amb_context_code       = g_staging_context_code
               AND s.segment_rule_type_code = w.segment_rule_type_code
               AND s.segment_rule_code      = w.segment_rule_code
               AND s.user_sequence          = w.user_sequence);
Line: 3621

    l_log_module := C_DEFAULT_MODULE||'.analyze_deleted_oracle_adrs';
Line: 3625

    trace(p_msg    => 'BEGIN of function analyze_deleted_oracle_adrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3631

    trace(p_msg    => 'BEGIN LOOP: deleted oracle adrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3638

      trace(p_msg    => 'LOOP: deleted oracle adr '||
                        '- segment_rule_type_code = '||l_comp.segment_rule_type_code||
                        ', segment_rule_code = '||l_comp.segment_rule_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 3645

    record_deleted_adr
          (p_segment_rule_appl_id   => l_comp.segment_rule_appl_id
          ,p_segment_rule_type_code => l_comp.segment_rule_type_code
          ,p_segment_rule_code      => l_comp.segment_rule_code);
Line: 3652

    trace(p_msg    => 'END LOOP: deleted oracle adrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3658

    trace(p_msg    => 'BEGIN LOOP: deleted oracle adr details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3665

      trace(p_msg    => 'LOOP: deleted oracle adr detail '||
                        '- segment_rule_type_code = '||l_comp.segment_rule_type_code||
                        ', segment_rule_code = '||l_comp.segment_rule_code||
                        ', user_sequence = '||l_comp.user_sequence,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 3673

    record_updated_adr_detail
          (p_segment_rule_appl_id   => l_comp.segment_rule_appl_id
          ,p_segment_rule_type_code => l_comp.segment_rule_type_code
          ,p_segment_rule_code      => l_comp.segment_rule_code
          ,p_user_sequence          => l_comp.user_sequence
          ,p_merge_impact           => C_MERGE_IMPACT_DELETED);
Line: 3682

    trace(p_msg    => 'END LOOP: deleted oracle adr details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3688

    trace(p_msg    => 'END of function analyze_deleted_oracle_adrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3699

END analyze_deleted_oracle_adrs;
Line: 3707

PROCEDURE analyze_deleted_oracle_acs
IS
  CURSOR c_comp IS
    SELECT w.analytical_criterion_type_code
         , w.analytical_criterion_code
      FROM xla_analytical_hdrs_b w
     WHERE w.application_id        = g_application_id
       AND w.amb_context_code      = g_amb_context_code
       AND w.analytical_criterion_type_code = C_OWNER_ORACLE
       AND NOT EXISTS (
           SELECT 1
             FROM xla_analytical_hdrs_b s
            WHERE s.application_id                 = g_application_id
              AND s.amb_context_code               = g_staging_context_code
              AND s.analytical_criterion_type_code = w.analytical_criterion_type_code
              AND s.analytical_criterion_code      = w.analytical_criterion_code);
Line: 3725

    SELECT w.analytical_criterion_type_code
          ,w.analytical_criterion_code
          ,w.analytical_detail_code
      FROM xla_analytical_dtls_b w
         , xla_analytical_hdrs_b b
     WHERE b.amb_context_code               = g_staging_context_code
       AND b.application_id                 = g_application_id
       AND b.analytical_criterion_type_code = w.analytical_criterion_type_code
       AND b.analytical_criterion_code      = w.analytical_criterion_code
       AND w.amb_context_code               = g_amb_context_code
       AND w.analytical_criterion_type_code = C_OWNER_ORACLE
       AND NOT EXISTS
           (SELECT 1
              FROM xla_analytical_dtls_b s
             WHERE s.amb_context_code               = g_staging_context_code
               AND s.analytical_criterion_type_code = w.analytical_criterion_type_code
               AND s.analytical_criterion_code      = w.analytical_criterion_code
               AND s.analytical_detail_code         = w.analytical_detail_code);
Line: 3747

    l_log_module := C_DEFAULT_MODULE||'.analyze_deleted_oracle_acs';
Line: 3751

    trace(p_msg    => 'BEGIN of function analyze_deleted_oracle_acs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3757

    trace(p_msg    => 'BEGIN LOOP: deleted oracle ac ',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3764

      trace(p_msg    => 'LOOP: deleted oracle ac '||
                        '- analytical_criterion_type_code = '||l_comp.analytical_criterion_type_code||
                        ', analytical_criterion_code = '||l_comp.analytical_criterion_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 3771

    record_deleted_ac
          (p_ac_type_code => l_comp.analytical_criterion_type_code
          ,p_ac_code      => l_comp.analytical_criterion_code);
Line: 3777

    trace(p_msg    => 'END LOOP: deleted oracle ac ',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3783

    trace(p_msg    => 'BEGIN LOOP: deleted oracle ac details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3790

      trace(p_msg    => 'LOOP: deleted oracle ac detail '||
                        '- analytical_criterion_type_code = '||l_comp.analytical_criterion_type_code||
                        ', analytical_criterion_code = '||l_comp.analytical_criterion_code||
                        ', analytical_detail_code = '||l_comp.analytical_detail_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 3798

    record_updated_ac_detail
          (p_ac_type_code   => l_comp.analytical_criterion_type_code
          ,p_ac_code        => l_comp.analytical_criterion_code
          ,p_ac_detail_code => l_comp.analytical_detail_code
          ,p_merge_impact   => C_MERGE_IMPACT_DELETED);
Line: 3806

    trace(p_msg    => 'END LOOP: deleted oracle ac details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3812

    trace(p_msg    => 'END of function analyze_deleted_oracle_acs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3823

END analyze_deleted_oracle_acs;
Line: 3831

PROCEDURE analyze_deleted_oracle_descs
IS
  CURSOR c_comp IS
    SELECT w.description_type_code
         , w.description_code
      FROM xla_descriptions_b w
     WHERE w.application_id        = g_application_id
       AND w.amb_context_code      = g_amb_context_code
       AND w.description_type_code = C_OWNER_ORACLE
       AND NOT EXISTS (
           SELECT 1
             FROM xla_descriptions_b s
            WHERE s.application_id        = g_application_id
              AND s.amb_context_code      = g_staging_context_code
              AND s.description_type_code = w.description_type_code
              AND s.description_code      = w.description_code);
Line: 3851

    l_log_module := C_DEFAULT_MODULE||'.analyze_deleted_oracle_descs';
Line: 3855

    trace(p_msg    => 'BEGIN of function analyze_deleted_oracle_descs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3861

    trace(p_msg    => 'BEGIN LOOP: deleted oracle descriptions',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3868

      trace(p_msg    => 'LOOP: deleted oracle ac '||
                        '- description_type_code = '||l_comp.description_type_code||
                        ', description_code = '||l_comp.description_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 3875

    record_deleted_desc
          (p_description_type_code => l_comp.description_type_code
          ,p_description_code      => l_comp.description_code);
Line: 3881

    trace(p_msg    => 'END LOOP: deleted oracle descriptions',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3887

    trace(p_msg    => 'END of function analyze_deleted_oracle_descs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3898

END analyze_deleted_oracle_descs;
Line: 3906

PROCEDURE analyze_deleted_oracle_jlts
IS
  CURSOR c_comp IS
    SELECT w.event_class_code
         , w.accounting_line_type_code
         , w.accounting_line_code
      FROM xla_acct_line_types_b w
     WHERE w.application_id            = g_application_id
       AND w.amb_context_code          = g_amb_context_code
       AND w.accounting_line_type_code = C_OWNER_ORACLE
       AND NOT EXISTS (
           SELECT 1
             FROM xla_acct_line_types_b s
            WHERE s.application_id            = g_application_id
              AND s.amb_context_code          = g_staging_context_code
              AND s.event_class_code          = w.event_class_code
              AND s.accounting_line_type_code = w.accounting_line_type_code
              AND s.accounting_line_code      = w.accounting_line_code);
Line: 3926

    SELECT w.event_class_code
         , w.accounting_line_type_code
          ,w.accounting_line_code
          ,w.accounting_attribute_code
      FROM xla_jlt_acct_attrs w
         , xla_acct_line_types_b b
     WHERE b.amb_context_code          = g_staging_context_code
       AND b.application_id            = g_application_id
       AND b.accounting_line_type_code = w.accounting_line_type_code
       AND b.accounting_line_code      = w.accounting_line_code
       AND w.amb_context_code          = g_amb_context_code
       AND w.application_id            = g_application_id
       AND w.accounting_line_type_code = C_OWNER_ORACLE
       AND NOT EXISTS
           (SELECT 1
              FROM xla_jlt_acct_attrs s
             WHERE s.amb_context_code          = g_staging_context_code
               AND s.application_id            = g_application_id
               AND s.accounting_line_type_code = w.accounting_line_type_code
               AND s.accounting_line_code      = w.accounting_line_code
               AND s.accounting_attribute_code = w.accounting_attribute_code);
Line: 3951

    l_log_module := C_DEFAULT_MODULE||'.analyze_deleted_oracle_jlts';
Line: 3955

    trace(p_msg    => 'BEGIN of function analyze_deleted_oracle_jlts',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3961

    trace(p_msg    => 'BEGIN LOOP: deleted oracle jlts',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3968

      trace(p_msg    => 'LOOP: deleted oracle jlt '||
                        '- event_class_code = '||l_comp.event_class_code||
                        ', accounting_line_type_code = '||l_comp.accounting_line_type_code||
                        ', accounting_line_code = '||l_comp.accounting_line_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 3976

    record_deleted_jlt
          (p_event_class_code          => l_comp.event_class_code
          ,p_accounting_line_type_code => l_comp.accounting_line_type_code
          ,p_accounting_line_code      => l_comp.accounting_line_code);
Line: 3983

    trace(p_msg    => 'END LOOP: deleted oracle jlts',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3989

    trace(p_msg    => 'BEGIN LOOP: deleted oracle jlt details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 3996

      trace(p_msg    => 'LOOP: deleted oracle jlt '||
                        '- event_class_code = '||l_comp.event_class_code||
                        ', accounting_line_type_code = '||l_comp.accounting_line_type_code||
                        ', accounting_line_code = '||l_comp.accounting_line_code||
                        ', accounting_attribute_code = '||l_comp.accounting_attribute_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 4005

    record_updated_jlt_acct_attr
          (p_event_class_code          => l_comp.event_class_code
          ,p_accounting_line_type_code => l_comp.accounting_line_type_code
          ,p_accounting_line_code      => l_comp.accounting_line_code
          ,p_accounting_attribute_code => l_comp.accounting_attribute_code
          ,p_merge_impact              => C_MERGE_IMPACT_DELETED);
Line: 4014

    trace(p_msg    => 'END LOOP: deleted oracle jlt details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4020

    trace(p_msg    => 'END of function analyze_deleted_oracle_jlts',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4031

END analyze_deleted_oracle_jlts;
Line: 4039

PROCEDURE analyze_deleted_oracle_jlds
IS
  CURSOR c_comp IS
    SELECT w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
      FROM xla_line_definitions_b w
     WHERE w.application_id             = g_application_id
       AND w.amb_context_code           = g_amb_context_code
       AND w.line_definition_owner_code = C_OWNER_ORACLE
       AND NOT EXISTS (
           SELECT 1
             FROM xla_line_definitions_b s
            WHERE s.application_id             = g_application_id
              AND s.amb_context_code           = g_staging_context_code
              AND s.event_class_code           = w.event_class_code
              AND s.event_type_code            = w.event_type_code
              AND s.line_definition_owner_code = w.line_definition_owner_code
              AND s.line_definition_code       = w.line_definition_code);
Line: 4061

    SELECT w.product_rule_type_code
         , w.product_rule_code
         , w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
      FROM xla_aad_line_defn_assgns w
         , xla_prod_acct_headers    b
     WHERE b.amb_context_code           = g_staging_context_code
       AND b.application_id             = g_application_id
       AND b.product_rule_type_code     = w.product_rule_type_code
       AND b.product_rule_code          = w.product_rule_code
       AND b.event_class_code           = w.event_class_code
       AND b.event_type_code            = w.event_type_code
       AND w.amb_context_code           = g_amb_context_code
       AND w.application_id             = g_application_id
       AND w.line_definition_owner_code = C_OWNER_ORACLE
       AND NOT EXISTS
           (SELECT 1
              FROM xla_aad_line_defn_assgns s
             WHERE s.amb_context_code           = g_staging_context_code
               AND s.application_id             = g_application_id
               AND s.product_rule_type_code     = w.product_rule_type_code
               AND s.product_rule_code          = w.product_rule_code
               AND s.event_class_code           = w.event_class_code
               AND s.event_type_code            = w.event_type_code
               AND s.line_definition_owner_code = w.line_definition_owner_code
               AND s.line_definition_code       = w.line_definition_code);
Line: 4093

    l_log_module := C_DEFAULT_MODULE||'.analyze_deleted_oracle_jlds';
Line: 4097

    trace(p_msg    => 'BEGIN of function analyze_deleted_oracle_jlds',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4103

    trace(p_msg    => 'BEGIN LOOP: deleted oracle jlds',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4110

      trace(p_msg    => 'LOOP: deleted oracle jld '||
                        '- event_class_code = '||l_comp.event_class_code||
                        ', event_type_code = '||l_comp.event_type_code||
                        ', line_definition_owner_code = '||l_comp.line_definition_owner_code||
                        ', line_definition_code = '||l_comp.line_definition_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 4119

    record_deleted_jld
          (p_event_class_code           => l_comp.event_class_code
          ,p_event_type_code            => l_comp.event_type_code
          ,p_line_definition_owner_code => l_comp.line_definition_owner_code
          ,p_line_definition_code       => l_comp.line_definition_code);
Line: 4127

    trace(p_msg    => 'END LOOP: deleted oracle jlds',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4133

    trace(p_msg    => 'BEGIN LOOP: deleted oracle jld assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4140

      trace(p_msg    => 'LOOP: deleted oracle jld assgns '||
                        '- product_rule_type_code = '||l_comp.product_rule_type_code||
                        ', product_rule_code = '||l_comp.product_rule_code||
                        ', event_class_code = '||l_comp.event_class_code||
                        ', event_type_code = '||l_comp.event_type_code||
                        ', line_definition_owner_code = '||l_comp.line_definition_owner_code||
                        ', line_definition_code = '||l_comp.line_definition_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 4151

    record_updated_jld_assgn
          (p_product_rule_type_code     => l_comp.product_rule_type_code
          ,p_product_rule_code          => l_comp.product_rule_code
          ,p_event_class_code           => l_comp.event_class_code
          ,p_event_type_code            => l_comp.event_type_code
          ,p_line_defn_owner_code       => l_comp.line_definition_owner_code
          ,p_line_defn_code             => l_comp.line_definition_code
          ,p_merge_impact               => C_MERGE_IMPACT_DELETED);
Line: 4162

    trace(p_msg    => 'END LOOP: deleted oracle jld assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4168

    trace(p_msg    => 'END of function analyze_deleted_oracle_jlds',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4179

END analyze_deleted_oracle_jlds;
Line: 4188

PROCEDURE analyze_deleted_oracle_comps
IS
  l_log_module          VARCHAR2(240);
Line: 4193

    l_log_module := C_DEFAULT_MODULE||'.analyze_deleted_oracle_comps';
Line: 4197

    trace(p_msg    => 'BEGIN of function analyze_deleted_oracle_comps',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4202

  analyze_deleted_oracle_acs;
Line: 4203

  analyze_deleted_oracle_adrs;
Line: 4204

  analyze_deleted_oracle_descs;
Line: 4205

  analyze_deleted_oracle_jlts;
Line: 4206

  analyze_deleted_oracle_jlds;
Line: 4207

  analyze_deleted_oracle_ems;
Line: 4208

  analyze_deleted_oracle_aads;
Line: 4211

    trace(p_msg    => 'END of function analyze_deleted_oracle_comps',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4222

END analyze_deleted_oracle_comps;
Line: 4234

    SELECT ts.mapping_set_code
          ,ts.name                        s_name
          ,tw.name                        w_name
          ,ts.description                 s_description
          ,tw.description                 w_description
          ,bs.accounting_coa_id           s_accounting_coa_id
          ,bw.accounting_coa_id           w_accounting_coa_id
          ,bs.value_set_id                s_value_set_id
          ,bw.value_set_id                w_value_set_id
          ,bs.enabled_flag                s_enabled_flag
          ,bw.enabled_flag                w_enabled_flag
          ,bs.flexfield_assign_mode_code  s_flexfield_assign_mode_code
          ,bw.flexfield_assign_mode_code  w_flexfield_assign_mode_code
          ,bs.flexfield_segment_code      s_flexfield_segment_code
          ,bw.flexfield_segment_code      w_flexfield_segment_code
          ,bs.view_application_id         s_view_application_id
          ,bw.view_application_id         w_view_application_id
          ,bs.lookup_type                 s_lookup_type
          ,bw.lookup_type                 w_lookup_type
      FROM xla_mapping_sets_b bs
           JOIN xla_mapping_sets_tl ts
           ON  ts.amb_context_code      = bs.amb_context_code
           AND ts.mapping_set_code      = bs.mapping_set_code
           AND ts.language              = USERENV('LANG')
           JOIN xla_mapping_sets_b bw
           ON  bw.amb_context_code      = g_amb_context_code
           AND bw.mapping_set_code      = bs.mapping_set_code
           JOIN xla_mapping_sets_tl tw
           ON  tw.amb_context_code      = bw.amb_context_code
           AND tw.mapping_set_code      = bw.mapping_set_code
           AND tw.language              = USERENV('LANG')
     WHERE bs.amb_context_code          = g_staging_context_code
       AND (ts.name                           <> tw.name                           OR
            NVL(ts.description,C_CHAR)        <> NVL(tw.description,C_CHAR)        OR
            NVL(bs.value_set_id,C_NUM)        <> NVL(bw.value_set_id,C_NUM)        OR
            NVL(bs.accounting_coa_id,C_NUM)   <> NVL(bw.accounting_coa_id,C_NUM)   OR
            bs.flexfield_assign_mode_code     <> bw.flexfield_assign_mode_code     OR
            NVL(bs.flexfield_segment_code,C_CHAR) <> NVL(bw.flexfield_segment_code,C_CHAR)     OR
            NVL(bs.view_application_id,C_NUM) <> NVL(bw.view_application_id,C_NUM) OR
            NVL(bs.lookup_type,C_CHAR)        <> NVL(bw.lookup_type,C_CHAR)        OR
            bs.enabled_flag                   <> bw.enabled_flag);
Line: 4290

    trace(p_msg    => 'BEGIN LOOP: updated mapping sets',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4298

      trace(p_msg    => 'LOOP: updated ms '||
                        '- mapping_set_code = '||l_comp.mapping_set_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 4307

      record_updated_property
          (p_component_type          => 'AMB_MS'
          ,p_component_key           => l_key
          ,p_property                => 'NAME'
          ,p_old_value               => l_comp.w_name
          ,p_new_value               => l_comp.s_name);
Line: 4316

      record_updated_property
          (p_component_type          => 'AMB_MS'
          ,p_component_key           => l_key
          ,p_property                => 'DESCRIPTION'
          ,p_old_value               => l_comp.w_description
          ,p_new_value               => l_comp.s_description);
Line: 4325

      record_updated_property
          (p_component_type          => 'AMB_MS'
          ,p_component_key           => l_key
          ,p_property                => 'ACCOUNTING_COA'
          ,p_old_value               => l_comp.w_accounting_coa_id
          ,p_new_value               => l_comp.s_accounting_coa_id);
Line: 4334

      record_updated_property
          (p_component_type          => 'AMB_MS'
          ,p_component_key           => l_key
          ,p_property                => 'VALUE_SET'
          ,p_old_value               => l_comp.w_value_set_id
          ,p_new_value               => l_comp.s_value_set_id);
Line: 4343

      record_updated_property
          (p_component_type          => 'AMB_MS'
          ,p_component_key           => l_key
          ,p_property                => 'FLEXFIELD_ASSIGN_MODE'
          ,p_old_value               => l_comp.w_flexfield_assign_mode_code
          ,p_new_value               => l_comp.s_flexfield_assign_mode_code
          ,p_lookup_type             => 'XLA_ASSIGN_FLEX_MODE');
Line: 4353

      record_updated_property
          (p_component_type          => 'AMB_MS'
          ,p_component_key           => l_key
          ,p_property                => 'FLEXFIELD_SEGMENT'
          ,p_old_value               => l_comp.w_flexfield_segment_code
          ,p_new_value               => l_comp.s_flexfield_segment_code);
Line: 4362

      record_updated_property
          (p_component_type          => 'AMB_MS'
          ,p_component_key           => l_key
          ,p_property                => 'VIEW_APPLICATION'
          ,p_old_value               => l_comp.w_view_application_id
          ,p_new_value               => l_comp.s_view_application_id);
Line: 4371

      record_updated_property
          (p_component_type          => 'AMB_MS'
          ,p_component_key           => l_key
          ,p_property                => 'LOOKUP_TYPE'
          ,p_old_value               => l_comp.w_lookup_type
          ,p_new_value               => l_comp.s_lookup_type);
Line: 4380

      record_updated_property
          (p_component_type          => 'AMB_MS'
          ,p_component_key           => l_key
          ,p_property                => 'ENABLED'
          ,p_old_value               => l_comp.w_enabled_flag
          ,p_new_value               => l_comp.s_enabled_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 4389

    record_updated_ms
          (p_mapping_set_code => l_comp.mapping_set_code
          ,p_merge_impact     => C_MERGE_IMPACT_UPDATED);
Line: 4396

    trace(p_msg    => 'END LOOP: updated mapping sets',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4424

    SELECT s.mapping_set_code
          ,bs.flexfield_assign_mode_code
          ,bs.value_set_id
          ,bs.view_application_id
          ,bs.lookup_type
          ,s.value_constant
          ,s.effective_date_from
          ,s.effective_date_to
          ,s.enabled_flag
          ,s.input_value_type_code
          ,s.input_value_constant
          ,C_MERGE_IMPACT_NEW merge_impact
      FROM xla_mapping_set_values s
           JOIN xla_mapping_sets_b bs
           ON  bs.amb_context_code      = s.amb_context_code
           AND bs.mapping_set_code      = s.mapping_set_code
     WHERE s.amb_context_code = g_staging_context_code
       AND NOT EXISTS
           (SELECT 1
              FROM xla_mapping_set_values w
             WHERE w.amb_context_code                      = g_amb_context_code
               AND w.mapping_set_code                      = s.mapping_set_code
               AND NVL(w.value_constant,C_CHAR)            = NVL(s.value_constant,C_CHAR)
               AND w.effective_date_from                   = s.effective_date_from
               AND NVL(w.effective_date_to,C_DATE)         = NVL(s.effective_date_to,C_DATE)
               AND w.enabled_flag                          = s.enabled_flag
               AND w.input_value_type_code                 = s.input_value_type_code
               AND NVL(w.input_value_constant,C_CHAR)      = NVL(s.input_value_constant,C_CHAR))
     UNION
    SELECT w.mapping_set_code
          ,bw.flexfield_assign_mode_code
          ,bw.value_set_id
          ,bw.view_application_id
          ,bw.lookup_type
          ,w.value_constant
          ,w.effective_date_from
          ,w.effective_date_to
          ,w.enabled_flag
          ,w.input_value_type_code
          ,w.input_value_constant
          ,C_MERGE_IMPACT_DELETED
      FROM xla_mapping_set_values w
           JOIN xla_mapping_sets_b bw
           ON  bw.amb_context_code      = w.amb_context_code
           AND bw.mapping_set_code      = w.mapping_set_code
     WHERE w.amb_context_code = g_staging_context_code
       AND NOT EXISTS
           (SELECT 1
              FROM xla_mapping_set_values s
             WHERE s.amb_context_code                      = g_staging_context_code
               AND s.mapping_set_code                      = w.mapping_set_code
               AND NVL(s.value_constant,C_CHAR)            = NVL(w.value_constant,C_CHAR)
               AND s.effective_date_from                   = w.effective_date_from
               AND NVL(s.effective_date_to,C_DATE)         = NVL(w.effective_date_to,C_DATE)
               AND s.enabled_flag                          = w.enabled_flag
               AND s.input_value_type_code                 = w.input_value_type_code
               AND NVL(s.input_value_constant,C_CHAR)      = NVL(w.input_value_constant,C_CHAR));
Line: 4496

    trace(p_msg    => 'BEGIN LOOP: updated mapping set values',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4504

      trace(p_msg    => 'LOOP: updated ms value '||
                        '- mapping_set_code = '||l_comp.mapping_set_code||
                        ', merge_impact = '||l_comp.merge_impact,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 4511

    record_updated_ms_value
            (p_mapping_set_code          => l_comp.mapping_set_code
            ,p_flexfield_assign_mode_code=> l_comp.flexfield_assign_mode_code
            ,p_value_set_id              => l_comp.value_set_id
            ,p_view_application_id       => l_comp.view_application_id
            ,p_lookup_type               => l_comp.lookup_type
            ,p_value_constant            => l_comp.value_constant
            ,p_effective_date_from       => l_comp.effective_date_from
            ,p_effective_date_to         => l_comp.effective_date_to
            ,p_enabled_flag              => l_comp.enabled_flag
            ,p_input_value_type_code     => l_comp.input_value_type_code
            ,p_input_value_constant      => l_comp.input_value_constant
            ,p_merge_impact              => l_comp.merge_impact);
Line: 4528

    trace(p_msg    => 'END LOOP: updated mapping set values',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4556

    SELECT ts.application_id segment_rule_appl_id
          ,ts.segment_rule_type_code
          ,ts.segment_rule_code
          ,ts.name                        s_name
          ,tw.name                        w_name
          ,ts.description                 s_description
          ,tw.description                 w_description
          ,bs.transaction_coa_id          s_transaction_coa_id
          ,bw.transaction_coa_id          w_transaction_coa_id
          ,bs.accounting_coa_id           s_accounting_coa_id
          ,bw.accounting_coa_id           w_accounting_coa_id
          ,bs.flexfield_assign_mode_code  s_flexfield_assign_mode_code
          ,bw.flexfield_assign_mode_code  w_flexfield_assign_mode_code
          ,bs.flexfield_segment_code      s_flexfield_segment_code
          ,bw.flexfield_segment_code      w_flexfield_segment_code
          ,bs.enabled_flag                s_enabled_flag
          ,bw.enabled_flag                w_enabled_flag
      FROM xla_seg_rules_b bs
           JOIN xla_seg_rules_tl ts
           ON  ts.application_id          = bs.application_id
           AND ts.amb_context_code        = bs.amb_context_code
           AND ts.segment_rule_type_code  = bs.segment_rule_type_code
           AND ts.segment_rule_code       = bs.segment_rule_code
           AND ts.language                = USERENV('LANG')
           JOIN xla_seg_rules_b bw
           ON  bw.application_id          = g_application_id
           AND bw.amb_context_code        = g_amb_context_code
           AND bw.segment_rule_type_code  = bs.segment_rule_type_code
           AND bw.segment_rule_code       = bs.segment_rule_code
           JOIN xla_seg_rules_tl tw
           ON  tw.application_id          = bw.application_id
           AND tw.amb_context_code        = bw.amb_context_code
           AND tw.segment_rule_type_code  = bw.segment_rule_type_code
           AND tw.segment_rule_code       = bw.segment_rule_code
           AND tw.language                = USERENV('LANG')
     WHERE bs.application_id              = g_application_id
       AND bs.amb_context_code            = g_staging_context_code
       AND (ts.name                               <> tw.name                              OR
            NVL(ts.description,C_CHAR)            <> NVL(tw.description,C_CHAR)           OR
            nvl(bs.transaction_coa_id,C_NUM)      <> NVL(bw.transaction_coa_id,C_NUM)     OR
            nvl(bs.accounting_coa_id,C_NUM)       <> NVL(bw.accounting_coa_id,C_NUM)      OR
            bs.flexfield_assign_mode_code         <> bw.flexfield_assign_mode_code        OR
            NVL(bs.flexfield_segment_code,C_CHAR) <> NVL(bw.flexfield_segment_code,C_CHAR)OR
            bs.enabled_flag                       <> bw.enabled_flag);
Line: 4615

    trace(p_msg    => 'BEGIN LOOP: updated adrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4627

      trace(p_msg    => 'LOOP: updated adr - '||l_key,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 4633

      record_updated_property
          (p_component_type          => 'AMB_ADR'
          ,p_component_key           => l_key
          ,p_property                => 'NAME'
          ,p_old_value               => l_comp.w_name
          ,p_new_value               => l_comp.s_name);
Line: 4642

      record_updated_property
          (p_component_type          => 'AMB_ADR'
          ,p_component_key           => l_key
          ,p_property                => 'DESCRIPTION'
          ,p_old_value               => l_comp.w_description
          ,p_new_value               => l_comp.s_description);
Line: 4651

      record_updated_property
          (p_component_type          => 'AMB_ADR'
          ,p_component_key           => l_key
          ,p_property                => 'TRANSACTION_COA'
          ,p_old_value               => l_comp.w_transaction_coa_id
          ,p_new_value               => l_comp.s_transaction_coa_id);
Line: 4660

      record_updated_property
          (p_component_type          => 'AMB_ADR'
          ,p_component_key           => l_key
          ,p_property                => 'ACCOUNTING_COA'
          ,p_old_value               => l_comp.w_accounting_coa_id
          ,p_new_value               => l_comp.s_accounting_coa_id);
Line: 4669

      record_updated_property
          (p_component_type          => 'AMB_ADR'
          ,p_component_key           => l_key
          ,p_property                => 'FLEXFIELD_ASSIGN_MODE'
          ,p_old_value               => l_comp.w_flexfield_assign_mode_code
          ,p_new_value               => l_comp.s_flexfield_assign_mode_code
          ,p_lookup_type             => 'XLA_ASSIGN_FLEX_MODE');
Line: 4679

      record_updated_property
          (p_component_type          => 'AMB_ADR'
          ,p_component_key           => l_key
          ,p_property                => 'FLEXFIELD_SEGMENT'
          ,p_old_value               => l_comp.w_flexfield_segment_code
          ,p_new_value               => l_comp.s_flexfield_segment_code);
Line: 4688

      record_updated_property
          (p_component_type          => 'AMB_ADR'
          ,p_component_key           => l_key
          ,p_property                => 'ENABLED'
          ,p_old_value               => l_comp.w_enabled_flag
          ,p_new_value               => l_comp.s_enabled_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 4697

    record_updated_adr
          (p_segment_rule_appl_id   => l_comp.segment_rule_appl_id
          ,p_segment_rule_type_code => l_comp.segment_rule_type_code
          ,p_segment_rule_code      => l_comp.segment_rule_code);
Line: 4705

    trace(p_msg    => 'END LOOP: updated adrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4733

    SELECT s.application_id segment_rule_appl_id
          ,s.segment_rule_type_code
          ,s.segment_rule_code
          ,s.user_sequence
          ,CASE WHEN w.user_sequence IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED END merge_impact
          ,bs.accounting_coa_id           s_accounting_coa_id
          ,bw.accounting_coa_id           w_accounting_coa_id
          ,s.value_type_code              s_value_type_code
          ,w.value_type_code              w_value_type_code
          ,s.value_code_combination_id    s_value_ccid
          ,w.value_code_combination_id    w_value_ccid
          ,s.value_source_application_id  s_value_source_app_id
          ,w.value_source_application_id  w_value_source_app_id
          ,s.value_source_type_code       s_value_source_type_code
          ,w.value_source_type_code       w_value_source_type_code
          ,s.value_source_code            s_value_source_code
          ,w.value_source_code            w_value_source_code
          ,s.value_constant               s_value_constant
          ,w.value_constant               w_value_constant
          ,s.value_mapping_set_code       s_value_mapping_set_code
          ,w.value_mapping_set_code       w_value_mapping_set_code
          ,s.value_flexfield_segment_code s_value_flexfield_segment_code
          ,w.value_flexfield_segment_code w_value_flexfield_segment_code
          ,s.value_segment_rule_appl_id   s_value_segment_rule_appl_id
          ,s.value_segment_rule_appl_id   w_value_segment_rule_appl_id
          ,s.value_segment_rule_type_code s_value_segment_rule_type_code
          ,s.value_segment_rule_type_code w_value_segment_rule_type_code
          ,s.value_segment_rule_code      s_value_segment_rule_code
          ,s.value_segment_rule_code      w_value_segment_rule_code
          ,s.input_source_application_id  s_input_source_app_id
          ,w.input_source_application_id  w_input_source_app_id
          ,s.input_source_type_code       s_input_source_type_code
          ,w.input_source_type_code       w_input_source_type_code
          ,s.input_source_code            s_input_source_code
          ,w.input_source_code            w_input_source_code
      FROM xla_seg_rule_details s
           JOIN xla_seg_rules_b bs
           ON  bs.application_id           = g_application_id
           AND bs.amb_context_code         = g_staging_context_code
           AND bs.segment_rule_type_code   = s.segment_rule_type_code
           AND bs.segment_rule_code        = s.segment_rule_code
           JOIN xla_seg_rules_b bw
           ON  bw.application_id           = g_application_id
           AND bw.amb_context_code         = g_amb_context_code
           AND bw.segment_rule_type_code   = s.segment_rule_type_code
           AND bw.segment_rule_code        = s.segment_rule_code
           LEFT OUTER JOIN xla_seg_rule_details w
           ON  w.application_id           = g_application_id
           AND w.amb_context_code         = g_amb_context_code
           AND w.segment_rule_type_code   = s.segment_rule_type_code
           AND w.segment_rule_code        = s.segment_rule_code
           AND w.user_sequence            = s.user_sequence
     WHERE s.application_id               = g_application_id
       AND s.amb_context_code             = g_staging_context_code
       AND (w.value_type_code IS NULL OR
            NVL(s.value_type_code,C_CHAR)              <> NVL(w.value_type_code,C_CHAR)              OR
            NVL(s.value_code_combination_id,C_NUM)     <> NVL(w.value_code_combination_id,C_NUM)     OR
            NVL(s.value_source_application_id,C_NUM)   <> NVL(w.value_source_application_id,C_NUM)   OR
            NVL(s.value_source_type_code,C_CHAR)       <> NVL(w.value_source_type_code,C_CHAR)       OR
            NVL(s.value_source_code,C_CHAR)            <> NVL(w.value_source_code,C_CHAR)            OR
            NVL(s.value_constant,C_CHAR)               <> NVL(w.value_constant,C_CHAR)               OR
            NVL(s.value_mapping_set_code,C_CHAR)       <> NVL(w.value_mapping_set_code,C_CHAR)       OR
            NVL(s.value_segment_rule_appl_id,C_NUM)    <> NVL(w.value_segment_rule_appl_id,C_NUM)    OR
            NVL(s.value_segment_rule_type_code,C_CHAR) <> NVL(w.value_segment_rule_type_code,C_CHAR) OR
            NVL(s.value_segment_rule_code,C_CHAR)      <> NVL(w.value_segment_rule_code,C_CHAR)      OR
            NVL(s.value_flexfield_segment_code,C_CHAR) <> NVL(w.value_flexfield_segment_code,C_CHAR) OR
            NVL(s.input_source_application_id,C_NUM)   <> NVL(w.input_source_application_id,C_NUM)   OR
            NVL(s.input_source_type_code,C_CHAR)       <> NVL(w.input_source_type_code,C_CHAR)       OR
            NVL(s.input_source_code,C_CHAR)            <> NVL(w.input_source_code,C_CHAR));
Line: 4821

    trace(p_msg    => 'BEGIN LOOP: updated adr details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4829

      trace(p_msg    => 'LOOP: updated adr detail '||
                        '- segment_rule_type_code = '||l_comp.segment_rule_type_code||
                        ', segment_rule_code = '||l_comp.segment_rule_code||
                        ', user_sequence = '||l_comp.user_sequence||
                        ', merge_impact = '||l_comp.merge_impact,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 4838

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

      l_key := l_comp.segment_rule_appl_id||C_CHAR||
               l_comp.segment_rule_type_code||C_CHAR||
               l_comp.segment_rule_code||C_CHAR||
               l_comp.user_sequence;
Line: 4846

        record_updated_property
            (p_component_type          => 'AMB_ADR_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'VALUE_TYPE'
            ,p_old_value               => l_comp.w_value_type_code
            ,p_new_value               => l_comp.s_value_type_code
            ,p_lookup_type             => 'XLA_SEG_VALUE_TYPE');
Line: 4864

        record_updated_value
            (p_component_type          => 'AMB_ADR_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'VALUE'
            ,p_old_value               => '#VALUE_TYPE_CODE#='||l_comp.w_value_type_code
            ,p_old_source_app_id       => NVL(l_comp.w_value_source_app_id,
                                              l_comp.w_value_segment_rule_appl_id)
            ,p_old_source_type_code    => NVL(l_comp.w_value_source_type_code,
                                              l_comp.w_value_segment_rule_type_code)
            ,p_old_source_code         => NVL(l_comp.w_value_mapping_set_code,
                                           NVL(l_comp.w_value_segment_rule_code,
                                               l_comp.w_value_source_code))
            ,p_new_value               => '#VALUE_TYPE_CODE#='||l_comp.s_value_type_code
            ,p_new_source_app_id       => NVL(l_comp.s_value_source_app_id,
                                              l_comp.s_value_segment_rule_appl_id)
            ,p_new_source_type_code    => NVL(l_comp.s_value_source_type_code,
                                              l_comp.s_value_segment_rule_type_code)
            ,p_new_source_code         => NVL(l_comp.s_value_mapping_set_code,
                                           NVL(l_comp.s_value_segment_rule_code,
                                               l_comp.s_value_source_code)));
Line: 4889

        record_updated_source
            (p_component_type          => 'AMB_ADR_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'INPUT_SOURCE'
            ,p_old_source_app_id       => l_comp.w_input_source_app_id
            ,p_old_source_type_code    => l_comp.w_input_source_type_code
            ,p_old_source_code         => l_comp.w_input_source_code
            ,p_new_source_app_id       => l_comp.s_input_source_app_id
            ,p_new_source_type_code    => l_comp.s_input_source_type_code
            ,p_new_source_code         => l_comp.s_input_source_code);
Line: 4903

        record_updated_property
            (p_component_type          => 'AMB_ADR_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'FLEXFIELD_SEGMENT'
            ,p_old_value               => l_comp.w_value_flexfield_segment_code
            ,p_new_value               => l_comp.s_value_flexfield_segment_code);
Line: 4912

        record_updated_property
            (p_component_type          => 'AMB_ADR_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'VALUE'
            ,p_old_value               => l_comp.w_value_constant
            ,p_new_value               => l_comp.s_value_constant);
Line: 4930

        record_updated_property
            (p_component_type          => 'AMB_ADR_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'VALUE'
            ,p_old_value               => l_w_value
            ,p_new_value               => l_s_value);
Line: 4939

    record_updated_adr_detail
            (p_segment_rule_appl_id   => l_comp.segment_rule_appl_id
            ,p_segment_rule_type_code => l_comp.segment_rule_type_code
            ,p_segment_rule_code      => l_comp.segment_rule_code
            ,p_user_sequence          => l_comp.user_sequence
            ,p_merge_impact           => l_comp.merge_impact);
Line: 4949

    trace(p_msg    => 'END LOOP: updated adr details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 4977

    SELECT ts.description_type_code
          ,ts.description_code
          ,ts.name                        s_name
          ,tw.name                        w_name
          ,ts.description                 s_description
          ,tw.description                 w_description
          ,bs.transaction_coa_id          s_transaction_coa_id
          ,bw.transaction_coa_id          w_transaction_coa_id
          ,bs.enabled_flag                s_enabled_flag
          ,bw.enabled_flag                w_enabled_flag
      FROM xla_descriptions_b bs
           JOIN xla_descriptions_tl ts
           ON  ts.application_id        = bs.application_id
           AND ts.amb_context_code      = bs.amb_context_code
           AND ts.description_type_code = bs.description_type_code
           AND ts.description_code      = bs.description_code
           AND ts.language              = USERENV('LANG')
           JOIN xla_descriptions_b bw
           ON  bw.application_id        = g_application_id
           AND bw.amb_context_code      = g_amb_context_code
           AND bw.description_type_code = bs.description_type_code
           AND bw.description_code      = bs.description_code
           JOIN xla_descriptions_tl tw
           ON  tw.application_id        = bw.application_id
           AND tw.amb_context_code      = bw.amb_context_code
           AND tw.description_type_code = bw.description_type_code
           AND tw.description_code      = bw.description_code
           AND tw.language              = USERENV('LANG')
     WHERE bs.application_id                 = g_application_id
       AND bs.amb_context_code               = g_staging_context_code
       AND (ts.name                          <> tw.name                          OR
            NVL(ts.description,C_CHAR)       <> NVL(tw.description,C_CHAR)       OR
            NVL(bs.transaction_coa_id,C_NUM) <> NVL(bw.transaction_coa_id,C_NUM) OR
            bs.enabled_flag                  <> bw.enabled_flag);
Line: 5026

    trace(p_msg    => 'BEGIN LOOP: updated desc',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5037

      trace(p_msg    => 'LOOP: updated desc - '||l_key,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 5043

      record_updated_property
          (p_component_type          => 'AMB_DESCRIPTION'
          ,p_component_key           => l_key
          ,p_property                => 'NAME'
          ,p_old_value               => l_comp.w_name
          ,p_new_value               => l_comp.s_name);
Line: 5052

      record_updated_property
          (p_component_type          => 'AMB_DESCRIPTION'
          ,p_component_key           => l_key
          ,p_property                => 'DESCRIPTION'
          ,p_old_value               => l_comp.w_description
          ,p_new_value               => l_comp.s_description);
Line: 5061

      record_updated_property
          (p_component_type          => 'AMB_DESCRIPTION'
          ,p_component_key           => l_key
          ,p_property                => 'TRANSACTION_COA'
          ,p_old_value               => l_comp.w_transaction_coa_id
          ,p_new_value               => l_comp.s_transaction_coa_id);
Line: 5070

      record_updated_property
          (p_component_type          => 'AMB_DESCRIPTION'
          ,p_component_key           => l_key
          ,p_property                => 'ENABLED'
          ,p_old_value               => l_comp.w_enabled_flag
          ,p_new_value               => l_comp.s_enabled_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 5079

    record_updated_desc
          (p_description_type_code => l_comp.description_type_code
          ,p_description_code      => l_comp.description_code);
Line: 5086

    trace(p_msg    => 'END LOOP: updated desc',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5115

    SELECT s.description_type_code
          ,s.description_code
          ,s.user_sequence
          ,CASE WHEN w.application_id IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END                       merge_impact
          ,s.description_prio_id          s_description_prio_id
          ,w.description_prio_id          w_description_prio_id
          ,bs.transaction_coa_id          s_transaction_coa_id
          ,bw.transaction_coa_id          w_transaction_coa_id
      FROM xla_desc_priorities s
           JOIN xla_descriptions_b bs
           ON  bs.application_id        = s.application_id
           AND bs.amb_context_code      = s.amb_context_code
           AND bs.description_type_code = s.description_type_code
           AND bs.description_code      = s.description_code
           JOIN xla_descriptions_b bw
           ON  bw.application_id        = g_application_id
           AND bw.amb_context_code      = g_amb_context_code
           AND bw.description_type_code = s.description_type_code
           AND bw.description_code      = s.description_code
           LEFT OUTER JOIN xla_desc_priorities w
           ON  w.application_id         = g_application_id
           AND w.amb_context_code       = g_amb_context_code
           AND w.description_type_code  = s.description_type_code
           AND w.description_code       = s.description_code
           AND w.user_sequence          = s.user_sequence
     WHERE s.amb_context_code           = g_staging_context_code
     UNION
    SELECT w.description_type_code
          ,w.description_code
          ,w.user_sequence
          ,C_MERGE_IMPACT_DELETED
          , null , null , null , null
      FROM xla_desc_priorities w
           JOIN xla_descriptions_b bs
           ON  bs.application_id        = g_application_id
           AND bs.amb_context_code      = g_staging_context_code
           AND bs.description_type_code = w.description_type_code
           AND bs.description_code      = w.description_code
     WHERE w.amb_context_code           = g_amb_context_code
       AND NOT EXISTS
           (SELECT 1
              FROM xla_desc_priorities s
             WHERE s.application_id         = g_application_id
               AND s.amb_context_code       = g_staging_context_code
               AND s.description_type_code  = w.description_type_code
               AND s.description_code       = w.description_code
               AND s.user_sequence          = w.user_sequence);
Line: 5170

  l_updated             BOOLEAN;
Line: 5184

  l_updated := FALSE;
Line: 5187

    trace(p_msg    => 'BEGIN LOOP: updated desc priorities',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5194

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN
      l_key := l_comp.description_type_code||C_CHAR||
               l_comp.description_code||C_CHAR||
               l_comp.user_sequence;
Line: 5208

        l_updated := TRUE;
Line: 5209

        record_updated_property
            (p_component_type          => 'AMB_DESC_PRIO'
            ,p_component_key           => l_key
            ,p_property                => 'DETAIL'
            ,p_old_value               => l_working_detail
            ,p_new_value               => l_staging_detail);
Line: 5228

        l_updated := TRUE;
Line: 5229

        record_updated_property
            (p_component_type          => 'AMB_DESC_PRIO'
            ,p_component_key           => l_key
            ,p_property                => 'CONDITION'
            ,p_old_value               => l_working_condition
            ,p_new_value               => l_staging_condition);
Line: 5237

      IF (l_updated) THEN
        IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
          trace(p_msg    => 'LOOP: updated desc prio '||
                            '- description_type_code = '||l_comp.description_type_code||
                            ', description_code = '||l_comp.description_code||
                            ', user_sequence = '||l_comp.user_sequence||
                            ', merge_impact = '||C_MERGE_IMPACT_UPDATED,
                p_module => l_log_module,
                p_level  => C_LEVEL_PROCEDURE);
Line: 5248

        l_updated := FALSE;
Line: 5249

        record_updated_desc_priority
            (p_description_type_code   => l_comp.description_type_code
            ,p_description_code        => l_comp.description_code
            ,p_user_sequence           => l_comp.user_sequence
            ,p_merge_impact            => C_MERGE_IMPACT_UPDATED);
Line: 5258

        trace(p_msg    => 'LOOP: updated desc prio '||
                          '- description_type_code = '||l_comp.description_type_code||
                          ', description_code = '||l_comp.description_code||
                          ', user_sequence = '||l_comp.user_sequence||
                          ', merge_impact = '||l_comp.merge_impact,
              p_module => l_log_module,
              p_level  => C_LEVEL_PROCEDURE);
Line: 5267

      record_updated_desc_priority
            (p_description_type_code   => l_comp.description_type_code
            ,p_description_code        => l_comp.description_code
            ,p_user_sequence           => l_comp.user_sequence
            ,p_merge_impact            => l_comp.merge_impact);
Line: 5276

    trace(p_msg    => 'END LOOP: updated desc priorities',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5305

    SELECT ts.analytical_criterion_type_code
          ,ts.analytical_criterion_code
          ,ts.name                        s_name
          ,tw.name                        w_name
          ,ts.description                 s_description
          ,tw.description                 w_description
          ,bs.balancing_flag              s_balancing_flag
          ,bw.balancing_flag              w_balancing_flag
          ,bs.display_order               s_display_order
          ,bw.display_order               w_display_order
          ,bs.enabled_flag                s_enabled_flag
          ,bw.enabled_flag                w_enabled_flag
          ,bs.year_end_carry_forward_code s_year_end_carry_forward_code
          ,bw.year_end_carry_forward_code w_year_end_carry_forward_code
          ,bs.display_in_inquiries_flag   s_display_in_inquiries_flag
          ,bw.display_in_inquiries_flag   w_display_in_inquiries_flag
          ,bs.criterion_value_code        s_criterion_value_code
          ,bw.criterion_value_code        w_criterion_value_code
      FROM xla_analytical_hdrs_b bs
           JOIN xla_analytical_hdrs_tl ts
           ON  ts.amb_context_code               = bs.amb_context_code
           AND ts.analytical_criterion_type_code = bs.analytical_criterion_type_code
           AND ts.analytical_criterion_code      = bs.analytical_criterion_code
           AND ts.language                       = USERENV('LANG')
           JOIN xla_analytical_hdrs_b bw
           ON  bw.amb_context_code               = g_amb_context_code
           AND bw.analytical_criterion_type_code = bs.analytical_criterion_type_code
           AND bw.analytical_criterion_code      = bs.analytical_criterion_code
           JOIN xla_analytical_hdrs_tl tw
           ON  tw.amb_context_code               = bw.amb_context_code
           AND tw.analytical_criterion_type_code = bw.analytical_criterion_type_code
           AND tw.analytical_criterion_code      = bw.analytical_criterion_code
           AND tw.language                       = USERENV('LANG')
     WHERE bs.amb_context_code = g_staging_context_code
       AND (ts.name                        <> tw.name                        OR
            NVL(ts.description,C_CHAR)     <> NVL(tw.description,C_CHAR)     OR
            bs.balancing_flag              <> bw.balancing_flag              OR
            bs.display_order               <> bw.display_order               OR
            bs.enabled_flag                <> bw.enabled_flag                OR
            NVL(bs.year_end_carry_forward_code,C_CHAR) <>
                                              NVL(bw.year_end_carry_forward_code,C_CHAR) OR
            bs.display_in_inquiries_flag   <> bw.display_in_inquiries_flag     OR
            bs.criterion_value_code        <> bw.criterion_value_code);
Line: 5363

    trace(p_msg    => 'BEGIN LOOP: updated acs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5374

      trace(p_msg    => 'LOOP: updated ac - '||l_key,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 5380

      record_updated_property
          (p_component_type          => 'AMB_AC'
          ,p_component_key           => l_key
          ,p_property                => 'NAME'
          ,p_old_value               => l_comp.w_name
          ,p_new_value               => l_comp.s_name);
Line: 5389

      record_updated_property
          (p_component_type          => 'AMB_AC'
          ,p_component_key           => l_key
          ,p_property                => 'DESCRIPTION'
          ,p_old_value               => l_comp.w_description
          ,p_new_value               => l_comp.s_description);
Line: 5398

      record_updated_property
          (p_component_type          => 'AMB_AC'
          ,p_component_key           => l_key
          ,p_property                => 'MAINTAIN_BALANCE'
          ,p_old_value               => l_comp.w_balancing_flag
          ,p_new_value               => l_comp.s_balancing_flag);
Line: 5407

      record_updated_property
          (p_component_type          => 'AMB_AC'
          ,p_component_key           => l_key
          ,p_property                => 'DISPLAY_ORDER'
          ,p_old_value               => l_comp.w_display_order
          ,p_new_value               => l_comp.s_display_order);
Line: 5416

      record_updated_property
          (p_component_type          => 'AMB_AC'
          ,p_component_key           => l_key
          ,p_property                => 'ENABLED'
          ,p_old_value               => l_comp.w_enabled_flag
          ,p_new_value               => l_comp.s_enabled_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 5427

      record_updated_property
          (p_component_type          => 'AMB_AC'
          ,p_component_key           => l_key
          ,p_property                => 'YEAR_END_CARRY_FORWARD'
          ,p_old_value               => l_comp.w_year_end_carry_forward_code
          ,p_new_value               => l_comp.s_year_end_carry_forward_code
          ,p_lookup_type             => 'XLA_YEAR_END_CARRY_FORWARD');
Line: 5437

      record_updated_property
          (p_component_type          => 'AMB_AC'
          ,p_component_key           => l_key
          ,p_property                => 'DISPLAY_IN_INQUIRIES_FLAG'
          ,p_old_value               => l_comp.w_display_in_inquiries_flag
          ,p_new_value               => l_comp.s_display_in_inquiries_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 5447

      record_updated_property
          (p_component_type          => 'AMB_AC'
          ,p_component_key           => l_key
          ,p_property                => 'CRITERION_VALUE_CODE'
          ,p_old_value               => l_comp.w_criterion_value_code
          ,p_new_value               => l_comp.s_criterion_value_code);
Line: 5455

    record_updated_ac(p_ac_type_code => l_comp.analytical_criterion_type_code
                     ,p_ac_code      => l_comp.analytical_criterion_code
                     ,p_merge_impact => C_MERGE_IMPACT_UPDATED);
Line: 5462

    trace(p_msg    => 'END LOOP: updated acs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5491

    SELECT ts.analytical_criterion_type_code
          ,ts.analytical_criterion_code
          ,ts.analytical_detail_code
          ,CASE WHEN bw.analytical_detail_code IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END                       merge_impact
          ,ts.name                        s_name
          ,tw.name                        w_name
          ,ts.description                 s_description
          ,tw.description                 w_description
          ,bs.grouping_order              s_grouping_order
          ,bw.grouping_order              w_grouping_order
          ,bs.data_type_code              s_data_type_code
          ,bw.data_type_code              w_data_type_code
      FROM xla_analytical_dtls_b bs
           JOIN xla_analytical_hdrs_b hw
           ON  hw.amb_context_code               = g_amb_context_code
           AND hw.analytical_criterion_type_code = bs.analytical_criterion_type_code
           AND hw.analytical_criterion_code      = bs.analytical_criterion_code
           JOIN xla_analytical_dtls_tl ts
           ON  ts.amb_context_code               = bs.amb_context_code
           AND ts.analytical_criterion_type_code = bs.analytical_criterion_type_code
           AND ts.analytical_criterion_code      = bs.analytical_criterion_code
           AND ts.analytical_detail_code         = bs.analytical_detail_code
           AND ts.language                       = USERENV('LANG')
           LEFT OUTER JOIN xla_analytical_dtls_b bw
           ON  bw.amb_context_code               = g_amb_context_code
           AND bw.analytical_criterion_type_code = bs.analytical_criterion_type_code
           AND bw.analytical_criterion_code      = bs.analytical_criterion_code
           AND bw.analytical_detail_code         = bs.analytical_detail_code
           LEFT OUTER JOIN xla_analytical_dtls_tl tw
           ON  tw.amb_context_code               = bw.amb_context_code
           AND tw.analytical_criterion_type_code = bw.analytical_criterion_type_code
           AND tw.analytical_criterion_code      = bw.analytical_criterion_code
           AND tw.analytical_detail_code         = bw.analytical_detail_code
           AND tw.language                       = USERENV('LANG')
     WHERE bs.amb_context_code     = g_staging_context_code
       AND (bw.analytical_detail_code IS NULL                                OR
            NVL(ts.name,C_CHAR)            <> NVL(tw.name,C_CHAR)            OR
            NVL(ts.description,C_CHAR)     <> NVL(tw.description,C_CHAR)     OR
            NVL(bs.grouping_order,C_NUM)   <> NVL(bw.grouping_order,C_NUM)   OR
            NVL(bs.data_type_code,C_CHAR)  <> NVL(bw.data_type_code,C_CHAR));
Line: 5549

    trace(p_msg    => 'BEGIN LOOP: updated ac details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5557

      trace(p_msg    => 'LOOP: updated ac detail - '||
                        l_comp.analytical_criterion_type_code||C_CHAR||
                        l_comp.analytical_criterion_code||C_CHAR||
                        l_comp.analytical_detail_code||C_CHAR||
                        l_comp.merge_impact,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 5566

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

      l_key := l_comp.analytical_criterion_type_code||C_CHAR||
               l_comp.analytical_criterion_code||C_CHAR||
               l_comp.analytical_detail_code;
Line: 5573

        record_updated_property
            (p_component_type          => 'AMB_AC_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'NAME'
            ,p_old_value               => l_comp.w_name
            ,p_new_value               => l_comp.s_name);
Line: 5582

        record_updated_property
            (p_component_type          => 'AMB_AC_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'DESCRIPTION'
            ,p_old_value               => l_comp.w_description
            ,p_new_value               => l_comp.s_description);
Line: 5591

        record_updated_property
            (p_component_type          => 'AMB_AC_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'GROUPING_ORDER'
            ,p_old_value               => l_comp.w_grouping_order
            ,p_new_value               => l_comp.s_grouping_order);
Line: 5600

        record_updated_property
            (p_component_type          => 'AMB_AC_DETAIL'
            ,p_component_key           => l_key
            ,p_property                => 'DATA_TYPE'
            ,p_old_value               => l_comp.w_data_type_code
            ,p_new_value               => l_comp.s_data_type_code
            ,p_lookup_type             => 'XLA_DATA_TYPE');
Line: 5611

    record_updated_ac_detail
          (p_ac_type_code   => l_comp.analytical_criterion_type_code
          ,p_ac_code        => l_comp.analytical_criterion_code
          ,p_ac_detail_code => l_comp.analytical_detail_code
          ,p_merge_impact   => l_comp.merge_impact);
Line: 5620

    trace(p_msg    => 'END LOOP: updated ac details',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5648

    SELECT s.analytical_criterion_type_code
         , s.analytical_criterion_code
         , s.analytical_detail_code
         , s.entity_code
         , s.event_class_code
         , s.application_id
         , s.source_type_code        s_source_type_code
         , s.source_code             s_source_code
         , s.source_application_id   s_source_application_id
         , w.source_type_code        w_source_type_code
         , w.source_code             w_source_code
         , w.source_application_id   w_source_application_id
      FROM xla_analytical_sources s
           JOIN xla_analytical_dtls_b b
           ON  b.amb_context_code                = g_amb_context_code
           AND b.analytical_criterion_type_code  = s.analytical_criterion_type_code
           AND b.analytical_criterion_code       = s.analytical_criterion_code
           AND b.analytical_detail_code          = s.analytical_detail_code
           LEFT OUTER JOIN xla_analytical_sources w
           ON  w.amb_context_code               = g_amb_context_code
           AND w.analytical_criterion_type_code = s.analytical_criterion_type_code
           AND w.analytical_criterion_code      = s.analytical_criterion_code
           AND w.analytical_detail_code         = s.analytical_detail_code
           AND w.entity_code                    = s.entity_code
           AND w.event_class_code               = s.event_class_code
           AND w.application_id                 = s.application_id
     WHERE s.amb_context_code                   = g_staging_context_code
       AND (w.source_application_id IS NULL OR
            NVL(w.source_type_code,C_CHAR)      <> NVL(s.source_type_code,C_CHAR) OR
            NVL(w.source_code,C_CHAR)           <> NVL(s.source_code,C_CHAR) OR
            NVL(w.source_application_id,C_NUM)  <> NVL(s.source_application_id,C_NUM))
     UNION
    SELECT w.analytical_criterion_type_code
         , w.analytical_criterion_code
         , w.analytical_detail_code
         , w.entity_code
         , w.event_class_code
         , w.application_id
         , NULL
         , NULL
         , NULL
         , w.source_type_code
         , w.source_code
         , w.source_application_id
      FROM xla_analytical_sources w
         , xla_analytical_dtls_b b
     WHERE w.amb_context_code                = g_amb_context_code
       AND b.amb_context_code                = g_staging_context_code
       AND b.analytical_criterion_type_code  = w.analytical_criterion_type_code
       AND b.analytical_criterion_code       = w.analytical_criterion_code
       AND b.analytical_detail_code          = w.analytical_detail_code
       AND NOT EXISTS
           (SELECT 1
              FROM xla_analytical_sources s
             WHERE s.amb_context_code               = g_staging_context_code
               AND s.analytical_criterion_type_code = w.analytical_criterion_type_code
               AND s.analytical_criterion_code      = w.analytical_criterion_code
               AND s.analytical_detail_code         = w.analytical_detail_code
               AND s.entity_code                    = w.entity_code
               AND s.event_class_code               = w.event_class_code
               AND s.application_id                 = w.application_id);
Line: 5725

    trace(p_msg    => 'BEGIN LOOP: updated ac sources',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5732

      trace(p_msg    => 'LOOP 1: updated ac sources - '||l_comp.analytical_criterion_type_code,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 5745

      trace(p_msg    => 'LOOP: updated ac sources - '||l_key,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 5750

    record_updated_source(p_component_type       => 'AMB_AC_SOURCE'
                         ,p_component_key        => l_key
                         ,p_property             => 'SOURCE_CODE'
                         ,p_old_source_app_id    => l_comp.w_source_application_id
                         ,p_old_source_type_code => l_comp.w_source_type_code
                         ,p_old_source_code      => l_comp.w_source_code
                         ,p_new_source_app_id    => l_comp.s_source_application_id
                         ,p_new_source_type_code => l_comp.s_source_type_code
                         ,p_new_source_code      => l_comp.s_source_code);
Line: 5760

    record_updated_component
            (p_parent_component_type => 'AMB_AC_DETAIL'
            ,p_parent_component_key  => l_comp.analytical_criterion_type_code||C_CHAR||
                                        l_comp.analytical_criterion_code||C_CHAR||
                                        l_comp.analytical_detail_code
            ,p_component_type        => 'AMB_AC_SOURCE'
            ,p_component_key         => l_key
            ,p_merge_impact          => C_MERGE_IMPACT_UPDATED
            ,p_event_class_code      => l_comp.event_class_code
            ,p_event_type_code       => NULL
            ,p_component_owner_code  => NULL
            ,p_component_code        => l_comp.event_class_code);
Line: 5773

    record_updated_ac_detail
          (p_ac_type_code   => l_comp.analytical_criterion_type_code
          ,p_ac_code        => l_comp.analytical_criterion_code
          ,p_ac_detail_code => l_comp.analytical_detail_code
          ,p_merge_impact   => C_MERGE_IMPACT_UPDATED);
Line: 5782

    trace(p_msg    => 'END LOOP: updated ac sources',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5810

    SELECT s.event_class_code
         , s.accounting_line_type_code
         , s.accounting_line_code
         , s.accounting_attribute_code
         , CASE WHEN w.application_id IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END                    merge_impact
         , s.source_application_id     s_source_application_id
         , w.source_application_id     w_source_application_id
         , s.source_type_code          s_source_type_code
         , w.source_type_code          w_source_type_code
         , s.source_code               s_source_code
         , w.source_code               w_source_code
         , s.event_class_default_flag  s_event_class_default_flag
         , w.event_class_default_flag  w_event_class_default_flag
      FROM xla_jlt_acct_attrs s
           JOIN xla_acct_line_types_b b
           ON  b.application_id            = g_application_id
           AND b.amb_context_code          = g_amb_context_code
           AND b.event_class_code          = s.event_class_code
           AND b.accounting_line_type_code = s.accounting_line_type_code
           AND b.accounting_line_code      = s.accounting_line_code
           LEFT OUTER JOIN xla_jlt_acct_attrs w
           ON  w.application_id            = g_application_id
           AND w.amb_context_code          = g_amb_context_code
           AND w.event_class_code          = s.event_class_code
           AND w.accounting_line_type_code = s.accounting_line_type_code
           AND w.accounting_line_code      = s.accounting_line_code
           AND w.accounting_attribute_code = s.accounting_attribute_code
     WHERE s.application_id   = g_application_id
       AND s.amb_context_code = g_staging_context_code
       AND (w.application_id                       IS NULL OR
            NVL(s.event_class_default_flag,C_CHAR) <> NVL(w.event_class_default_flag,C_CHAR) OR
            NVL(s.source_application_id,C_NUM)     <> NVL(w.source_application_id,C_NUM) OR
            NVL(s.source_type_code,C_CHAR)         <> NVL(w.source_type_code,C_CHAR) OR
            NVL(s.source_code,C_CHAR)              <> NVL(w.source_code,C_CHAR));
Line: 5862

    trace(p_msg    => 'BEGIN LOOP: updated jlt acct attrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5875

      trace(p_msg    => 'LOOP: updated jlt acct attr - '||l_comp.merge_impact,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 5883

    record_updated_jlt_acct_attr
          (p_event_class_code          => l_comp.event_class_code
          ,p_accounting_line_type_code => l_comp.accounting_line_type_code
          ,p_accounting_line_code      => l_comp.accounting_line_code
          ,p_accounting_attribute_code => l_comp.accounting_attribute_code
          ,p_merge_impact              => l_comp.merge_impact);
Line: 5890

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

      IF (l_comp.s_event_class_default_flag <> l_comp.w_event_class_default_flag) THEN
        record_updated_property
          (p_component_type          => 'AMB_JLT_ACCT_ATTR'
          ,p_component_key           => l_key
          ,p_property                => 'EVENT_CLASS_DEFAULT_FLAG'
          ,p_old_value               => l_comp.w_event_class_default_flag
          ,p_new_value               => l_comp.s_event_class_default_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 5905

        record_updated_source(p_component_type       => 'AMB_JLT_ACCT_ATTR'
                           ,p_component_key        => l_key
                           ,p_property             => 'SOURCE_CODE'
                           ,p_old_source_app_id    => l_comp.w_source_application_id
                           ,p_old_source_type_code => l_comp.w_source_type_code
                           ,p_old_source_code      => l_comp.w_source_code
                           ,p_new_source_app_id    => l_comp.s_source_application_id
                           ,p_new_source_type_code => l_comp.s_source_type_code
                           ,p_new_source_code      => l_comp.s_source_code);
Line: 5920

    trace(p_msg    => 'END LOOP: updated jlt acct attrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 5948

    SELECT ts.entity_code
          ,ts.event_class_code
          ,ts.accounting_line_type_code acct_line_type_code
          ,ts.accounting_line_code      acct_line_code
          ,ts.name                      s_name
          ,tw.name                      w_name
          ,ts.description               s_description
          ,tw.description               w_description
          ,s.accounting_class_code      s_acct_class_code
          ,w.accounting_class_code      w_acct_class_code
          ,s.enabled_flag               s_enabled_flag
          ,w.enabled_flag               w_enabled_flag
          ,s.accounting_entry_type_code s_ae_type_code
          ,w.accounting_entry_type_code w_ae_type_code
          ,s.natural_side_code          s_natural_side_code
          ,w.natural_side_code          w_natural_side_code
          ,s.switch_side_flag           s_switch_side_flag
          ,w.switch_side_flag           w_switch_side_flag
          ,s.merge_duplicate_code       s_merge_duplicate_code
          ,w.merge_duplicate_code       w_merge_duplicate_code
          ,s.transaction_coa_id         s_trx_coa_id
          ,w.transaction_coa_id         w_trx_coa_id
          ,s.gl_transfer_mode_code      s_gl_transfer_mode_code
          ,w.gl_transfer_mode_code      w_gl_transfer_mode_code
          ,s.business_method_code       s_business_method_code
          ,w.business_method_code       w_business_method_code
          ,s.business_class_code        s_business_class_code
          ,w.business_class_code        w_business_class_code
          ,s.rounding_class_code        s_rounding_class_code
          ,w.rounding_class_code        w_rounding_class_code
          ,s.encumbrance_type_id        s_encumbrance_type_id
          ,w.encumbrance_type_id        w_encumbrance_type_id
          ,s.mpa_option_code            s_mpa_option_code
          ,w.mpa_option_code            w_mpa_option_code
      FROM xla_acct_line_types_b s
           JOIN xla_acct_line_types_tl ts
           ON  ts.application_id            = s.application_id
           AND ts.amb_context_code          = s.amb_context_code
           AND ts.entity_code               = s.entity_code
           AND ts.event_class_code          = s.event_class_code
           AND ts.accounting_line_type_code = s.accounting_line_type_code
           AND ts.accounting_line_code      = s.accounting_line_code
           AND ts.accounting_line_code      = s.accounting_line_code
           AND ts.language                  = USERENV('LANG')
           JOIN xla_acct_line_types_b w
           ON  w.application_id            = s.application_id
           AND w.entity_code               = s.entity_code
           AND w.event_class_code          = s.event_class_code
           AND w.accounting_line_type_code = s.accounting_line_type_code
           AND w.accounting_line_code      = s.accounting_line_code
           JOIN xla_acct_line_types_tl tw
           ON  tw.application_id            = w.application_id
           AND tw.amb_context_code          = w.amb_context_code
           AND tw.entity_code               = w.entity_code
           AND tw.event_class_code          = w.event_class_code
           AND tw.accounting_line_type_code = w.accounting_line_type_code
           AND tw.accounting_line_code      = w.accounting_line_code
           AND tw.language                  = USERENV('LANG')
     WHERE s.amb_context_code = g_staging_context_code
       AND w.amb_context_code = g_amb_context_code;
Line: 6012

  l_updated                 BOOLEAN;
Line: 6027

    trace(p_msg    => 'BEGIN LOOP: updated jlt',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6032

  l_updated    := FALSE;
Line: 6040

      l_updated := TRUE;
Line: 6041

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'NAME'
          ,p_old_value               => l_comp.w_name
          ,p_new_value               => l_comp.s_name);
Line: 6050

      l_updated := TRUE;
Line: 6051

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'DESCRIPTION'
          ,p_old_value               => l_comp.w_description
          ,p_new_value               => l_comp.s_description);
Line: 6060

      l_updated := TRUE;
Line: 6061

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'ACCOUNTING_CLASS'
          ,p_old_value               => l_comp.w_acct_class_code
          ,p_new_value               => l_comp.s_acct_class_code
          ,p_lookup_type             => 'XLA_ACCOUNTING_CLASS');
Line: 6071

      l_updated := TRUE;
Line: 6072

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'ENABLED'
          ,p_old_value               => l_comp.w_enabled_flag
          ,p_new_value               => l_comp.s_enabled_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 6082

      l_updated := TRUE;
Line: 6083

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'ACCOUNTING_ENTRY_TYPE'
          ,p_old_value               => l_comp.w_ae_type_code
          ,p_new_value               => l_comp.s_ae_type_code
          ,p_lookup_type             => 'XLA_BALANCE_TYPE');
Line: 6093

      l_updated := TRUE;
Line: 6094

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'NATURAL_SIDE'
          ,p_old_value               => l_comp.w_natural_side_code
          ,p_new_value               => l_comp.s_natural_side_code
          ,p_lookup_type             => 'XLA_ACCT_NATURAL_SIDE');
Line: 6104

      l_updated := TRUE;
Line: 6105

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'SWITCH_SIDE'
          ,p_old_value               => l_comp.w_switch_side_flag
          ,p_new_value               => l_comp.s_switch_side_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 6115

      l_updated := TRUE;
Line: 6116

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'MERGE_DUPLICATE'
          ,p_old_value               => l_comp.w_merge_duplicate_code
          ,p_new_value               => l_comp.s_merge_duplicate_code
          ,p_lookup_type             => 'XLA_MERGE_MATCHING_TYPE');
Line: 6126

      l_updated := TRUE;
Line: 6127

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'TRANSACTION_COA'
          ,p_old_value               => l_comp.w_trx_coa_id
          ,p_new_value               => l_comp.s_trx_coa_id);
Line: 6136

      l_updated := TRUE;
Line: 6137

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'GL_TRANSFER_MODE'
          ,p_old_value               => l_comp.w_gl_transfer_mode_code
          ,p_new_value               => l_comp.s_gl_transfer_mode_code
          ,p_lookup_type             => 'XLA_ACCT_TRANSFER_MODE');
Line: 6147

      l_updated := TRUE;
Line: 6148

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'BUSINESS_METHOD'
          ,p_old_value               => l_comp.w_business_method_code
          ,p_new_value               => l_comp.s_business_method_code
          ,p_lookup_type             => 'XLA_ACCT_TRANSFER_MODE');
Line: 6158

      l_updated := TRUE;
Line: 6159

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'BUSINESS_CLASS'
          ,p_old_value               => l_comp.w_business_class_code
          ,p_new_value               => l_comp.s_business_class_code
          ,p_lookup_type             => 'XLA_ACCT_TRANSFER_MODE');
Line: 6169

      l_updated := TRUE;
Line: 6170

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'ENCUMBRANCE_TYPE'
          ,p_old_value               => l_comp.w_encumbrance_type_id
          ,p_new_value               => l_comp.s_encumbrance_type_id);
Line: 6179

      l_updated := TRUE;
Line: 6180

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'MPA_OPTION_CODE'
          ,p_old_value               => l_comp.w_mpa_option_code
          ,p_new_value               => l_comp.s_mpa_option_code
          ,p_lookup_type             => 'XLA_MPA_OPTION');
Line: 6190

      l_updated := TRUE;
Line: 6191

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'ROUNDING_CLASS'
          ,p_old_value               => l_comp.w_rounding_class_code
          ,p_new_value               => l_comp.s_rounding_class_code
          ,p_lookup_type             => 'XLA_ACCOUNTING_CLASS');
Line: 6221

      l_updated := TRUE;
Line: 6222

      record_updated_property
          (p_component_type          => 'AMB_JLT'
          ,p_component_key           => l_key
          ,p_property                => 'CONDITION'
          ,p_old_value               => l_working_condition
          ,p_new_value               => l_staging_condition);
Line: 6230

    IF (l_updated) THEN
      IF (C_LEVEL_PROCEDURE >= g_log_level) THEN
        trace(p_msg    => 'LOOP: updated ac sources - '||l_key,
              p_module => l_log_module,
              p_level  => C_LEVEL_PROCEDURE);
Line: 6237

      record_updated_jlt(p_event_class_code          => l_comp.event_class_code
                        ,p_accounting_line_type_code => l_comp.acct_line_type_code
                        ,p_accounting_line_code      => l_comp.acct_line_code);
Line: 6241

      l_updated := FALSE;
Line: 6247

    trace(p_msg    => 'END LOOP: updated jlt',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6275

    SELECT s.event_class_code
         , s.event_type_code
         , s.line_definition_owner_code
         , s.line_definition_code
         , s.accounting_line_type_code
         , s.accounting_line_code
         , s.flexfield_segment_code
         , s.side_code
         , l.accounting_coa_id
         , CASE WHEN w.application_id IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END                merge_impact
         , s.segment_rule_appl_id   s_segment_rule_appl_id
         , w.segment_rule_appl_id   w_segment_rule_appl_id
         , s.segment_rule_type_code s_segment_rule_type_code
         , w.segment_rule_type_code w_segment_rule_type_code
         , s.segment_rule_code      s_segment_rule_code
         , w.segment_rule_code      w_segment_rule_code
         , s.inherit_adr_flag       s_inherit_adr_flag
         , w.inherit_adr_flag       w_inherit_adr_flag
      FROM xla_line_defn_adr_assgns s
           JOIN xla_line_definitions_b l
           ON  l.application_id              = g_application_id
           AND l.amb_context_code            = g_amb_context_code
           AND l.event_class_code            = s.event_class_code
           AND l.event_type_code             = s.event_type_code
           AND l.line_definition_owner_code  = s.line_definition_owner_code
           AND l.line_definition_code        = s.line_definition_code
           JOIN xla_line_defn_jlt_assgns b
           ON  b.application_id              = g_application_id
           AND b.amb_context_code            = g_amb_context_code
           AND b.event_class_code            = s.event_class_code
           AND b.event_type_code             = s.event_type_code
           AND b.line_definition_owner_code  = s.line_definition_owner_code
           AND b.line_definition_code        = s.line_definition_code
           AND b.accounting_line_type_code   = s.accounting_line_type_code
           AND b.accounting_line_code        = s.accounting_line_code
           LEFT OUTER JOIN xla_line_defn_adr_assgns w
           ON  w.application_id                 = g_application_id
           AND w.amb_context_code               = g_amb_context_code
           AND w.event_class_code               = s.event_class_code
           AND w.event_type_code                = s.event_type_code
           AND w.line_definition_owner_code     = s.line_definition_owner_code
           AND w.line_definition_code           = s.line_definition_code
           AND w.accounting_line_type_code      = s.accounting_line_type_code
           AND w.accounting_line_code           = s.accounting_line_code
           AND w.flexfield_segment_code         = s.flexfield_segment_code
     WHERE s.application_id   = g_application_id
       AND s.amb_context_code = g_staging_context_code
       AND (w.application_id                     IS NULL                                 OR
            s.inherit_adr_flag                   <> w.inherit_adr_flag                   OR
            NVL(s.segment_rule_appl_id,C_NUM)    <> NVL(w.segment_rule_appl_id,C_NUM)    OR
            NVL(s.segment_rule_type_code,C_CHAR) <> NVL(w.segment_rule_type_code,C_CHAR) OR
            NVL(s.segment_rule_code,C_CHAR)      <> NVL(w.segment_rule_code,C_CHAR));
Line: 6346

    trace(p_msg    => 'BEGIN LOOP: updated line adr assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6365

      trace(p_msg    => 'LOOP: updated line adr assgn - '||l_key,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 6371

      record_updated_component
          (p_parent_component_type => 'AMB_LINE_ASSIGNMENT'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_ADR_ASSGN'
          ,p_component_key         => l_key
          ,p_merge_impact          => l_comp.merge_impact
          ,p_component_owner_code  => l_comp.accounting_coa_id
          ,p_component_code        => l_comp.flexfield_segment_code);
Line: 6380

      record_updated_line_assgn
          (p_event_class_code           => l_comp.event_class_code
          ,p_event_type_code            => l_comp.event_type_code
          ,p_line_definition_owner_code => l_comp.line_definition_owner_code
          ,p_line_definition_code       => l_comp.line_definition_code
          ,p_accounting_line_type_code  => l_comp.accounting_line_type_code
          ,p_accounting_line_code       => l_comp.accounting_line_code
          ,p_merge_impact               => C_MERGE_IMPACT_UPDATED);
Line: 6391

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

      IF (l_comp.w_inherit_adr_flag <> l_comp.s_inherit_adr_flag) THEN
        record_updated_property
              (p_component_type => 'AMB_ADR_ASSGN'
              ,p_component_key  => l_key
              ,p_property       => 'INHERIT_ADR_FLAG'
              ,p_old_value      => l_comp.w_inherit_adr_flag
              ,p_new_value      => l_comp.s_inherit_adr_flag
              ,p_lookup_type    => 'XLA_YES_NO');
Line: 6412

          record_updated_component
                 (p_parent_component_type => 'AMB_ADR_ASSGN'
                 ,p_parent_component_key  => l_parent_key
                 ,p_component_type        => 'AMB_ADR'
                 ,p_component_key         => l_comp.s_segment_rule_type_code||C_CHAR||
                                             l_comp.s_segment_rule_code
                 ,p_merge_impact          => C_MERGE_IMPACT_NEW
                 ,p_component_appl_id     => l_comp.s_segment_rule_appl_id
                 ,p_component_owner_code  => l_comp.s_segment_rule_type_code
                 ,p_component_code        => l_comp.s_segment_rule_code);
Line: 6426

          record_updated_component
                 (p_parent_component_type => 'AMB_ADR_ASSGN'
                 ,p_parent_component_key  => l_parent_key
                 ,p_component_type        => 'AMB_ADR'
                 ,p_component_key         => l_comp.w_segment_rule_type_code||C_CHAR||
                                             l_comp.w_segment_rule_code
                 ,p_merge_impact          => C_MERGE_IMPACT_DELETED
                 ,p_component_appl_id     => l_comp.s_segment_rule_appl_id
                 ,p_component_owner_code  => l_comp.w_segment_rule_type_code
                 ,p_component_code        => l_comp.w_segment_rule_code);
Line: 6443

    trace(p_msg    => 'END LOOP: updated line adr assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6472

    SELECT s.event_class_code
         , s.event_type_code
         , s.line_definition_owner_code
         , s.line_definition_code
         , s.accounting_line_type_code
         , s.accounting_line_code
         , s.analytical_criterion_type_code
         , s.analytical_criterion_code
         , C_MERGE_IMPACT_NEW merge_impact
      FROM xla_line_defn_ac_assgns s
         , xla_line_defn_jlt_assgns b
     WHERE s.application_id   = g_application_id
       AND s.amb_context_code = g_staging_context_code
       AND b.application_id              = g_application_id
       AND b.amb_context_code            = g_amb_context_code
       AND b.event_class_code            = s.event_class_code
       AND b.event_type_code             = s.event_type_code
       AND b.line_definition_owner_code  = s.line_definition_owner_code
       AND b.line_definition_code        = s.line_definition_code
       AND b.accounting_line_type_code   = s.accounting_line_type_code
       AND b.accounting_line_code        = s.accounting_line_code
       AND NOT EXISTS
           (SELECT 1
              FROM xla_line_defn_ac_assgns w
             WHERE w.application_id                 = g_application_id
               AND w.amb_context_code               = g_amb_context_code
               AND w.event_class_code               = s.event_class_code
               AND w.event_type_code                = s.event_type_code
               AND w.line_definition_owner_code     = s.line_definition_owner_code
               AND w.line_definition_code           = s.line_definition_code
               AND w.accounting_line_type_code      = s.accounting_line_type_code
               AND w.accounting_line_code           = s.accounting_line_code
               AND w.analytical_criterion_type_code = s.analytical_criterion_type_code
               AND w.analytical_criterion_code      = s.analytical_criterion_code);
Line: 6522

    trace(p_msg    => 'BEGIN LOOP: updated line ac assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6540

      trace(p_msg    => 'LOOP: updated line ac assgn',
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 6551

    record_updated_component
          (p_parent_component_type => 'AMB_LINE_ASSIGNMENT'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_AC'
          ,p_component_key         => l_key
          ,p_merge_impact          => l_comp.merge_impact
          ,p_component_owner_code  => l_comp.analytical_criterion_type_code
          ,p_component_code        => l_comp.analytical_criterion_code);
Line: 6560

    record_updated_line_assgn
          (p_event_class_code           => l_comp.event_class_code
          ,p_event_type_code            => l_comp.event_type_code
          ,p_line_definition_owner_code => l_comp.line_definition_owner_code
          ,p_line_definition_code       => l_comp.line_definition_code
          ,p_accounting_line_type_code  => l_comp.accounting_line_type_code
          ,p_accounting_line_code       => l_comp.accounting_line_code
          ,p_merge_impact               => C_MERGE_IMPACT_UPDATED);
Line: 6572

    trace(p_msg    => 'END LOOP: updated line ac assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6601

    SELECT s.event_class_code
         , s.event_type_code
         , s.line_definition_owner_code
         , s.line_definition_code
         , s.accounting_line_type_code
         , s.accounting_line_code
         , s.analytical_criterion_type_code
         , s.analytical_criterion_code
         , C_MERGE_IMPACT_NEW merge_impact
      FROM xla_mpa_header_ac_assgns s
         , xla_line_defn_jlt_assgns b
     WHERE s.application_id   = g_application_id
       AND s.amb_context_code = g_staging_context_code
       AND b.application_id              = g_application_id
       AND b.amb_context_code            = g_amb_context_code
       AND b.event_class_code            = s.event_class_code
       AND b.event_type_code             = s.event_type_code
       AND b.line_definition_owner_code  = s.line_definition_owner_code
       AND b.line_definition_code        = s.line_definition_code
       AND b.accounting_line_type_code   = s.accounting_line_type_code
       AND b.accounting_line_code        = s.accounting_line_code
       AND NOT EXISTS
           (SELECT 1
              FROM xla_mpa_header_ac_assgns w
             WHERE w.application_id                 = g_application_id
               AND w.amb_context_code               = g_amb_context_code
               AND w.event_class_code               = s.event_class_code
               AND w.event_type_code                = s.event_type_code
               AND w.line_definition_owner_code     = s.line_definition_owner_code
               AND w.line_definition_code           = s.line_definition_code
               AND w.accounting_line_type_code      = s.accounting_line_type_code
               AND w.accounting_line_code           = s.accounting_line_code
               AND w.analytical_criterion_type_code = s.analytical_criterion_type_code
               AND w.analytical_criterion_code      = s.analytical_criterion_code);
Line: 6651

    trace(p_msg    => 'BEGIN LOOP: updated mpa header ac assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6670

      trace(p_msg    => 'LOOP: updated mpa header ac assgn',
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 6681

    record_updated_component
          (p_parent_component_type => 'AMB_MPA_ASSIGNMENT'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_AC'
          ,p_component_key         => l_key
          ,p_merge_impact          => l_comp.merge_impact
          ,p_component_owner_code  => l_comp.analytical_criterion_type_code
          ,p_component_code        => l_comp.analytical_criterion_code);
Line: 6690

    record_updated_mpa_assgn
          (p_event_class_code           => l_comp.event_class_code
          ,p_event_type_code            => l_comp.event_type_code
          ,p_line_definition_owner_code => l_comp.line_definition_owner_code
          ,p_line_definition_code       => l_comp.line_definition_code
          ,p_accounting_line_type_code  => l_comp.accounting_line_type_code
          ,p_accounting_line_code       => l_comp.accounting_line_code
          ,p_merge_impact               => C_MERGE_IMPACT_UPDATED);
Line: 6702

    trace(p_msg    => 'END LOOP: updated mpa header ac assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6730

    SELECT s.event_class_code
         , s.event_type_code
         , s.line_definition_owner_code
         , s.line_definition_code
         , s.accounting_line_type_code
         , s.accounting_line_code
         , CASE WHEN sl.mpa_option_code = 'NONE'
                THEN C_MERGE_IMPACT_DELETED
                WHEN wl.mpa_option_code = 'NONE'
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END merge_impact
         , s.mpa_header_desc_type_code s_mpa_header_desc_type_code
         , w.mpa_header_desc_type_code w_mpa_header_desc_type_code
         , s.mpa_header_desc_code      s_mpa_header_desc_code
         , w.mpa_header_desc_code      w_mpa_header_desc_code
         , s.mpa_num_je_code           s_mpa_num_je_code
         , w.mpa_num_je_code           w_mpa_num_je_code
         , s.mpa_gl_dates_code         s_mpa_gl_dates_code
         , w.mpa_gl_dates_code         w_mpa_gl_dates_code
         , s.mpa_proration_code        s_mpa_proration_code
         , w.mpa_proration_code        w_mpa_proration_code
      FROM xla_line_defn_jlt_assgns s
           JOIN xla_line_defn_jlt_assgns w
           ON  w.application_id              = g_application_id
           AND w.amb_context_code            = g_amb_context_code
           AND w.event_class_code            = s.event_class_code
           AND w.event_type_code             = s.event_type_code
           AND w.line_definition_owner_code  = s.line_definition_owner_code
           AND w.line_definition_code        = s.line_definition_code
           AND w.accounting_line_type_code   = s.accounting_line_type_code
           AND w.accounting_line_code        = s.accounting_line_code
           JOIN xla_acct_line_types_b sl
           ON  sl.application_id             = s.application_id
           AND sl.amb_context_code           = s.amb_context_code
           AND sl.event_class_code           = s.event_class_code
           AND sl.accounting_line_type_code  = s.accounting_line_type_code
           AND sl.accounting_line_code       = s.accounting_line_code
           JOIN xla_acct_line_types_b wl
           ON  wl.application_id             = w.application_id
           AND wl.amb_context_code           = w.amb_context_code
           AND wl.event_class_code           = w.event_class_code
           AND wl.accounting_line_type_code  = w.accounting_line_type_code
           AND wl.accounting_line_code       = w.accounting_line_code
           --AND sl.mpa_option_code           <> wl.mpa_option_code
     WHERE s.application_id                  = g_application_id
       AND s.amb_context_code                = g_staging_context_code
       AND (sl.mpa_option_code               = 'ACCRUAL' OR
            wl.mpa_option_code               = 'ACCRUAL')
       AND (NVL(s.mpa_header_desc_type_code,C_CHAR) <> NVL(w.mpa_header_desc_type_code,C_CHAR) OR
            NVL(s.mpa_header_desc_code,C_CHAR)      <> NVL(w.mpa_header_desc_code,C_CHAR)      OR
            NVL(s.mpa_num_je_code,C_CHAR)           <> NVL(w.mpa_num_je_code,C_CHAR)           OR
            NVL(s.mpa_gl_dates_code,C_CHAR)         <> NVL(w.mpa_gl_dates_code,C_CHAR)         OR
            NVL(s.mpa_proration_code,C_CHAR)        <> NVL(w.mpa_proration_code,C_CHAR));
Line: 6800

    trace(p_msg    => 'BEGIN LOOP: updated mpa header assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6816

      trace(p_msg    => 'LOOP: updated mpa header assgn - ',
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 6824

    record_updated_mpa_assgn
                (p_event_class_code           => l_comp.event_class_code
                ,p_event_type_code            => l_comp.event_type_code
                ,p_line_definition_owner_code => l_comp.line_definition_owner_code
                ,p_line_definition_code       => l_comp.line_definition_code
                ,p_accounting_line_type_code  => l_comp.accounting_line_type_code
                ,p_accounting_line_code       => l_comp.accounting_line_code
                ,p_merge_impact               => l_comp.merge_impact);
Line: 6833

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

      IF (l_comp.s_mpa_header_desc_type_code IS NOT NULL AND
          l_comp.w_mpa_header_desc_type_code IS NULL) OR
         (NVL(l_comp.s_mpa_header_desc_type_code,C_CHAR) <> NVL(l_comp.s_mpa_header_desc_type_code,C_CHAR) OR
          NVL(l_comp.w_mpa_header_desc_code,C_CHAR)      <> NVL(l_comp.s_mpa_header_desc_code,C_CHAR)) THEN

        l_key := l_comp.s_mpa_header_desc_type_code||C_CHAR||
                 l_comp.s_mpa_header_desc_code;
Line: 6843

        record_updated_component
                 (p_parent_component_type => 'AMB_MPA_ASSIGNMENT'
                 ,p_parent_component_key  => l_parent_key
                 ,p_component_type        => 'AMB_DESCRIPTION'
                 ,p_component_key         => l_key
                 ,p_merge_impact          => C_MERGE_IMPACT_NEW
                 ,p_component_owner_code  => l_comp.s_mpa_header_desc_type_code
                 ,p_component_code        => l_comp.s_mpa_header_desc_code);
Line: 6860

        record_updated_component
                 (p_parent_component_type => 'AMB_MPA_ASSIGNMENT'
                 ,p_parent_component_key  => l_parent_key
                 ,p_component_type        => 'AMB_DESCRIPTION'
                 ,p_component_key         => l_key
                 ,p_merge_impact          => C_MERGE_IMPACT_DELETED
                 ,p_component_owner_code  => l_comp.s_mpa_header_desc_type_code
                 ,p_component_code        => l_comp.s_mpa_header_desc_code);
Line: 6871

        record_updated_property
              (p_component_type => 'AMB_MPA_ASSIGNMENT'
              ,p_component_key  => l_parent_key
              ,p_property       => 'MPA_NUM_JE'
              ,p_old_value      => l_comp.w_mpa_num_je_code
              ,p_new_value      => l_comp.s_mpa_num_je_code
              ,p_lookup_type    => 'XLA_MPA_NUM_OF_ENTRIES');
Line: 6881

        record_updated_property
              (p_component_type => 'AMB_MPA_ASSIGNMENT'
              ,p_component_key  => l_parent_key
              ,p_property       => 'MPA_GL_DATES'
              ,p_old_value      => l_comp.w_mpa_gl_dates_code
              ,p_new_value      => l_comp.s_mpa_gl_dates_code
              ,p_lookup_type    => 'XLA_MPA_GL_DATE');
Line: 6891

        record_updated_property
              (p_component_type => 'AMB_MPA_ASSIGNMENT'
              ,p_component_key  => l_parent_key
              ,p_property       => 'MPA_PRORATION'
              ,p_old_value      => l_comp.w_mpa_proration_code
              ,p_new_value      => l_comp.s_mpa_proration_code
              ,p_lookup_type    => 'XLA_MPA_PRORATION');
Line: 6904

    trace(p_msg    => 'END LOOP: updated mpa header assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 6932

    SELECT s.event_class_code
         , s.event_type_code
         , s.line_definition_owner_code
         , s.line_definition_code
         , s.accounting_line_type_code
         , s.accounting_line_code
         , s.mpa_accounting_line_type_code
         , s.mpa_accounting_line_code
         , s.flexfield_segment_code
         , l.accounting_coa_id
         , CASE WHEN w.application_id IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END                merge_impact
         , s.segment_rule_appl_id   s_segment_rule_appl_id
         , w.segment_rule_appl_id   w_segment_rule_appl_id
         , s.segment_rule_type_code s_segment_rule_type_code
         , w.segment_rule_type_code w_segment_rule_type_code
         , s.segment_rule_code      s_segment_rule_code
         , w.segment_rule_code      w_segment_rule_code
         , s.inherit_adr_flag       s_inherit_adr_flag
         , w.inherit_adr_flag       w_inherit_adr_flag
      FROM xla_mpa_jlt_adr_assgns s
           JOIN xla_line_definitions_b l
           ON  l.application_id              = g_application_id
           AND l.amb_context_code            = g_amb_context_code
           AND l.event_class_code            = s.event_class_code
           AND l.event_type_code             = s.event_type_code
           AND l.line_definition_owner_code  = s.line_definition_owner_code
           AND l.line_definition_code        = s.line_definition_code
           JOIN xla_mpa_jlt_assgns b
           ON  b.application_id                = g_application_id
           AND b.amb_context_code              = g_amb_context_code
           AND b.event_class_code              = s.event_class_code
           AND b.event_type_code               = s.event_type_code
           AND b.line_definition_owner_code    = s.line_definition_owner_code
           AND b.line_definition_code          = s.line_definition_code
           AND b.accounting_line_type_code     = s.accounting_line_type_code
           AND b.accounting_line_code          = s.accounting_line_code
           AND b.mpa_accounting_line_type_code = s.mpa_accounting_line_type_code
           AND b.mpa_accounting_line_code      = s.mpa_accounting_line_code
           LEFT OUTER JOIN xla_mpa_jlt_adr_assgns w
           ON  w.application_id                 = g_application_id
           AND w.amb_context_code               = g_amb_context_code
           AND w.event_class_code               = s.event_class_code
           AND w.event_type_code                = s.event_type_code
           AND w.line_definition_owner_code     = s.line_definition_owner_code
           AND w.line_definition_code           = s.line_definition_code
           AND w.accounting_line_type_code      = s.accounting_line_type_code
           AND w.accounting_line_code           = s.accounting_line_code
           AND w.mpa_accounting_line_type_code  = s.mpa_accounting_line_type_code
           AND w.mpa_accounting_line_code       = s.mpa_accounting_line_code
           AND w.flexfield_segment_code         = s.flexfield_segment_code
     WHERE s.application_id   = g_application_id
       AND s.amb_context_code = g_staging_context_code
       AND (w.application_id                     IS NULL OR
            s.inherit_adr_flag                   <> w.inherit_adr_flag OR
            NVL(s.segment_rule_appl_id,C_NUM)    <> NVL(w.segment_rule_appl_id,C_NUM) OR
            NVL(s.segment_rule_type_code,C_CHAR) <> NVL(w.segment_rule_type_code,C_CHAR) OR
            NVL(s.segment_rule_code,C_CHAR)      <> NVL(w.segment_rule_code,C_CHAR));
Line: 7008

    trace(p_msg    => 'BEGIN LOOP: updated mpa line adr assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7029

      trace(p_msg    => 'LOOP: updated mpa line adr assgn',
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 7041

      record_updated_component
          (p_parent_component_type => 'AMB_MPA_LINE_ASSIGNMENT'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_MPA_ADR_ASSGN'
          ,p_component_key         => l_key
          ,p_merge_impact          => l_comp.merge_impact
          ,p_component_owner_code  => l_comp.accounting_coa_id
          ,p_component_code        => l_comp.flexfield_segment_code);
Line: 7050

      record_updated_mpa_line_assgn
          (p_event_class_code              => l_comp.event_class_code
          ,p_event_type_code               => l_comp.event_type_code
          ,p_line_definition_owner_code    => l_comp.line_definition_owner_code
          ,p_line_definition_code          => l_comp.line_definition_code
          ,p_accounting_line_type_code     => l_comp.accounting_line_type_code
          ,p_accounting_line_code          => l_comp.accounting_line_code
          ,p_mpa_acct_line_type_code       => l_comp.mpa_accounting_line_type_code
          ,p_mpa_acct_line_code            => l_comp.mpa_accounting_line_code
          ,p_merge_impact                  => C_MERGE_IMPACT_UPDATED);
Line: 7063

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

      IF (l_comp.w_inherit_adr_flag <> l_comp.s_inherit_adr_flag) THEN
        record_updated_property
              (p_component_type => 'AMB_MPA_ADR_ASSGN'
              ,p_component_key  => l_key
              ,p_property       => 'INHERIT_ADR_FLAG'
              ,p_old_value      => l_comp.w_inherit_adr_flag
              ,p_new_value      => l_comp.s_inherit_adr_flag
              ,p_lookup_type    => 'XLA_YES_NO');
Line: 7084

          record_updated_component
                 (p_parent_component_type => 'AMB_MPA_ADR_ASSGN'
                 ,p_parent_component_key  => l_parent_key
                 ,p_component_type        => 'AMB_ADR'
                 ,p_component_key         => l_comp.s_segment_rule_type_code||C_CHAR||
                                             l_comp.s_segment_rule_code
                 ,p_merge_impact          => C_MERGE_IMPACT_NEW
                 ,p_component_appl_id     => l_comp.s_segment_rule_appl_id
                 ,p_component_owner_code  => l_comp.s_segment_rule_type_code
                 ,p_component_code        => l_comp.s_segment_rule_code);
Line: 7098

          record_updated_component
                 (p_parent_component_type => 'AMB_MPA_ADR_ASSGN'
                 ,p_parent_component_key  => l_parent_key
                 ,p_component_type        => 'AMB_ADR'
                 ,p_component_key         => l_comp.w_segment_rule_type_code||C_CHAR||
                                             l_comp.w_segment_rule_code
                 ,p_merge_impact          => C_MERGE_IMPACT_DELETED
                 ,p_component_appl_id     => l_comp.w_segment_rule_appl_id
                 ,p_component_owner_code  => l_comp.s_segment_rule_type_code
                 ,p_component_code        => l_comp.w_segment_rule_code);
Line: 7115

    trace(p_msg    => 'END LOOP: updated mpa line adr assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7143

    SELECT s.event_class_code
         , s.event_type_code
         , s.line_definition_owner_code
         , s.line_definition_code
         , s.accounting_line_type_code
         , s.accounting_line_code
         , s.mpa_accounting_line_type_code
         , s.mpa_accounting_line_code
         , s.analytical_criterion_type_code
         , s.analytical_criterion_code
         , C_MERGE_IMPACT_NEW merge_impact
      FROM xla_mpa_jlt_ac_assgns s
         , xla_mpa_jlt_assgns b
     WHERE s.application_id                = g_application_id
       AND s.amb_context_code              = g_staging_context_code
       AND b.application_id                = g_application_id
       AND b.amb_context_code              = g_amb_context_code
       AND b.event_class_code              = s.event_class_code
       AND b.event_type_code               = s.event_type_code
       AND b.line_definition_owner_code    = s.line_definition_owner_code
       AND b.line_definition_code          = s.line_definition_code
       AND b.accounting_line_type_code     = s.accounting_line_type_code
       AND b.accounting_line_code          = s.accounting_line_code
       AND b.mpa_accounting_line_type_code = s.mpa_accounting_line_type_code
       AND b.mpa_accounting_line_code      = s.mpa_accounting_line_code
       AND NOT EXISTS
           (SELECT 1
              FROM xla_mpa_jlt_ac_assgns w
             WHERE w.application_id                 = g_application_id
               AND w.amb_context_code               = g_amb_context_code
               AND w.event_class_code               = s.event_class_code
               AND w.event_type_code                = s.event_type_code
               AND w.line_definition_owner_code     = s.line_definition_owner_code
               AND w.line_definition_code           = s.line_definition_code
               AND w.accounting_line_type_code      = s.accounting_line_type_code
               AND w.accounting_line_code           = s.accounting_line_code
               AND w.mpa_accounting_line_type_code  = s.mpa_accounting_line_type_code
               AND w.mpa_accounting_line_code       = s.mpa_accounting_line_code
               AND w.analytical_criterion_type_code = s.analytical_criterion_type_code
               AND w.analytical_criterion_code      = s.analytical_criterion_code);
Line: 7199

    trace(p_msg    => 'BEGIN LOOP: updated mpa line ac assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7220

      trace(p_msg    => 'LOOP: updated mpa line ac assgn',
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 7231

    record_updated_component
          (p_parent_component_type => 'AMB_MPA_LINE_ASSIGNMENT'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_AC'
          ,p_component_key         => l_key
          ,p_merge_impact          => l_comp.merge_impact
          ,p_component_owner_code  => l_comp.analytical_criterion_type_code
          ,p_component_code        => l_comp.analytical_criterion_code);
Line: 7240

    record_updated_mpa_line_assgn
          (p_event_class_code           => l_comp.event_class_code
          ,p_event_type_code            => l_comp.event_type_code
          ,p_line_definition_owner_code => l_comp.line_definition_owner_code
          ,p_line_definition_code       => l_comp.line_definition_code
          ,p_accounting_line_type_code  => l_comp.accounting_line_type_code
          ,p_accounting_line_code       => l_comp.accounting_line_code
          ,p_mpa_acct_line_type_code    => l_comp.mpa_accounting_line_type_code
          ,p_mpa_acct_line_code         => l_comp.mpa_accounting_line_code
          ,p_merge_impact               => C_MERGE_IMPACT_UPDATED);
Line: 7254

    trace(p_msg    => 'END LOOP: updated mpa line ac assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7282

    SELECT s.event_class_code
         , s.event_type_code
         , s.line_definition_owner_code
         , s.line_definition_code
         , s.accounting_line_type_code
         , s.accounting_line_code
         , s.mpa_accounting_line_type_code
         , s.mpa_accounting_line_code
         , CASE WHEN w.mpa_accounting_line_code IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END                 merge_impact
         , s.description_type_code  s_description_type_code
         , w.description_type_code  w_description_type_code
         , s.description_code       s_description_code
         , w.description_code       w_description_code
      FROM xla_mpa_jlt_assgns       s
           JOIN xla_line_defn_jlt_assgns bw
           ON  bw.application_id              = g_application_id
           AND bw.amb_context_code            = g_amb_context_code
           AND bw.event_class_code            = s.event_class_code
           AND bw.event_type_code             = s.event_type_code
           AND bw.line_definition_owner_code  = s.line_definition_owner_code
           AND bw.line_definition_code        = s.line_definition_code
           AND bw.accounting_line_type_code   = s.accounting_line_type_code
           AND bw.accounting_line_code        = s.accounting_line_code
           LEFT OUTER JOIN xla_mpa_jlt_assgns w
           ON  w.application_id                = g_application_id
           AND w.amb_context_code              = g_amb_context_code
           AND w.event_class_code              = s.event_class_code
           AND w.event_type_code               = s.event_type_code
           AND w.line_definition_owner_code    = s.line_definition_owner_code
           AND w.line_definition_code          = s.line_definition_code
           AND w.accounting_line_type_code     = s.accounting_line_type_code
           AND w.accounting_line_code          = s.accounting_line_code
           AND w.mpa_accounting_line_type_code = s.mpa_accounting_line_type_code
           AND w.mpa_accounting_line_code      = s.mpa_accounting_line_code
     WHERE s.application_id   = g_application_id
       AND s.amb_context_code = g_staging_context_code
       AND (w.mpa_accounting_line_code IS NULL
        OR  s.description_type_code    <> w.description_type_code
        OR  s.description_code         <> w.description_code)
  UNION
    SELECT w.event_class_code
         , w.event_type_code
         , w.line_definition_owner_code
         , w.line_definition_code
         , w.accounting_line_type_code
         , w.accounting_line_code
         , w.mpa_accounting_line_type_code
         , w.mpa_accounting_line_code
         , C_MERGE_IMPACT_DELETED
         , NULL, NULL, NULL, NULL
      FROM xla_mpa_jlt_assgns       w
           JOIN xla_line_defn_jlt_assgns bs
           ON  bs.application_id              = g_application_id
           AND bs.amb_context_code            = g_staging_context_code
           AND bs.event_class_code            = w.event_class_code
           AND bs.event_type_code             = w.event_type_code
           AND bs.line_definition_owner_code  = w.line_definition_owner_code
           AND bs.line_definition_code        = w.line_definition_code
           AND bs.accounting_line_type_code   = w.accounting_line_type_code
           AND bs.accounting_line_code        = w.accounting_line_code
           LEFT OUTER JOIN xla_mpa_jlt_assgns s
           ON  s.application_id                = g_application_id
           AND s.amb_context_code              = g_staging_context_code
           AND s.event_class_code              = w.event_class_code
           AND s.event_type_code               = w.event_type_code
           AND s.line_definition_owner_code    = w.line_definition_owner_code
           AND s.line_definition_code          = w.line_definition_code
           AND s.accounting_line_type_code     = w.accounting_line_type_code
           AND s.accounting_line_code          = w.accounting_line_code
           AND s.mpa_accounting_line_type_code = w.mpa_accounting_line_type_code
           AND s.mpa_accounting_line_code      = w.mpa_accounting_line_code
     WHERE s.application_id   = g_application_id
       AND s.amb_context_code = g_amb_context_code
       AND w.mpa_accounting_line_code IS NULL;
Line: 7375

    trace(p_msg    => 'BEGIN LOOP: updated mpa jlt assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7393

      trace(p_msg    => 'LOOP: updated mpa jlt assgn - merge_impact = '||l_comp.merge_impact,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 7401

    IF (l_comp.merge_impact IN (C_MERGE_IMPACT_NEW, C_MERGE_IMPACT_DELETED)) THEN

      l_key := l_comp.mpa_accounting_line_type_code||C_CHAR||
               l_comp.mpa_accounting_line_code;
Line: 7412

      record_updated_component
          (p_parent_component_type => 'AMB_MPA_LINE_ASSIGNMENT'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_JLT'
          ,p_component_key         => l_key
          ,p_merge_impact          => l_comp.merge_impact
          ,p_event_class_code      => l_comp.event_class_code
          ,p_event_type_code       => NULL
          ,p_component_owner_code  => l_comp.mpa_accounting_line_type_code
          ,p_component_code        => l_comp.mpa_accounting_line_code);
Line: 7439

        record_updated_component
          (p_parent_component_type => 'AMB_MPA_LINE_ASSIGNMENT'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_DESCRIPTION'
          ,p_component_key         => l_key
          ,p_merge_impact          => C_MERGE_IMPACT_NEW
          ,p_component_owner_code  => l_comp.s_description_type_code
          ,p_component_code        => l_comp.s_description_code);
Line: 7456

          trace(p_msg    => 'merge_impact = '||C_MERGE_IMPACT_DELETED,
                p_module => l_log_module,
                p_level  => C_LEVEL_PROCEDURE);
Line: 7464

        record_updated_component
          (p_parent_component_type => 'AMB_MPA_LINE_ASSIGNMENT'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_DESCRIPTION'
          ,p_component_key         => l_key
          ,p_merge_impact          => C_MERGE_IMPACT_DELETED
          ,p_component_owner_code  => l_comp.w_description_type_code
          ,p_component_code        => l_comp.w_description_code);
Line: 7476

    record_updated_mpa_line_assgn
          (p_event_class_code               => l_comp.event_class_code
          ,p_event_type_code                => l_comp.event_type_code
          ,p_line_definition_owner_code     => l_comp.line_definition_owner_code
          ,p_line_definition_code           => l_comp.line_definition_code
          ,p_accounting_line_type_code      => l_comp.accounting_line_type_code
          ,p_accounting_line_code           => l_comp.accounting_line_code
          ,p_mpa_acct_line_type_code        => l_comp.mpa_accounting_line_type_code
          ,p_mpa_acct_line_code             => l_comp.mpa_accounting_line_code
          ,p_merge_impact                   => C_MERGE_IMPACT_UPDATED);
Line: 7490

    trace(p_msg    => 'END LOOP: updated mpa jlt assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7519

    SELECT s.event_class_code
         , s.event_type_code
         , s.line_definition_owner_code
         , s.line_definition_code
         , s.accounting_line_type_code
         , s.accounting_line_code
         , CASE WHEN w.application_id IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END                    merge_impact
         , s.active_flag               s_active_flag
         , w.active_flag               w_active_flag
         , s.description_type_code     s_description_type_code
         , w.description_type_code     w_description_type_code
         , s.description_code          s_description_code
         , w.description_code          w_description_code
         , s.inherit_desc_flag         s_inherit_desc_flag
         , w.inherit_desc_flag         w_inherit_desc_flag
      FROM xla_line_defn_jlt_assgns s
           JOIN xla_line_definitions_b b
           ON  b.application_id             = g_application_id
           AND b.amb_context_code           = g_amb_context_code
           AND b.event_class_code           = s.event_class_code
           AND b.event_type_code            = s.event_type_code
           AND b.line_definition_owner_code = s.line_definition_owner_code
           AND b.line_definition_code       = s.line_definition_code
           LEFT OUTER JOIN xla_line_defn_jlt_assgns w
           ON  w.application_id             = g_application_id
           AND w.amb_context_code           = g_amb_context_code
           AND w.event_class_code           = s.event_class_code
           AND w.event_type_code            = s.event_type_code
           AND w.line_definition_owner_code = s.line_definition_owner_code
           AND w.line_definition_code       = s.line_definition_code
           AND w.accounting_line_type_code  = s.accounting_line_type_code
           AND w.accounting_line_code       = s.accounting_line_code
     WHERE s.application_id   = g_application_id
       AND s.amb_context_code = g_staging_context_code
       AND (w.application_id IS NULL
        OR  NVL(s.active_flag,C_CHAR)               <> NVL(w.active_flag,C_CHAR)
        OR  NVL(s.inherit_desc_flag,C_CHAR)         <> NVL(w.inherit_desc_flag,C_CHAR)
        OR  NVL(s.description_type_code,C_CHAR)     <> NVL(w.description_type_code,C_CHAR)
        OR  NVL(s.description_code,C_CHAR)          <> NVL(w.description_code,C_CHAR)
        );
Line: 7579

    trace(p_msg    => 'END LOOP: updated jld jlt assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7586

    record_updated_line_assgn
          (p_event_class_code           => l_comp.event_class_code
          ,p_event_type_code            => l_comp.event_type_code
          ,p_line_definition_owner_code => l_comp.line_definition_owner_code
          ,p_line_definition_code       => l_comp.line_definition_code
          ,p_accounting_line_type_code  => l_comp.accounting_line_type_code
          ,p_accounting_line_code       => l_comp.accounting_line_code
          ,p_merge_impact               => l_comp.merge_impact);
Line: 7595

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

      l_parent_key := l_comp.event_class_code||C_CHAR||
               l_comp.event_type_code||C_CHAR||
               l_comp.line_definition_owner_code||C_CHAR||
               l_comp.line_definition_code||C_CHAR||
               l_comp.accounting_line_type_code||C_CHAR||
               l_comp.accounting_line_code;
Line: 7605

        record_updated_property
              (p_component_type => 'AMB_LINE_ASSIGNMENT'
              ,p_component_key  => l_parent_key
              ,p_property       => 'ACTIVE'
              ,p_old_value      => l_comp.w_active_flag
              ,p_new_value      => l_comp.s_active_flag
              ,p_lookup_type    => 'XLA_YES_NO');
Line: 7616

        record_updated_property
              (p_component_type => 'AMB_LINE_ASSIGNMENT'
              ,p_component_key  => l_parent_key
              ,p_property       => 'INHERIT_DESC'
              ,p_old_value      => l_comp.w_inherit_desc_flag
              ,p_new_value      => l_comp.s_inherit_desc_flag
              ,p_lookup_type    => 'XLA_YES_NO');
Line: 7636

            record_updated_component
                 (p_parent_component_type => 'AMB_LINE_ASSIGNMENT'
                 ,p_parent_component_key  => l_parent_key
                 ,p_component_type        => 'AMB_DESCRIPTION'
                 ,p_component_key         => l_key
                 ,p_merge_impact          => C_MERGE_IMPACT_NEW
                 ,p_component_owner_code  => l_comp.s_description_type_code
                 ,p_component_code        => l_comp.s_description_code);
Line: 7654

            record_updated_component
                 (p_parent_component_type => 'AMB_LINE_ASSIGNMENT'
                 ,p_parent_component_key  => l_parent_key
                 ,p_component_type        => 'AMB_DESCRIPTION'
                 ,p_component_key         => l_key
                 ,p_merge_impact          => C_MERGE_IMPACT_DELETED
                 ,p_component_owner_code  => l_comp.w_description_type_code
                 ,p_component_code        => l_comp.w_description_code);
Line: 7664

      END IF; -- updated description
Line: 7666

    END IF; -- l_comp.merge_impact = C_MERGE_IMPACT_UPDATED
Line: 7671

    trace(p_msg    => 'END LOOP: updated jld jlt assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7700

    SELECT ts.event_class_code
          ,ts.event_type_code
          ,ts.line_definition_owner_code
          ,ts.line_definition_code
          ,ts.name                       s_name
          ,tw.name                       w_name
          ,ts.description                s_description
          ,tw.description                w_description
          ,bs.enabled_flag               s_enabled_flag
          ,bw.enabled_flag               w_enabled_flag
          ,bs.accounting_coa_id          s_acct_coa_id
          ,bw.accounting_coa_id          w_acct_coa_id
          ,bs.transaction_coa_id         s_trx_coa_id
          ,bw.transaction_coa_id         w_trx_coa_id
          ,bs.budgetary_control_flag     s_budgetary_control_flag
          ,bw.budgetary_control_flag     w_budgetary_control_flag
      FROM xla_line_definitions_b bs
           JOIN xla_line_definitions_tl ts
           ON  ts.application_id             = bs.application_id
           AND ts.amb_context_code           = bs.amb_context_code
           AND ts.event_class_code           = bs.event_class_code
           AND ts.event_type_code            = bs.event_type_code
           AND ts.line_definition_owner_code = bs.line_definition_owner_code
           AND ts.line_definition_code       = bs.line_definition_code
           AND ts.language                   = USERENV('LANG')
           JOIN xla_line_definitions_b bw
           ON  bw.application_id             = bs.application_id
           AND bw.amb_context_code           = g_amb_context_code
           AND bw.event_class_code           = bs.event_class_code
           AND bw.event_type_code            = bs.event_type_code
           AND bw.line_definition_owner_code = bs.line_definition_owner_code
           AND bw.line_definition_code       = bs.line_definition_code
           JOIN xla_line_definitions_tl tw
           ON  tw.application_id             = bw.application_id
           AND tw.amb_context_code           = bw.amb_context_code
           AND tw.event_class_code           = bw.event_class_code
           AND tw.event_type_code            = bw.event_type_code
           AND tw.line_definition_owner_code = bw.line_definition_owner_code
           AND tw.line_definition_code       = bw.line_definition_code
           AND tw.language                   = USERENV('LANG')
     WHERE bs.amb_context_code = g_staging_context_code
       AND bw.amb_context_code = g_amb_context_code
       AND (ts.name                          <> tw.name                          OR
            NVL(ts.description,C_CHAR)       <> NVL(tw.description,C_CHAR)       OR
            bs.enabled_flag                  <> bw.enabled_flag                  OR
            bs.budgetary_control_flag        <> bw.budgetary_control_flag        OR
            NVL(bs.transaction_coa_id,C_NUM) <> NVL(bw.transaction_coa_id,C_NUM) OR
            NVL(bs.accounting_coa_id,C_NUM)  <> NVL(bw.accounting_coa_id,C_NUM));
Line: 7763

    trace(p_msg    => 'BEGIN LOOP: updated jlds',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7776

      trace(p_msg    => 'LOOP: updated jld - '||l_key,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 7781

    record_updated_jld
          (p_event_class_code           => l_comp.event_class_code
          ,p_event_type_code            => l_comp.event_type_code
          ,p_line_definition_owner_code => l_comp.line_definition_owner_code
          ,p_line_definition_code       => l_comp.line_definition_code);
Line: 7788

      record_updated_property
          (p_component_type          => 'AMB_JLD'
          ,p_component_key           => l_key
          ,p_property                => 'NAME'
          ,p_old_value               => l_comp.w_name
          ,p_new_value               => l_comp.s_name);
Line: 7797

      record_updated_property
          (p_component_type          => 'AMB_JLD'
          ,p_component_key           => l_key
          ,p_property                => 'DESCRIPTION'
          ,p_old_value               => l_comp.w_description
          ,p_new_value               => l_comp.s_description);
Line: 7806

      record_updated_property
          (p_component_type          => 'AMB_JLD'
          ,p_component_key           => l_key
          ,p_property                => 'ENABLED'
          ,p_old_value               => l_comp.w_enabled_flag
          ,p_new_value               => l_comp.s_enabled_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 7816

      record_updated_property
          (p_component_type          => 'AMB_JLD'
          ,p_component_key           => l_key
          ,p_property                => 'BUDGETARY_CONTROL'
          ,p_old_value               => l_comp.w_budgetary_control_flag
          ,p_new_value               => l_comp.s_budgetary_control_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 7826

      record_updated_property
          (p_component_type          => 'AMB_JLD'
          ,p_component_key           => l_key
          ,p_property                => 'ACCOUNTING_COA'
          ,p_old_value               => l_comp.w_acct_coa_id
          ,p_new_value               => l_comp.s_acct_coa_id);
Line: 7835

      record_updated_property
          (p_component_type          => 'AMB_JLD'
          ,p_component_key           => l_key
          ,p_property                => 'TRANSACTION_COA'
          ,p_old_value               => l_comp.w_trx_coa_id
          ,p_new_value               => l_comp.s_trx_coa_id);
Line: 7846

    trace(p_msg    => 'END LOOP: updated jlds',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7876

    SELECT s.product_rule_type_code
         , s.product_rule_code
         , s.event_class_code
         , s.event_type_code
         , s.line_definition_owner_code
         , s.line_definition_code
         , C_MERGE_IMPACT_NEW merge_impact
      FROM xla_aad_line_defn_assgns s
         , xla_prod_acct_headers    b
     WHERE s.application_id         = g_application_id
       AND s.amb_context_code       = g_staging_context_code
       AND b.application_id         = g_application_id
       AND b.amb_context_code       = g_amb_context_code
       AND b.product_rule_type_code = s.product_rule_type_code
       AND b.product_rule_code      = s.product_rule_code
       AND b.event_class_code       = s.event_class_code
       AND b.event_type_code        = s.event_type_code
       AND NOT EXISTS
           (SELECT 1
              FROM xla_aad_line_defn_assgns w
             WHERE w.application_id             = g_application_id
               AND w.amb_context_code           = g_amb_context_code
               AND s.product_rule_type_code     = w.product_rule_type_code
               AND s.product_rule_code          = w.product_rule_code
               AND s.event_class_code           = w.event_class_code
               AND s.event_type_code            = w.event_type_code
               AND s.line_definition_owner_code = w.line_definition_owner_code
               AND s.line_definition_code       = w.line_definition_code);
Line: 7918

    trace(p_msg    => 'BEGIN LOOP: updated jld assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7925

    record_updated_jld_assgn
          (p_product_rule_type_code     => l_comp.product_rule_type_code
          ,p_product_rule_code          => l_comp.product_rule_code
          ,p_event_class_code           => l_comp.event_class_code
          ,p_event_type_code            => l_comp.event_type_code
          ,p_line_defn_owner_code       => l_comp.line_definition_owner_code
          ,p_line_defn_code             => l_comp.line_definition_code
          ,p_merge_impact               => l_comp.merge_impact);
Line: 7937

    trace(p_msg    => 'END LOOP: updated jld assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 7965

    SELECT s.product_rule_type_code
         , s.product_rule_code
         , s.event_class_code
         , s.event_type_code
         , s.analytical_criterion_type_code
         , s.analytical_criterion_code
         , C_MERGE_IMPACT_NEW merge_impact
      FROM xla_aad_header_ac_assgns s
         , xla_prod_acct_headers b
     WHERE s.application_id              = g_application_id
       AND s.amb_context_code            = g_staging_context_code
       AND b.application_id              = g_application_id
       AND b.amb_context_code            = g_amb_context_code
       AND b.product_rule_type_code      = s.product_rule_type_code
       AND b.product_rule_code           = s.product_rule_code
       AND b.event_class_code            = s.event_class_code
       AND b.event_type_code             = s.event_type_code
       AND NOT EXISTS
           (SELECT 1
              FROM xla_aad_header_ac_assgns w
             WHERE w.application_id                 = g_application_id
               AND w.amb_context_code               = g_amb_context_code
               AND w.product_rule_type_code         = s.product_rule_type_code
               AND w.product_rule_code              = s.product_rule_code
               AND w.event_class_code               = s.event_class_code
               AND w.event_type_code                = s.event_type_code
               AND w.analytical_criterion_type_code = s.analytical_criterion_type_code
               AND w.analytical_criterion_code      = s.analytical_criterion_code);
Line: 8009

    trace(p_msg    => 'BEGIN LOOP: updated header ac assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 8025

      trace(p_msg    => 'LOOP: updated header ac assgn - '||l_key,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 8031

      record_updated_component
          (p_parent_component_type => 'AMB_AAD_EVENT_TYPE'
          ,p_parent_component_key  => l_parent_key
          ,p_component_type        => 'AMB_AC'
          ,p_component_key         => l_key
          ,p_merge_impact          => l_comp.merge_impact
          ,p_component_owner_code  => l_comp.analytical_criterion_type_code
          ,p_component_code        => l_comp.analytical_criterion_code);
Line: 8040

      record_updated_header_assgn
          (p_product_rule_type_code => l_comp.product_rule_type_code
          ,p_product_rule_code      => l_comp.product_rule_code
          ,p_event_class_code       => l_comp.event_class_code
          ,p_event_type_code        => l_comp.event_type_code
          ,p_merge_impact           => C_MERGE_IMPACT_UPDATED);
Line: 8050

    trace(p_msg    => 'END LOOP: updated header ac assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 8079

    SELECT s.product_rule_type_code
         , s.product_rule_code
         , s.event_class_code
         , s.event_type_code
         , s.accounting_attribute_code
         , CASE WHEN w.accounting_attribute_code IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED END merge_impact
         ,s.event_class_default_flag s_event_class_default_flag
         ,w.event_class_default_flag w_event_class_default_flag
         ,s.source_application_id    s_source_application_id
         ,w.source_application_id    w_source_application_id
         ,s.source_type_code         s_source_type_code
         ,w.source_type_code         w_source_type_code
         ,s.source_code              s_source_code
         ,w.source_code              w_source_code
      FROM xla_aad_hdr_acct_attrs s
           JOIN xla_prod_acct_headers b
           ON  b.application_id              = g_application_id
           AND b.amb_context_code            = g_amb_context_code
           AND b.product_rule_type_code      = s.product_rule_type_code
           AND b.product_rule_code           = s.product_rule_code
           AND b.event_class_code            = s.event_class_code
           AND b.event_type_code             = s.event_type_code
           LEFT OUTER JOIN xla_aad_hdr_acct_attrs w
           ON  w.application_id                 = g_application_id
           AND w.amb_context_code               = g_amb_context_code
           AND w.product_rule_type_code         = s.product_rule_type_code
           AND w.product_rule_code              = s.product_rule_code
           AND w.event_class_code               = s.event_class_code
           AND w.event_type_code                = s.event_type_code
           AND w.accounting_attribute_code      = s.accounting_attribute_code
     WHERE s.application_id              = g_application_id
       AND s.amb_context_code            = g_staging_context_code
       AND (w.accounting_attribute_code IS NULL OR
            s.event_class_default_flag <> w.event_class_default_flag OR
            s.source_application_id    <> w.source_application_id OR
            s.source_type_code         <> w.source_type_code OR
            s.source_code              <> w.source_code);
Line: 8133

    trace(p_msg    => 'BEGIN LOOP: updated header acct attrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 8147

      trace(p_msg    => 'LOOP: updated header acct attr - '||l_key,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 8154

      record_updated_header_assgn
          (p_product_rule_type_code => l_comp.product_rule_type_code
          ,p_product_rule_code      => l_comp.product_rule_code
          ,p_event_class_code       => l_comp.event_class_code
          ,p_event_type_code        => l_comp.event_type_code
          ,p_merge_impact           => C_MERGE_IMPACT_UPDATED);
Line: 8161

      IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

        IF (l_comp.s_event_class_default_flag <> l_comp.w_event_class_default_flag) THEN

          record_updated_property
            (p_component_type          => 'AMB_AAD_EVENT_TYPE'
            ,p_component_key           => l_key
            ,p_property                => 'ACCOUNTING_REQUIRED_FLAG'
            ,p_old_value               => l_comp.w_event_class_default_flag
            ,p_new_value               => l_comp.s_event_class_default_flag
            ,p_lookup_type             => 'XLA_YES_NO');
Line: 8178

          record_updated_source
            (p_component_type          => 'AMB_AAD_EVENT_TYPE'
            ,p_component_key           => l_key
            ,p_property                => 'SOURCE_CODE'
            ,p_old_source_app_id       => l_comp.w_source_application_id
            ,p_old_source_type_code    => l_comp.w_source_type_code
            ,p_old_source_code         => l_comp.w_source_code
            ,p_new_source_app_id       => l_comp.s_source_application_id
            ,p_new_source_type_code    => l_comp.s_source_type_code
            ,p_new_source_code         => l_comp.s_source_code);
Line: 8197

    trace(p_msg    => 'END LOOP: updated header acct attrs',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 8229

    SELECT s.product_rule_type_code
         , s.product_rule_code
         , s.event_class_code
         , s.event_type_code
         , CASE WHEN w.event_type_code IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END                    merge_impact
         , s.accounting_required_flag  s_accounting_required_flag
         , w.accounting_required_flag  w_accounting_required_flag
         , s.description_type_code     s_description_type_code
         , w.description_type_code     w_description_type_code
         , s.description_code          s_description_code
         , w.description_code          w_description_code
      FROM xla_prod_acct_headers s
           JOIN xla_product_rules_b b
           ON  b.application_id         = g_application_id
           AND b.amb_context_code       = g_amb_context_code
           AND b.product_rule_type_code = s.product_rule_type_code
           AND b.product_rule_code      = s.product_rule_code
           LEFT OUTER JOIN xla_prod_acct_headers w
           ON  w.application_id         = g_application_id
           AND w.amb_context_code       = g_amb_context_code
           AND w.product_rule_type_code = s.product_rule_type_code
           AND w.product_rule_code      = s.product_rule_code
           AND w.event_class_code       = s.event_class_code
           AND w.event_type_code        = s.event_type_code
     WHERE s.application_id             = g_application_id
       AND s.amb_context_code           = g_staging_context_code
       AND (w.event_type_code                   IS NULL OR
            NVL(s.accounting_required_flag,C_CHAR) <> NVL(w.accounting_required_flag,C_CHAR) OR
            NVL(s.description_type_code,C_CHAR)    <> NVL(w.description_type_code,C_CHAR) OR
            NVL(s.description_code,C_CHAR)         <> NVL(w.description_code,C_CHAR));
Line: 8278

    trace(p_msg    => 'BEGIN LOOP: updated header assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 8286

      trace(p_msg    => 'LOOP: updated header assgn - '||
                        l_comp.product_rule_type_code||C_CHAR||
                        l_comp.product_rule_code||C_CHAR||
                        l_comp.event_class_code||C_CHAR||
                        l_comp.event_type_code||C_CHAR||
                        l_comp.merge_impact,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 8296

    record_updated_header_assgn
          (p_product_rule_type_code => l_comp.product_rule_type_code
          ,p_product_rule_code      => l_comp.product_rule_code
          ,p_event_class_code       => l_comp.event_class_code
          ,p_event_type_code        => l_comp.event_type_code
          ,p_merge_impact           => l_comp.merge_impact);
Line: 8303

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

      l_key := l_comp.product_rule_type_code||C_CHAR||
               l_comp.product_rule_code||C_CHAR||
               l_comp.event_class_code||C_CHAR||
               l_comp.event_type_code;
Line: 8311

        record_updated_property
          (p_component_type          => 'AMB_AAD_EVENT_TYPE'
          ,p_component_key           => l_key
          ,p_property                => 'ACCOUNTING_REQUIRED_FLAG'
          ,p_old_value               => l_comp.w_accounting_required_flag
          ,p_new_value               => l_comp.s_accounting_required_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 8329

            record_updated_component
              (p_parent_component_type => 'AMB_AAD_EVENT_TYPE'
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_DESCRIPTION'
              ,p_component_key         => l_key
              ,p_merge_impact          => C_MERGE_IMPACT_NEW
              ,p_component_owner_code  => l_comp.s_description_type_code
              ,p_component_code        => l_comp.s_description_code);
Line: 8345

            record_updated_component
              (p_parent_component_type => 'AMB_AAD_EVENT_TYPE'
              ,p_parent_component_key  => l_parent_key
              ,p_component_type        => 'AMB_DESCRIPTION'
              ,p_component_key         => l_key
              ,p_merge_impact          => C_MERGE_IMPACT_DELETED
              ,p_component_owner_code  => l_comp.w_description_type_code
              ,p_component_code        => l_comp.w_description_code);
Line: 8362

    trace(p_msg    => 'END LOOP: updated header assgns',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 8392

    SELECT bs.product_rule_type_code
         , bs.product_rule_code
         , CASE WHEN bw.application_id IS NULL
                THEN C_MERGE_IMPACT_NEW
                ELSE C_MERGE_IMPACT_UPDATED
                END                merge_impact
         , ts.name                 s_name
         , tw.name                 w_name
         , ts.description          s_description
         , tw.description          w_description
         , bs.transaction_coa_id   s_transaction_coa_id
         , bw.transaction_coa_id   w_transaction_coa_id
         , bs.accounting_coa_id    s_accounting_coa_id
         , bw.accounting_coa_id    w_accounting_coa_id
         , bs.enabled_flag         s_enabled_flag
         , bw.enabled_flag         w_enabled_flag
         , bs.locking_status_flag  s_locking_status_flag
         , bw.locking_status_flag  w_locking_status_flag
         , bs.product_rule_version s_product_rule_version
         , bw.product_rule_version w_product_rule_version
         , bs.version_num          s_version_num
         , bw.version_num          w_version_num
      FROM xla_product_rules_b bs
           JOIN xla_product_rules_tl ts
           ON  ts.application_id         = bs.application_id
           AND ts.amb_context_code       = bs.amb_context_code
           AND ts.product_rule_type_code = bs.product_rule_type_code
           AND ts.product_rule_code      = bs.product_rule_code
           AND ts.language               = USERENV('LANG')
           LEFT OUTER JOIN xla_product_rules_b bw
           ON  bw.application_id         = bs.application_id
           AND bw.amb_context_code       = g_amb_context_code
           AND bw.product_rule_type_code = bs.product_rule_type_code
           AND bw.product_rule_code      = bs.product_rule_code
           LEFT OUTER JOIN xla_product_rules_tl tw
           ON  tw.application_id         = bw.application_id
           AND tw.amb_context_code       = bw.amb_context_code
           AND tw.product_rule_type_code = bw.product_rule_type_code
           AND tw.product_rule_code      = bw.product_rule_code
           AND tw.language               = USERENV('LANG')
     WHERE bs.application_id    = g_application_id
       AND bs.amb_context_code  = g_staging_context_code
       AND (bw.application_id                  IS NULL                                 OR
            NVL(ts.name,C_CHAR)                <> NVL(tw.name, C_CHAR)                 OR
            NVL(ts.description,C_CHAR)         <> NVL(tw.description, C_CHAR)          OR
            NVL(bs.transaction_coa_id,C_NUM)   <> NVL(bw.transaction_coa_id, C_NUM)    OR
            NVL(bs.accounting_coa_id,C_NUM)    <> NVL(bw.accounting_coa_id, C_NUM)     OR
            NVL(bs.enabled_flag,C_CHAR)        <> NVL(bw.enabled_flag, C_CHAR)         OR
            NVL(bs.locking_status_flag,C_CHAR) <> NVL(bw.locking_status_flag, C_CHAR)  OR
            NVL(bs.product_rule_version,C_CHAR)<> NVL(bw.product_rule_version, C_CHAR) OR
            NVL(bs.version_num,C_NUM)          <> NVL(bw.version_num, C_NUM));
Line: 8458

    trace(p_msg    => 'BEGIN LOOP: updated aads',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 8469

      trace(p_msg    => 'LOOP: updated aad - '||l_key,
            p_module => l_log_module,
            p_level  => C_LEVEL_PROCEDURE);
Line: 8474

    record_updated_aad
          (p_product_rule_type_code => l_comp.product_rule_type_code
          ,p_product_rule_code      => l_comp.product_rule_code
          ,p_merge_impact           => l_comp.merge_impact);
Line: 8479

    IF (l_comp.merge_impact = C_MERGE_IMPACT_UPDATED) THEN

      IF (l_comp.s_name <> l_comp.w_name) THEN
        record_updated_property
          (p_component_type          => 'AMB_AAD'
          ,p_component_key           => l_key
          ,p_property                => 'NAME'
          ,p_old_value               => l_comp.w_name
          ,p_new_value               => l_comp.s_name);
Line: 8491

        record_updated_property
          (p_component_type          => 'AMB_AAD'
          ,p_component_key           => l_key
          ,p_property                => 'DESCRIPTION'
          ,p_old_value               => l_comp.w_description
          ,p_new_value               => l_comp.s_description);
Line: 8500

        record_updated_property
          (p_component_type          => 'AMB_AAD'
          ,p_component_key           => l_key
          ,p_property                => 'TRANSACTION_COA'
          ,p_old_value               => l_comp.w_transaction_coa_id
          ,p_new_value               => l_comp.s_transaction_coa_id);
Line: 8509

        record_updated_property
          (p_component_type          => 'AMB_AAD'
          ,p_component_key           => l_key
          ,p_property                => 'ACCOUNTING_COA'
          ,p_old_value               => l_comp.w_accounting_coa_id
          ,p_new_value               => l_comp.s_accounting_coa_id);
Line: 8518

        record_updated_property
          (p_component_type          => 'AMB_AAD'
          ,p_component_key           => l_key
          ,p_property                => 'ENABLED'
          ,p_old_value               => l_comp.w_enabled_flag
          ,p_new_value               => l_comp.s_enabled_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 8528

        record_updated_property
          (p_component_type          => 'AMB_AAD'
          ,p_component_key           => l_key
          ,p_property                => 'LOCKED'
          ,p_old_value               => l_comp.w_locking_status_flag
          ,p_new_value               => l_comp.s_locking_status_flag
          ,p_lookup_type             => 'XLA_YES_NO');
Line: 8538

        record_updated_property
          (p_component_type          => 'AMB_AAD'
          ,p_component_key           => l_key
          ,p_property                => 'PRODUCT_RULE_VERSION'
          ,p_old_value               => l_comp.w_product_rule_version
          ,p_new_value               => l_comp.s_product_rule_version);
Line: 8547

        record_updated_property
          (p_component_type          => 'AMB_AAD'
          ,p_component_key           => l_key
          ,p_property                => 'VERSION_NUM'
          ,p_old_value               => l_comp.w_version_num
          ,p_new_value               => l_comp.s_version_num);
Line: 8559

    trace(p_msg    => 'END LOOP: updated aads',
          p_module => l_log_module,
          p_level  => C_LEVEL_PROCEDURE);
Line: 8599

    analyze_deleted_oracle_comps;
Line: 8674

    SELECT product_rule_type_code
          ,product_rule_code
          ,decode(min(decode(amb_context_code,g_amb_context_code,1,2)),1,'Y','N') required_flag
      FROM xla_product_rules_b
     WHERE application_id   = g_application_id
       AND amb_context_code IN (g_amb_context_code,g_staging_context_code)
     GROUP BY product_rule_type_code, product_rule_code;
Line: 8685

  SELECT h.product_rule_type_code, h.product_rule_code
    FROM xla_prod_acct_headers h
   WHERE h.application_id      = g_application_id
     AND h.amb_context_code    IN (g_amb_context_code,g_staging_context_code)
     AND EXISTS (SELECT 1
                   FROM xla_prod_acct_headers pah
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE pah.application_id         = g_application_id
                    AND pah.amb_context_code       IN (g_amb_context_code,g_staging_context_code)
                    AND pah.description_type_code  = h.description_type_code
                    AND pah.description_code       = h.description_code
                    AND pah.product_rule_type_code = grp.product_rule_type_code
                    AND pah.product_rule_code      = grp.product_rule_code
                    AND grp.group_num              = l_curr_group_num
                  UNION
                 SELECT 1
                   FROM xla_aad_line_defn_assgns xal
                       ,xla_line_defn_jlt_assgns xjl
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE xjl.application_id             = g_application_id
                    AND xjl.amb_context_code           IN (g_amb_context_code,g_staging_context_code)
                    AND xjl.description_type_code      = h.description_type_code
                    AND xjl.description_code           = h.description_code
                    AND xal.application_id             = g_application_id
                    AND xal.amb_context_code           = xjl.amb_context_code
                    AND xal.product_rule_type_code     = grp.product_rule_type_code
                    AND xal.product_rule_code          = grp.product_rule_code
                    AND xal.event_class_code           = xjl.event_class_code
                    AND xal.event_type_code            = xjl.event_type_code
                    AND xal.line_definition_owner_code = xjl.line_definition_owner_code
                    AND xal.line_definition_code       = xjl.line_definition_code
                    AND grp.group_num                  = l_curr_group_num)
   UNION
  SELECT xal.product_rule_type_code, xal.product_rule_code
    FROM xla_line_defn_jlt_assgns h
        ,xla_aad_line_defn_assgns xal
   WHERE h.application_id             = xal.application_id
     AND h.amb_context_code           = xal.amb_context_code
     AND h.event_class_code           = xal.event_class_code
     AND h.event_type_code            = xal.event_type_code
     AND h.line_definition_owner_code = xal.line_definition_owner_code
     AND h.line_definition_code       = xal.line_definition_code
     AND h.application_id             = g_application_id
     AND h.amb_context_code           IN (g_amb_context_code,g_staging_context_code)
     AND EXISTS (SELECT 1
                   FROM xla_prod_acct_headers pah
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE pah.application_id         = g_application_id
                    AND pah.amb_context_code       IN (g_amb_context_code,g_staging_context_code)
                    AND pah.description_type_code  = h.description_type_code
                    AND pah.description_code       = h.description_code
                    AND pah.product_rule_type_code = grp.product_rule_type_code
                    AND pah.product_rule_code      = grp.product_rule_code
                    AND grp.group_num              = l_curr_group_num
                  UNION
                 SELECT 1
                   FROM xla_aad_line_defn_assgns xal
                       ,xla_line_defn_jlt_assgns xjl
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE xjl.application_id             = g_application_id
                    AND xjl.amb_context_code           IN (g_amb_context_code,g_staging_context_code)
                    AND xjl.description_type_code      = h.description_type_code
                    AND xjl.description_code           = h.description_code
                    AND xal.application_id             = xjl.application_id
                    AND xal.amb_context_code           = xjl.amb_context_code
                    AND xal.product_rule_type_code     = grp.product_rule_type_code
                    AND xal.product_rule_code          = grp.product_rule_code
                    AND xal.event_class_code           = xjl.event_class_code
                    AND xal.event_type_code            = xjl.event_type_code
                    AND xal.line_definition_owner_code = xjl.line_definition_owner_code
                    AND xal.line_definition_code       = xjl.line_definition_code
                    AND grp.group_num                  = l_curr_group_num)
  UNION
  SELECT xal.product_rule_type_code, xal.product_rule_code
    FROM xla_line_defn_jlt_assgns h
        ,xla_aad_line_defn_assgns xal
   WHERE h.application_id             = xal.application_id
     AND h.amb_context_code           = xal.amb_context_code
     AND h.event_class_code           = xal.event_class_code
     AND h.event_type_code            = xal.event_type_code
     AND h.line_definition_owner_code = xal.line_definition_owner_code
     AND h.line_definition_code       = xal.line_definition_code
     AND h.application_id             = g_application_id
     AND h.amb_context_code           IN (g_amb_context_code,g_staging_context_code)
     AND EXISTS (SELECT 1
                   FROM xla_aad_line_defn_assgns xad
                       ,xla_line_defn_jlt_assgns xjl
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE xjl.application_id             = g_application_id
                    AND xjl.amb_context_code           IN (g_amb_context_code,g_staging_context_code)
                    AND xjl.event_class_code           = h.event_class_code
                    AND xjl.accounting_line_type_code  = h.accounting_line_type_code
                    AND xjl.accounting_line_code       = h.accounting_line_code
                    AND xad.event_class_code           = xjl.event_class_code
                    AND xad.event_type_code            = xjl.event_type_code
                    AND xad.line_definition_owner_code = xjl.line_definition_owner_code
                    AND xad.line_definition_code       = xjl.line_definition_code
                    AND xad.application_id             = xjl.application_id
                    AND xad.amb_context_code           = xjl.amb_context_code
                    AND xad.product_rule_type_code     = grp.product_rule_type_code
                    AND xad.product_rule_code          = grp.product_rule_code
                    AND grp.group_num                  = l_curr_group_num)
  UNION
  SELECT h.product_rule_type_code, h.product_rule_code
    FROM xla_aad_header_ac_assgns h
   WHERE h.application_id      = g_application_id
     AND h.amb_context_code    IN (g_amb_context_code,g_staging_context_code)
     AND EXISTS (SELECT 1
                   FROM xla_aad_header_ac_assgns xah
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE xah.analytical_criterion_type_code = h.analytical_criterion_type_code
                    AND xah.analytical_criterion_code      = h.analytical_criterion_code
                    AND xah.application_id                 = g_application_id
                    AND xah.amb_context_code               IN (g_amb_context_code,g_staging_context_code)
                    AND xah.product_rule_type_code         = grp.product_rule_type_code
                    AND xah.product_rule_code              = grp.product_rule_code
                    AND grp.group_num                      = l_curr_group_num
                  UNION
                 SELECT 1
                   FROM xla_line_defn_ac_assgns  xac
                       ,xla_aad_line_defn_assgns xal
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE xac.analytical_criterion_type_code = h.analytical_criterion_type_code
                    AND xac.analytical_criterion_code      = h.analytical_criterion_code
                    AND xac.amb_context_code               IN (g_amb_context_code,g_staging_context_code)
                    AND xac.application_id                 = g_application_id
                    AND xac.event_class_code               = xal.event_class_code
                    AND xac.event_type_code                = xal.event_type_code
                    AND xac.line_definition_owner_code     = xal.line_definition_owner_code
                    AND xac.line_definition_code           = xal.line_definition_code
                    AND xal.application_id                 = xac.application_id
                    AND xal.amb_context_code               = xac.amb_context_code
                    AND xal.product_rule_type_code         = grp.product_rule_type_code
                    AND xal.product_rule_code              = grp.product_rule_code
                    AND grp.group_num                      = l_curr_group_num)
   UNION
  SELECT xad.product_rule_type_code, xad.product_rule_code
    FROM xla_line_defn_ac_assgns  h
        ,xla_aad_line_defn_assgns xad
   WHERE h.application_id             = xad.application_id
     AND h.amb_context_code           = xad.amb_context_code
     AND h.event_class_code           = xad.event_class_code
     AND h.event_type_code            = xad.event_type_code
     AND h.line_definition_owner_code = xad.line_definition_owner_code
     AND h.line_definition_code       = xad.line_definition_code
     AND xad.application_id           = g_application_id
     AND xad.amb_context_code         = g_amb_context_code
     AND EXISTS (SELECT 1
                   FROM xla_aad_header_ac_assgns xah
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE xah.analytical_criterion_type_code = h.analytical_criterion_type_code
                    AND xah.analytical_criterion_code      = h.analytical_criterion_code
                    AND xah.amb_context_code               IN (g_amb_context_code,g_staging_context_code)
                    AND xah.application_id                 = g_application_id
                    AND xah.product_rule_type_code         = grp.product_rule_type_code
                    AND xah.product_rule_code              = grp.product_rule_code
                    AND grp.group_num                      = l_curr_group_num
                  UNION
                 SELECT 1
                   FROM xla_line_defn_ac_assgns  xac
                       ,xla_aad_line_defn_assgns xal
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE xac.analytical_criterion_type_code = h.analytical_criterion_type_code
                    AND xac.analytical_criterion_code      = h.analytical_criterion_code
                    AND xac.amb_context_code               IN (g_amb_context_code,g_staging_context_code)
                    AND xac.application_id                 = g_application_id
                    AND xac.event_class_code               = xal.event_class_code
                    AND xac.event_type_code                = xal.event_type_code
                    AND xac.line_definition_owner_code     = xal.line_definition_owner_code
                    AND xac.line_definition_code           = xal.line_definition_code
                    AND xal.application_id                 = xac.application_id
                    AND xal.amb_context_code               = xac.amb_context_code
                    AND xal.product_rule_type_code         = grp.product_rule_type_code
                    AND xal.product_rule_code              = grp.product_rule_code
                    AND grp.group_num                      = l_curr_group_num)
  UNION
  SELECT xad.product_rule_type_code, xad.product_rule_code
    FROM xla_line_defn_adr_assgns h
        ,xla_aad_line_defn_assgns xad
   WHERE h.application_id             = xad.application_id
     AND h.amb_context_code           = xad.amb_context_code
     AND h.event_class_code           = xad.event_class_code
     AND h.event_type_code            = xad.event_type_code
     AND h.line_definition_owner_code = xad.line_definition_owner_code
     AND h.line_definition_code       = xad.line_definition_code
     AND h.application_id             = g_application_id
     AND h.amb_context_code           IN (g_amb_context_code,g_staging_context_code)
     AND EXISTS (SELECT 1
                   FROM xla_line_defn_adr_assgns xac
                       ,xla_aad_line_defn_assgns xal
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE xac.application_id             = g_application_id
                    AND xac.amb_context_code           IN (g_amb_context_code,g_staging_context_code)
                    AND xac.segment_rule_type_code     = h.segment_rule_type_code
                    AND xac.segment_rule_code          = h.segment_rule_code
                    AND xac.event_class_code           = xal.event_class_code
                    AND xac.event_type_code            = xal.event_type_code
                    AND xac.line_definition_owner_code = xal.line_definition_owner_code
                    AND xac.line_definition_code       = xal.line_definition_code
                    AND xal.application_id             = xac.application_id
                    AND xal.amb_context_code           = xac.amb_context_code
                    AND xal.product_rule_type_code     = grp.product_rule_type_code
                    AND xal.product_rule_code          = grp.product_rule_code
                    AND grp.group_num                  = l_curr_group_num)
  UNION
  SELECT xal.product_rule_type_code, xal.product_rule_code
    FROM xla_line_defn_adr_assgns adr
        ,xla_aad_line_defn_assgns xal
        ,xla_seg_rule_details     xsr
   WHERE xal.application_id             = adr.application_id
     AND xal.amb_context_code           = adr.amb_context_code
     AND xal.event_class_code           = adr.event_class_code
     AND xal.event_type_code            = adr.event_type_code
     AND xal.line_definition_owner_code = adr.line_definition_owner_code
     AND xal.line_definition_code       = adr.line_definition_code
     AND adr.application_id             = xsr.application_id
     AND adr.amb_context_code           = xsr.amb_context_code
     AND adr.segment_rule_type_code     = xsr.segment_rule_type_code
     AND adr.segment_rule_code          = xsr.segment_rule_code
     AND xsr.application_id             = g_application_id
     AND xsr.amb_context_code           IN (g_amb_context_code,g_staging_context_code)
     AND EXISTS (SELECT 1
                   FROM xla_line_defn_adr_assgns adr2
                       ,xla_aad_line_defn_assgns xal2
                       ,xla_seg_rule_details     xsr2
                       ,TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type)) grp
                  WHERE xsr2.value_mapping_set_code     = xsr.value_mapping_set_code
                    AND xsr2.application_id             = adr2.application_id
                    AND xsr2.amb_context_code           = adr2.amb_context_code
                    AND xsr2.segment_rule_type_code     = adr2.segment_rule_type_code
                    AND xsr2.segment_rule_code          = adr2.segment_rule_code
                    AND adr2.application_id             = xal2.application_id
                    AND adr2.amb_context_code           = xal2.amb_context_code
                    AND adr2.event_class_code           = xal2.event_class_code
                    AND adr2.event_type_code            = xal2.event_type_code
                    AND adr2.line_definition_owner_code = xal2.line_definition_owner_code
                    AND adr2.line_definition_code       = xal2.line_definition_code
                    AND xal2.application_id             = g_application_id
                    AND xal2.amb_context_code           IN (g_amb_context_code,g_staging_context_code)
                    AND xal2.product_rule_type_code     = grp.product_rule_type_code
                    AND xal2.product_rule_code          = grp.product_rule_code
                    AND grp.group_num                   = l_curr_group_num);
Line: 8930

    SELECT product_rule_type_code, product_rule_code
      FROM TABLE(CAST(g_aad_groups AS xla_aad_group_tbl_type))
     WHERE group_num = 0;
Line: 8935

  l_updated          BOOLEAN;
Line: 9015

      l_updated := FALSE;
Line: 9025

        IF (update_group_number(l_type_code
                               ,l_code
                               ,l_curr_group_num)) THEN
          l_updated := TRUE;
Line: 9032

      IF (NOT l_updated) THEN
        EXIT;
Line: 9043

    l_updated := update_group_number(l_type_code
                                    ,l_code
                                    ,l_curr_group_num);
Line: 9133

  INSERT INTO xla_amb_updated_comps
    (amb_updated_comp_id
    ,application_id
    ,amb_context_code
    ,component_type_code
    ,component_key
    ,parent_component_type_code
    ,parent_component_key
    ,merge_impact_code
    ,event_class_code
    ,event_type_code
    ,component_owner_code
    ,component_code
    ,parent_component_owner_code
    ,parent_component_code
    ,property_code
    ,old_value
    ,old_source_app_id
    ,old_source_type_code
    ,old_source_code
    ,new_value
    ,new_source_app_id
    ,new_source_type_code
    ,new_source_code
    ,lookup_type
    ,merge_enabled_flag
    ,object_version_number
    ,creation_date
    ,created_by
    ,last_update_date
    ,last_updated_by
    ,last_update_login
    ,program_update_date
    ,program_application_id
    ,program_id
    ,request_id)
    SELECT xla_amb_updated_comps_s.nextval
          ,g_application_id
          ,g_amb_context_code
          ,component_type
          ,component_key
          ,parent_component_type
          ,parent_component_key
          ,merge_impact
          ,event_class_code
          ,event_type_code
          ,component_owner_code
          ,component_code
          ,parent_component_owner_code
          ,parent_component_code
          ,property
          ,old_value
          ,old_source_app_id
          ,old_source_type_code
          ,old_source_code
          ,new_value
          ,new_source_app_id
          ,new_source_type_code
          ,new_source_code
          ,lookup_type
          ,'N'
          ,1
          ,sysdate
          ,xla_environment_pkg.g_usr_id
          ,sysdate
          ,xla_environment_pkg.g_usr_id
          ,xla_environment_pkg.g_login_id
          ,sysdate
          ,xla_environment_pkg.g_prog_appl_id
          ,xla_environment_pkg.g_prog_id
          ,xla_environment_pkg.g_req_Id
      FROM (SELECT component_type
                  ,component_key
                  ,parent_component_type
                  ,parent_component_key
                  ,merge_impact
                  ,event_class_code
                  ,event_type_code
                  ,component_owner_code
                  ,component_code
                  ,parent_component_owner_code
                  ,parent_component_code
                  ,NULL property
                  ,NULL old_value
                  ,NULL old_source_app_id
                  ,NULL old_source_type_code
                  ,NULL old_source_code
                  ,NULL new_value
                  ,NULL new_source_app_id
                  ,NULL new_source_type_code
                  ,NULL new_source_code
                  ,NULL lookup_type
              FROM TABLE(CAST(g_updated_comps AS xla_amb_updated_comp_tbl_type))
             UNION
            SELECT NULL
                  ,NULL
                  ,component_type
                  ,component_key
                  ,C_MERGE_IMPACT_UPDATED
                  ,NULL
                  ,NULL
                  ,NULL
                  ,NULL
                  ,NULL
                  ,NULL
                  ,property
                  ,old_value
                  ,old_source_app_id
                  ,old_source_type_code
                  ,old_source_code
                  ,new_value
                  ,new_source_app_id
                  ,new_source_type_code
                  ,new_source_code
                  ,lookup_type
              FROM TABLE(CAST(g_updated_props AS xla_amb_updated_prop_tbl_type)));
Line: 9251

    l_merge_impact := C_MERGE_IMPACT_UPDATED;
Line: 9256

  INSERT INTO xla_amb_updated_comps
      (amb_updated_comp_id
      ,application_id
      ,amb_context_code
      ,component_type_code
      ,component_key
      ,merge_impact_code
      ,merge_enabled_flag
      ,object_version_number
      ,creation_date
      ,created_by
      ,last_update_date
      ,last_updated_by
      ,last_update_login
      ,program_update_date
      ,program_application_id
      ,program_id
      ,request_id)
    SELECT xla_amb_updated_comps_s.nextval
          ,g_application_id
          ,g_amb_context_code
          ,'APPLICATION'
          ,TO_CHAR(g_application_id)
          ,l_merge_impact
          ,'N'
          ,1
          ,sysdate
          ,xla_environment_pkg.g_usr_id
          ,sysdate
          ,xla_environment_pkg.g_usr_id
          ,xla_environment_pkg.g_login_id
          ,sysdate
          ,xla_environment_pkg.g_prog_appl_id
          ,xla_environment_pkg.g_prog_id
          ,xla_environment_pkg.g_req_Id
      FROM DUAL;
Line: 9293

  UPDATE xla_appli_amb_contexts
     SET updated_flag       = 'N'
       , batch_name         = g_batch_name
       , last_analyzed_date = sysdate
       , last_update_date   = sysdate
       , last_updated_by    = xla_environment_pkg.g_usr_id
       , last_update_login  = xla_environment_pkg.g_login_id
   WHERE application_id     = g_application_id
     AND amb_context_code   = g_amb_context_code;
Line: 9465

  g_num_updated_comps    := 0;
Line: 9466

  g_num_updated_props    := 0;