DBA Data[Home] [Help]

APPS.GCS_PERIOD_INIT_DYN_BUILD_PKG SQL Statements

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

Line: 218

  PROCEDURE insert_entry_lines(
    p_run_name             VARCHAR2,
    p_hierarchy_id         NUMBER,
    p_entity_id            NUMBER,
    p_currency_code        VARCHAR2,
    p_bal_by_org           VARCHAR2,
    p_sec_track_col        VARCHAR2,
    p_is_elim_entity       VARCHAR2,
    p_cons_entity_id       NUMBER,
    p_re_template          GCS_TEMPLATES_PKG.TemplateRecord,
    p_cross_year_flag      VARCHAR2,
    p_category_code        VARCHAR2,
    p_init_entry_id        NUMBER,
    p_init_xlate_entry_id  NUMBER,
    p_init_stat_entry_id   NUMBER,
    p_recur_entry_id       NUMBER,
    p_recur_xlate_entry_id NUMBER,
    p_recur_stat_entry_id  NUMBER,
    --Bugfix 5449718: Added the calendar period year and net to re flag as parameters
    p_cal_period_year      NUMBER,
    p_net_to_re_flag       VARCHAR2)
  IS
    fn_name                VARCHAR2(30) := ''INSERT_ENTRY_LINES'';
Line: 285

        SELECT NVL(gcerd.entry_id, gcerd.stat_entry_id),
               geh.year_to_apply_re,
               geh.currency_code,
               ''N'',
               0
          BULK COLLECT INTO
               l_entry_id_list
          FROM gcs_cons_eng_run_dtls gcerd,
               gcs_entry_headers geh
         WHERE gcerd.run_name                   = p_run_name
           AND gcerd.consolidation_entity_id    = p_cons_entity_id
           AND gcerd.child_entity_id           IS NOT NULL
           AND gcerd.category_code              = p_category_code
           AND gcerd.entry_id                   = geh.entry_id
           AND geh.period_init_entry_flag       = ''N''
           AND p_cal_period_year                < NVL(geh.year_to_apply_re, p_cal_period_year+1);
Line: 302

        SELECT NVL(gcerd.entry_id, gcerd.stat_entry_id),
               geh.year_to_apply_re,
               geh.currency_code,
               ''N'',
               0
          BULK COLLECT INTO
               l_entry_id_list
          FROM gcs_cons_eng_run_dtls gcerd,
               gcs_entry_headers geh
         WHERE gcerd.run_name                   = p_run_name
           AND gcerd.consolidation_entity_id    = p_cons_entity_id
           AND gcerd.child_entity_id           IS NOT NULL
           AND gcerd.category_code              = p_category_code
           AND gcerd.entry_id                   = geh.entry_id
           AND geh.period_init_entry_flag       = ''N'';
Line: 318

        SELECT NVL(gcerd.entry_id, gcerd.stat_entry_id),
               geh.year_to_apply_re,
               geh.currency_code,
               geh.period_init_entry_flag,
               NVL(geh.end_cal_period_id, geh.start_cal_period_id) - geh.start_cal_period_id
          BULK COLLECT INTO
               l_entry_id_list
          FROM gcs_cons_eng_run_dtls gcerd,
               gcs_entry_headers geh
         WHERE gcerd.run_name                   = p_run_name
           AND gcerd.consolidation_entity_id    = p_cons_entity_id
           AND gcerd.child_entity_id           IS NOT NULL
           AND gcerd.category_code              = p_category_code
           AND gcerd.entry_id                   = geh.entry_id;
Line: 337

        SELECT NVL(gcerd.entry_id, gcerd.stat_entry_id),
               geh.year_to_apply_re,
               geh.currency_code,
               ''N'',
               0
          BULK COLLECT INTO
               l_entry_id_list
          FROM gcs_cons_eng_run_dtls gcerd,
               gcs_entry_headers geh
         WHERE gcerd.run_name                   = p_run_name
           AND gcerd.consolidation_entity_id    = p_cons_entity_id
           AND gcerd.child_entity_id            = p_entity_id
           AND gcerd.category_code              = p_category_code
           AND gcerd.entry_id                   = geh.entry_id
           AND geh.period_init_entry_flag       = ''N''
           AND p_cal_period_year                < NVL(geh.year_to_apply_re, p_cal_period_year+1);
Line: 354

        SELECT NVL(gcerd.entry_id, gcerd.stat_entry_id),
               geh.year_to_apply_re,
               geh.currency_code,
               ''N'',
               0
          BULK COLLECT INTO
               l_entry_id_list
          FROM gcs_cons_eng_run_dtls gcerd,
               gcs_entry_headers geh
         WHERE gcerd.run_name                   = p_run_name
           AND gcerd.consolidation_entity_id    = p_cons_entity_id
           AND gcerd.child_entity_id            = p_entity_id
           AND gcerd.category_code              = p_category_code
           AND gcerd.entry_id                   = geh.entry_id
           AND geh.period_init_entry_flag       = ''N'';
Line: 370

        SELECT NVL(gcerd.entry_id, gcerd.stat_entry_id),
               geh.year_to_apply_re,
               geh.currency_code,
               geh.period_init_entry_flag,
               NVL(geh.end_cal_period_id, geh.start_cal_period_id) - geh.start_cal_period_id
          BULK COLLECT INTO
               l_entry_id_list
          FROM gcs_cons_eng_run_dtls gcerd,
               gcs_entry_headers geh
         WHERE gcerd.run_name                   = p_run_name
           AND gcerd.consolidation_entity_id    = p_cons_entity_id
           AND gcerd.child_entity_id            = p_entity_id
           AND gcerd.category_code              = p_category_code
           AND gcerd.entry_id                   = geh.entry_id;
Line: 407

          l_entry_id_list.DELETE(i);
Line: 412

          l_entry_id_list.DELETE(i);
Line: 430

        l_entry_list.DELETE;
Line: 431

        l_currency_code_list.DELETE;
Line: 444

        INSERT INTO GCS_ENTRY_LINES_GT
       (entry_id,
        description,
        company_cost_center_org_id,
        intercompany_id,
        line_item_id,
';
Line: 471

      SELECT
        --Bugfix 5449718: Remove the references to the init_xlate_entry_id, and removed all group by calcs as this is happening on a line by line basis.
        --Also remove join to gcs_entry_headers as all of the information is available in the PL/SQL collection
        decode(l_currency_code_list(i), ''STAT'', p_init_stat_entry_id,
                                 p_init_entry_id),
        decode(feata.dim_attribute_varchar_member,
               ''REVENUE'', ''PROFIT_LOSS'',
               ''EXPENSE'', ''PROFIT_LOSS'',
               ''BALANCE_SHEET''),
        l2.company_cost_center_org_id,
        l2.intercompany_id,
        l2.line_item_id,
';
Line: 528

       l_entry_list.DELETE;
Line: 529

       l_currency_code_list.DELETE;
Line: 541

       INSERT INTO GCS_ENTRY_LINES_GT l1
       (entry_id,
        description,
        company_cost_center_org_id,
        intercompany_id,
        line_item_id,
';
Line: 568

      SELECT
        --Bugfix 5449718: Remove the references to the init_xlate_entry_id, and removed all group by calcs as this is happening on a line by line basis.
        --Also remove join to gcs_entry_headers as all of the information is available in the PL/SQL collection
        --Join to line type is no longer required as all rows for recurring entries have the line type code populated
        decode(l_currency_code_list(i), ''STAT'', p_init_stat_entry_id,
                                 p_init_entry_id),
        l2.line_type_code,
        l2.company_cost_center_org_id,
        l2.intercompany_id,
        l2.line_item_id,
';
Line: 623

      SELECT specific_intercompany_id
      INTO   l_intercompany_id
      FROM   GCS_CATEGORIES_B
      WHERE  category_code = ''INTRACOMPANY'';
Line: 630

        l_entry_list.DELETE;
Line: 631

        l_currency_code_list.DELETE;
Line: 643

        INSERT INTO GCS_ENTRY_LINES_GT l1
        (entry_id,
        description,
        company_cost_center_org_id,
        intercompany_id,
        line_item_id,
';
Line: 670

      SELECT
        --Bugfix 5449718: No longer need the target entries
        decode(l_currency_code_list(i), ''STAT'', p_init_stat_entry_id,
                                 p_init_entry_id),
        ''BALANCE_SHEET'',
';
Line: 749

      SELECT specific_intercompany_id
      INTO   l_intercompany_id
      FROM   GCS_CATEGORIES_B
      WHERE  category_code = ''INTRACOMPANY'';
Line: 754

      l_entry_list.DELETE;
Line: 755

      l_currency_code_list.DELETE;
Line: 769

        INSERT INTO GCS_ENTRY_LINES_GT l1
        (entry_id,
        description,
        company_cost_center_org_id,
        intercompany_id,
        line_item_id,
';
Line: 796

      SELECT
        --Bugfix 5449718: No longer need the target entries
        decode(l_currency_code_list(i), ''STAT'', p_recur_stat_entry_id,
                                 p_recur_entry_id),
        ''BALANCE_SHEET'',
';
Line: 865

      l_entry_list.DELETE;
Line: 866

      l_currency_code_list.DELETE;
Line: 880

        INSERT INTO GCS_ENTRY_LINES_GT l1
        (entry_id,
        description,
        company_cost_center_org_id,
        intercompany_id,
        line_item_id,
';
Line: 907

      SELECT
        --Bugfix 5449718: No longer need the target entries
        decode(l_currency_code_list(i), ''STAT'', p_recur_stat_entry_id,
                                 p_recur_entry_id),
        ''BALANCE_SHEET'',
        l2.company_cost_center_org_id,
        l2.intercompany_id,
        l2.line_item_id,
';
Line: 965

    INSERT INTO gcs_entry_lines
    (entry_id,
     line_type_code,
     company_cost_center_org_id,
     intercompany_id,
     line_item_id,
';
Line: 995

      last_update_date,
      last_updated_by,
      last_update_login)
    SELECT
      entry_id,
      MIN(description),
      company_cost_center_org_id,
      intercompany_id,
      line_item_id,
';
Line: 1056

                     ''Inserted '' || to_char(SQL%ROWCOUNT) || '' row(s)'');
Line: 1083

  END insert_entry_lines;