DBA Data[Home] [Help]

APPS.GCS_TRANS_RE_DYN_BUILD_PKG SQL Statements

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

Line: 247

    ''UPDATE gcs_historical_rates ghr'' || g_nl ||
    ''SET    (translated_rate, translated_amount, rate_type_code, '' ||
    ''last_update_date, last_updated_by, last_update_login) ='' || g_nl ||
    ''       (SELECT ghr1.translated_rate, ghr1.translated_amount, ''''P'''', '' ||
    ''sysdate, '' || gcs_translation_pkg.g_fnd_user_id || '', '' ||
    gcs_translation_pkg.g_fnd_login_id || g_nl ||
    ''        FROM   gcs_historical_rates ghr1'' || g_nl ||
    ''        WHERE  ghr1.entity_id = ghr.entity_id'' || g_nl ||
    ''        AND    ghr1.hierarchy_id = ghr.hierarchy_id'' || g_nl ||
    ''        AND    ghr1.from_currency = ghr.from_currency'' || g_nl ||
    ''        AND    ghr1.to_currency = ghr.to_currency'' || g_nl ||
    ''        AND    ghr1.line_item_id = ghr.line_item_id'' || g_nl ||
    ''        AND    ghr1.standard_re_rate_flag = ''''Y'''' '' || g_nl ||
    ''        AND    ghr1.line_item_id =  p_hier_li_id '' || g_nl ||';
Line: 277

    ''        SELECT ghr3.rowid'' || g_nl ||
    ''        FROM   GCS_HISTORICAL_RATES ghr2, '' || g_nl ||
    ''               GCS_HISTORICAL_RATES ghr3'' || g_nl ||
    ''        WHERE  ghr2.entity_id = '' || p_entity_id || g_nl ||
    ''        AND    ghr2.hierarchy_id = '' || p_hierarchy_id || g_nl ||
    ''        AND    ghr2.from_currency = '''''' || p_from_ccy || '''''''' || g_nl ||
    ''        AND    ghr2.to_currency = '''''' || p_to_ccy || '''''''' || g_nl ||
    ''        AND    ghr2.rate_type_code in (''''H'''',''''P'''',''''C'''')'' || g_nl ||
    ''        AND    ghr2.account_type_code IN (''''ASSET'''',''''LIABILITY'''',decode('''''' || p_eq_xlate_mode || '''''', ''''YTD'''', ''''EQUITY'''', NULL))'' || g_nl ||
    ''        AND    ghr2.stop_rollforward_flag = ''''N'''''' || g_nl ||
    ''        AND    ghr3.entity_id = ghr2.entity_id'' || g_nl ||
    ''        AND    ghr3.hierarchy_id = ghr2.hierarchy_id'' || g_nl ||
    ''        AND    ghr2.cal_period_id = '' || p_prev_period_id || g_nl ||
    ''        AND    ghr3.cal_period_id = '' || p_cal_period_id || g_nl ||
    ''        AND    ghr3.line_item_id = ghr2.line_item_id'' || g_nl ||
    ''        AND    ghr3.standard_re_rate_flag = ''''Y'''' '' || g_nl ||
    ''        AND    ghr3.line_item_id = p_hier_li_id'' || g_nl ||';
Line: 324

        UPDATE   gcs_historical_rates ghr
        SET      (translated_rate, translated_amount, rate_type_code,
                  last_update_date, last_updated_by, last_update_login) =
        (SELECT ghr1.translated_rate, ghr1.translated_amount, ''P'', sysdate,
                gcs_translation_pkg.g_fnd_user_id, gcs_translation_pkg.g_fnd_login_id
         FROM   gcs_historical_rates ghr1
         WHERE  ghr1.entity_id = ghr.entity_id
         AND    ghr1.hierarchy_id = ghr.hierarchy_id
         AND    ghr1.from_currency = ghr.from_currency
         AND    ghr1.to_currency = ghr.to_currency
         AND    ghr1.line_item_id = ghr.line_item_id
         AND    ghr1.standard_re_rate_flag = ''Y''
         AND    ghr1.line_item_id = p_hier_li_id';
Line: 353

         SELECT ghr3.rowid
         FROM   GCS_HISTORICAL_RATES ghr2,
                GCS_HISTORICAL_RATES ghr3
         WHERE  ghr2.entity_id = p_entity_id
         AND    ghr2.hierarchy_id = p_hierarchy_id
         AND    ghr2.from_currency = p_from_ccy
         AND    ghr2.to_currency = p_to_ccy
         AND    ghr2.rate_type_code in (''H'',''P'',''C'')
         AND    ghr2.account_type_code IN (''ASSET'',''LIABILITY'',decode(p_eq_xlate_mode, ''YTD'', ''EQUITY'', NULL))
         AND    ghr2.stop_rollforward_flag = ''N''
         AND    ghr3.entity_id = ghr2.entity_id
         AND    ghr3.hierarchy_id = ghr2.hierarchy_id
         AND    ghr2.cal_period_id = p_prev_period_id
         AND    ghr3.cal_period_id = p_cal_period_id
         AND    ghr3.line_item_id = ghr2.line_item_id
         ANd    ghr3.standard_re_rate_flag = ''Y''
         AND    ghr3.line_item_id = p_hier_li_id';
Line: 394

    ''DELETE FROM gcs_historical_rates ghr'' || g_nl ||
    ''WHERE  (rowid, ''''E'''') IN ('' || g_nl ||
    ''        SELECT ghr3.rowid, nvl(ghr2.rate_type_code, ''''E'''')'' || g_nl ||
    ''        FROM   GCS_HISTORICAL_RATES ghr3, '' || g_nl ||
    ''               GCS_HISTORICAL_RATES ghr2'' || g_nl ||
    ''        WHERE  ghr3.entity_id = '' || p_entity_id || g_nl ||
    ''        AND    ghr3.hierarchy_id = '' || p_hierarchy_id || g_nl ||
    ''        AND    ghr3.rate_type_code = ''''P'''''' || g_nl ||
    ''        AND    ghr3.account_type_code IN (''''ASSET'''',''''LIABILITY'''',decode('''''' || p_eq_xlate_mode || '''''', ''''YTD'''', ''''EQUITY'''', NULL))'' || g_nl ||
    ''        AND    ghr3.cal_period_id = '' || p_cal_period_id || g_nl ||
    ''        AND    ghr3.from_currency = '''''' || p_from_ccy || '''''''' || g_nl ||
    ''        AND    ghr3.to_currency = '''''' || p_to_ccy || '''''''' || g_nl ||
    ''        AND    ghr2.cal_period_id (+)= '' || p_prev_period_id || g_nl ||
    ''        AND    ghr2.entity_id (+)= '' || p_entity_id || g_nl ||
    ''        AND    ghr2.hierarchy_id (+)= '' || p_hierarchy_id || g_nl ||
    ''        AND    ghr2.from_currency (+)= '''''' || p_from_ccy || '''''''' || g_nl ||
    ''        AND    ghr2.to_currency (+)= '''''' || p_to_ccy || '''''''' || g_nl ||
    ''        AND    ghr2.stop_rollforward_flag (+)= ''''N'''''' || g_nl ||
    ''        AND    ghr2.line_item_id (+)= ghr3.line_item_id'' || g_nl ||
    ''        AND    ghr3.standard_re_rate_flag = ''''Y'''' '' || g_nl ||
    ''        AND    ghr3.line_item_id =  p_hier_li_id '' || g_nl ||';
Line: 436

        DELETE FROM gcs_historical_rates ghr
        WHERE (rowid, ''E'') IN (
               SELECT ghr3.rowid, nvl(ghr2.rate_type_code, ''E'')
               FROM   GCS_HISTORICAL_RATES ghr3,
                      GCS_HISTORICAL_RATES ghr2
               WHERE  ghr3.entity_id = p_entity_id
               AND    ghr3.hierarchy_id = p_hierarchy_id
               AND    ghr3.rate_type_code = ''P''
               AND    ghr3.account_type_code IN (''ASSET'',''LIABILITY'',decode(p_eq_xlate_mode, ''YTD'', ''EQUITY'', NULL))
               AND    ghr3.cal_period_id = p_cal_period_id
               AND    ghr3.from_currency = p_from_ccy
               AND    ghr3.to_currency = p_to_ccy
               AND    ghr2.cal_period_id (+)= p_prev_period_id
               AND    ghr2.entity_id (+)= p_entity_id
               AND    ghr2.hierarchy_id (+)= p_hierarchy_id
               AND    ghr2.from_currency (+)= p_from_ccy
               AND    ghr2.to_currency (+)= p_to_ccy
               AND    ghr2.stop_rollforward_flag (+)= ''N''
               AND    ghr2.line_item_id (+)= ghr3.line_item_id
               AND    ghr3.standard_re_rate_flag = ''Y''
               AND    ghr3.line_item_id = p_hier_li_id';
Line: 474

    ''INSERT /*+ parallel (gcs_historical_rates) */ INTO gcs_historical_rates(standard_re_rate_flag, entity_id, hierarchy_id, '' ||
    ''cal_period_id, from_currency, to_currency, line_item_id, '' ||
    ''company_cost_center_org_id, intercompany_id, financial_elem_id, '' ||
    ''product_id, natural_account_id, channel_id, project_id, customer_id, task_id, '' ||
    ''user_dim1_id, user_dim2_id, user_dim3_id, user_dim4_id, user_dim5_id, '' ||
    ''user_dim6_id, user_dim7_id, user_dim8_id, user_dim9_id, user_dim10_id, '' ||
    ''translated_rate, translated_amount, rate_type_code, update_flag, '' ||
    ''account_type_code, stop_rollforward_flag, last_update_date, last_updated_by, '' ||
    ''last_update_login, creation_date, created_by)'' || g_nl ||
    ''SELECT '' || g_nl ||
    '' ''''Y'''', ghr.entity_id, ghr.hierarchy_id, '' || p_cal_period_id || '', ''||
    ''ghr.from_currency, ghr.to_currency, ghr.line_item_id, '' ||';
Line: 515

    ''           SELECT 1 FROM gcs_historical_rates ghr1'' || g_nl ||
    ''           WHERE ghr1.entity_id  = p_entity_id'' || g_nl ||
    ''    AND    ghr1.hierarchy_id = p_hierarchy_id'' || g_nl ||
    ''    AND    ghr1.cal_period_id = p_cal_period_id'' || g_nl ||
    ''    AND    ghr1.line_item_id = ghr.line_item_id'' || g_nl ||';
Line: 533

   '''    AND    ghr1.update_flag = ''''N'''''' || g_nl ||
    ''    AND    ghr1.from_currency = ghr.from_currency'' || g_nl ||
    ''    AND    ghr1.to_currency = ghr.to_currency);'' || g_nl );
Line: 542

        INSERT /*+ parallel (gcs_historical_rates) */ INTO gcs_historical_rates(
          standard_re_rate_flag, entity_id, hierarchy_id, cal_period_id, from_currency,
          to_currency, line_item_id, company_cost_center_org_id, intercompany_id,
          financial_elem_id, product_id, natural_account_id,
          channel_id, project_id, customer_id, task_id, user_dim1_id, user_dim2_id,
          user_dim3_id, user_dim4_id, user_dim5_id, user_dim6_id, user_dim7_id,
          user_dim8_id, user_dim9_id, user_dim10_id, translated_rate,
          translated_amount, rate_type_code, update_flag, account_type_code,
          stop_rollforward_flag, last_update_date, last_updated_by,
          last_update_login, creation_date, created_by)
        SELECT
          ''Y'', ghr.entity_id, ghr.hierarchy_id,
          p_cal_period_id, ghr.from_currency, ghr.to_currency,
          ghr.line_item_id,';
Line: 586

               SELECT 1 FROM gcs_historical_rates ghr1
               WHERE ghr1.entity_id  = p_entity_id
        AND    ghr1.hierarchy_id = p_hierarchy_id
        AND    ghr1.cal_period_id = p_cal_period_id
        AND    ghr1.line_item_id = ghr.line_item_id';
Line: 604

   '    AND    ghr1.update_flag = ''N''
        AND    ghr1.from_currency = ghr.from_currency
        AND    ghr1.to_currency = ghr.to_currency);
Line: 661

    ''INSERT /*+ parallel (GCS_TRANSLATION_GT) */ INTO GCS_TRANSLATION_GT(translate_rule_code, account_type_code, '' ||
    ''line_item_id, company_cost_center_org_id, intercompany_id, financial_elem_id, '' ||
    ''product_id, natural_account_id, channel_id, '' ||
    ''project_id, customer_id, task_id, user_dim1_id, user_dim2_id, user_dim3_id, '' ||
    ''user_dim4_id, user_dim5_id, user_dim6_id, user_dim7_id, user_dim8_id, '' ||
    ''user_dim9_id, user_dim10_id, t_amount_dr, t_amount_cr, begin_ytd_dr, '' ||
    ''begin_ytd_cr, xlate_ptd_dr, xlate_ptd_cr, xlate_ytd_dr, xlate_ytd_cr)'' || g_nl ||
    ''SELECT'' || g_nl ||
    ''decode(fxata.dim_attribute_varchar_member,'' || g_nl ||
    ''       ''''REVENUE'''', '''''' || p_is_xlate_mode || '''''','' || g_nl ||
    ''       ''''EXPENSE'''', '''''' || p_is_xlate_mode || '''''','' || g_nl ||
    ''       ''''EQUITY'''', '''''' || p_eq_xlate_mode || '''''','' || g_nl ||
    ''            ''''YTD''''),'' || g_nl ||
    ''fxata.dim_attribute_varchar_member, fb.line_item_id, '' ||';
Line: 729

    ''FROM   (SELECT'' || g_nl ||
    ''          fb_in.line_item_id,'' || g_nl ||';
Line: 784

    ''AND    ghr.update_flag  = ''''N'''' '' || g_nl ||
    ''AND    ghr.standard_re_rate_flag = ''''Y'''' '' || g_nl ||
    ''AND    fb.line_item_id =  p_hier_li_id '' || g_nl ||';
Line: 803

          INSERT /*+ parallel (GCS_TRANSLATION_GT) */ INTO GCS_TRANSLATION_GT(
            translate_rule_code, account_type_code, line_item_id,
            company_cost_center_org_id, intercompany_id, financial_elem_id,
            product_id, natural_account_id, channel_id, project_id,
            customer_id, task_id, user_dim1_id, user_dim2_id, user_dim3_id,
            user_dim4_id, user_dim5_id, user_dim6_id, user_dim7_id, user_dim8_id,
            user_dim9_id, user_dim10_id, t_amount_dr, t_amount_cr, begin_ytd_dr,
            begin_ytd_cr, xlate_ptd_dr, xlate_ptd_cr, xlate_ytd_dr, xlate_ytd_cr)
          SELECT /*+ ordered */
            decode(fxata.dim_attribute_varchar_member,
                   ''REVENUE'', p_is_xlate_mode,
                   ''EXPENSE'', p_is_xlate_mode,
                   ''EQUITY'', p_eq_xlate_mode,
                        ''YTD''),
            fxata.dim_attribute_varchar_member, fb.line_item_id,';
Line: 872

          FROM   (SELECT
                    fb_in.line_item_id,';
Line: 927

          AND    ghr.update_flag  = ''N''
          AND    fb.line_item_id = p_hier_li_id
          AND    ghr.standard_re_rate_flag = ''Y'' ';
Line: 948

    ''INSERT /*+ parallel (GCS_TRANSLATION_GT) */ INTO GCS_TRANSLATION_GT(translate_rule_code, account_type_code, '' ||
    ''line_item_id, company_cost_center_org_id, intercompany_id, financial_elem_id, '' ||
    ''product_id, natural_account_id, channel_id, '' ||
    ''project_id, customer_id, task_id, user_dim1_id, user_dim2_id, user_dim3_id, '' ||
    ''user_dim4_id, user_dim5_id, user_dim6_id, user_dim7_id, user_dim8_id, '' ||
    ''user_dim9_id, user_dim10_id, t_amount_dr, t_amount_cr, begin_ytd_dr, '' ||
    ''begin_ytd_cr, xlate_ptd_dr, xlate_ptd_cr, xlate_ytd_dr, xlate_ytd_cr)'' || g_nl ||
    ''SELECT'' || g_nl ||
    ''decode(fxata.dim_attribute_varchar_member,'' || g_nl ||
    ''       ''''REVENUE'''', '''''' || p_is_xlate_mode || '''''','' || g_nl ||
    ''       ''''EXPENSE'''', '''''' || p_is_xlate_mode || '''''','' || g_nl ||
    ''       ''''EQUITY'''', '''''' || p_eq_xlate_mode || '''''','' || g_nl ||
    ''            ''''YTD''''),'' || g_nl ||
    ''fxata.dim_attribute_varchar_member, fb.line_item_id, '' ||';
Line: 1016

    ''FROM   (SELECT'' || g_nl ||
    ''          fb_in.line_item_id,'' || g_nl ||';
Line: 1056

    ''AND    ghr.update_flag  = ''''N'''' '' || g_nl ||
    ''AND    ghr.standard_re_rate_flag = ''''Y'''' '' || g_nl ||
    ''AND    fb.line_item_id = p_hier_li_id '' || g_nl ||';
Line: 1075

          INSERT /*+ parallel (GCS_TRANSLATION_GT) */ INTO GCS_TRANSLATION_GT(
            translate_rule_code, account_type_code, line_item_id,
            company_cost_center_org_id, intercompany_id, financial_elem_id,
            product_id, natural_account_id, channel_id, project_id,
            customer_id, task_id, user_dim1_id, user_dim2_id, user_dim3_id,
            user_dim4_id, user_dim5_id, user_dim6_id, user_dim7_id, user_dim8_id,
            user_dim9_id, user_dim10_id, t_amount_dr, t_amount_cr, begin_ytd_dr,
            begin_ytd_cr, xlate_ptd_dr, xlate_ptd_cr, xlate_ytd_dr, xlate_ytd_cr)
          SELECT /*+ ordered */
            decode(fxata.dim_attribute_varchar_member,
                   ''REVENUE'', p_is_xlate_mode,
                   ''EXPENSE'', p_is_xlate_mode,
                   ''EQUITY'', p_eq_xlate_mode,
                        ''YTD''),
            fxata.dim_attribute_varchar_member, fb.line_item_id,';
Line: 1144

          FROM   (SELECT
                    fb_in.line_item_id,';
Line: 1184

          AND    ghr.update_flag  = ''N''
          AND    ghr.standard_re_rate_flag = ''Y''
          AND    fb.line_item_id = p_hier_li_id';
Line: 1255

        SELECT cb.associated_object_id
        FROM   gcs_categories_b cb
        WHERE  cb.category_code = ''TRANSLATION'';
Line: 1281

    ''INSERT  /*+ parallel (GCS_TRANSLATION_GT) */ INTO GCS_TRANSLATION_GT(translate_rule_code, account_type_code, '' ||
    ''line_item_id, company_cost_center_org_id, '' ||
    ''intercompany_id, financial_elem_id, product_id, '' ||
    ''natural_account_id, channel_id, project_id, customer_id, task_id, '' ||
    ''user_dim1_id, user_dim2_id, user_dim3_id, user_dim4_id, user_dim5_id, '' ||
    ''user_dim6_id, user_dim7_id, user_dim8_id, user_dim9_id, user_dim10_id, '' ||
    ''t_amount_dr, t_amount_cr, begin_ytd_dr, begin_ytd_cr, xlate_ptd_dr, '' ||
    ''xlate_ptd_cr, xlate_ytd_dr,xlate_ytd_cr)'' || g_nl ||
    ''SELECT'' || g_nl ||
    ''decode(fxata.dim_attribute_varchar_member,'' || g_nl ||
    ''       ''''REVENUE'''', '''''' || p_is_xlate_mode || '''''','' || g_nl ||
    ''       ''''EXPENSE'''', '''''' || p_is_xlate_mode || '''''','' || g_nl ||
    ''       ''''EQUITY'''', '''''' || p_eq_xlate_mode || '''''','' || g_nl ||
    ''            ''''YTD''''),'' || g_nl ||
    ''fxata.dim_attribute_varchar_member, fb.line_item_id, '' ||';
Line: 1354

    ''FROM   (SELECT'' || g_nl ||
    ''          fb_in.line_item_id,'' || g_nl ||';
Line: 1435

    ''AND    ghr.update_flag = ''''N'''''' || g_nl ||';
Line: 1451

          INSERT /*+ parallel (GCS_TRANSLATION_GT) */ INTO GCS_TRANSLATION_GT(
            translate_rule_code, account_type_code, line_item_id,
            company_cost_center_org_id, intercompany_id, financial_elem_id,
            product_id, natural_account_id, channel_id, project_id,
            customer_id, task_id, user_dim1_id, user_dim2_id, user_dim3_id,
            user_dim4_id, user_dim5_id, user_dim6_id, user_dim7_id, user_dim8_id,
            user_dim9_id, user_dim10_id, t_amount_dr, t_amount_cr, begin_ytd_dr,
            begin_ytd_cr, xlate_ptd_dr, xlate_ptd_cr, xlate_ytd_dr,xlate_ytd_cr)
          SELECT
            decode(fxata.dim_attribute_varchar_member,
                   ''REVENUE'', p_is_xlate_mode,
                   ''EXPENSE'', p_is_xlate_mode,
                   ''EQUITY'', p_eq_xlate_mode,
                        ''YTD''),
            fxata.dim_attribute_varchar_member, fb.line_item_id,';
Line: 1523

          FROM   (SELECT
                    fb_in.line_item_id,';
Line: 1604

          AND    ghr.update_flag = ''N''';
Line: 1622

    ''INSERT  /*+ parallel (GCS_TRANSLATION_GT) */ INTO GCS_TRANSLATION_GT(translate_rule_code, account_type_code, '' ||
    ''line_item_id, company_cost_center_org_id, '' ||
    ''intercompany_id, financial_elem_id, product_id, '' ||
    ''natural_account_id, channel_id, project_id, customer_id, task_id, '' ||
    ''user_dim1_id, user_dim2_id, user_dim3_id, user_dim4_id, user_dim5_id, '' ||
    ''user_dim6_id, user_dim7_id, user_dim8_id, user_dim9_id, user_dim10_id, '' ||
    ''t_amount_dr, t_amount_cr, begin_ytd_dr, begin_ytd_cr, xlate_ptd_dr, '' ||
    ''xlate_ptd_cr, xlate_ytd_dr,xlate_ytd_cr)'' || g_nl ||
    ''SELECT'' || g_nl ||
    ''decode(fxata.dim_attribute_varchar_member,'' || g_nl ||
    ''       ''''REVENUE'''', '''''' || p_is_xlate_mode || '''''','' || g_nl ||
    ''       ''''EXPENSE'''', '''''' || p_is_xlate_mode || '''''','' || g_nl ||
    ''       ''''EQUITY'''', '''''' || p_eq_xlate_mode || '''''','' || g_nl ||
    ''            ''''YTD''''),'' || g_nl ||
    ''fxata.dim_attribute_varchar_member, fb.line_item_id, '' ||';
Line: 1695

    ''FROM   (SELECT'' || g_nl ||
    ''          fb_in.line_item_id,'' || g_nl ||';
Line: 1761

    ''AND    ghr.update_flag = ''''N'''''' || g_nl ||';
Line: 1778

          INSERT /*+ parallel (GCS_TRANSLATION_GT) */ INTO GCS_TRANSLATION_GT(
            translate_rule_code, account_type_code, line_item_id,
            company_cost_center_org_id, intercompany_id, financial_elem_id,
            product_id, natural_account_id, channel_id, project_id,
            customer_id, task_id, user_dim1_id, user_dim2_id, user_dim3_id,
            user_dim4_id, user_dim5_id, user_dim6_id, user_dim7_id, user_dim8_id,
            user_dim9_id, user_dim10_id, t_amount_dr, t_amount_cr, begin_ytd_dr,
            begin_ytd_cr, xlate_ptd_dr, xlate_ptd_cr, xlate_ytd_dr,xlate_ytd_cr)
          SELECT
            decode(fxata.dim_attribute_varchar_member,
                   ''REVENUE'', p_is_xlate_mode,
                   ''EXPENSE'', p_is_xlate_mode,
                   ''EQUITY'', p_eq_xlate_mode,
                        ''YTD''),
            fxata.dim_attribute_varchar_member, fb.line_item_id,';
Line: 1850

          FROM   (SELECT
                    fb_in.line_item_id,';
Line: 1916

          AND    ghr.update_flag = ''N''';