16: l_sec_currency_code VARCHAR2(15);
17: BEGIN
18:
19: -- Setting Up the global_rate_type and the global_start_date
20: l_prim_rate_type := bis_common_parameters.get_rate_type;
21: l_prim_currency_code := bis_common_parameters.get_currency_code;
22: l_sec_rate_type := bis_common_parameters.get_secondary_rate_type;
23: l_sec_currency_code := bis_common_parameters.get_secondary_currency_code;
24:
17: BEGIN
18:
19: -- Setting Up the global_rate_type and the global_start_date
20: l_prim_rate_type := bis_common_parameters.get_rate_type;
21: l_prim_currency_code := bis_common_parameters.get_currency_code;
22: l_sec_rate_type := bis_common_parameters.get_secondary_rate_type;
23: l_sec_currency_code := bis_common_parameters.get_secondary_currency_code;
24:
25: IF (p_refresh_flag = 'INITIAL')
18:
19: -- Setting Up the global_rate_type and the global_start_date
20: l_prim_rate_type := bis_common_parameters.get_rate_type;
21: l_prim_currency_code := bis_common_parameters.get_currency_code;
22: l_sec_rate_type := bis_common_parameters.get_secondary_rate_type;
23: l_sec_currency_code := bis_common_parameters.get_secondary_currency_code;
24:
25: IF (p_refresh_flag = 'INITIAL')
26: THEN
19: -- Setting Up the global_rate_type and the global_start_date
20: l_prim_rate_type := bis_common_parameters.get_rate_type;
21: l_prim_currency_code := bis_common_parameters.get_currency_code;
22: l_sec_rate_type := bis_common_parameters.get_secondary_rate_type;
23: l_sec_currency_code := bis_common_parameters.get_secondary_currency_code;
24:
25: IF (p_refresh_flag = 'INITIAL')
26: THEN
27: INSERT INTO eni_currency_conv_rates_stg
102: execute immediate 'TRUNCATE TABLE '||g_eni_schema||'.eni_dbi_item_cost_f';
103: execute immediate 'TRUNCATE TABLE '||g_eni_schema||'.eni_dbi_item_cost_stg';
104: execute immediate 'TRUNCATE TABLE '||g_eni_schema||'.eni_currency_conv_rates_stg';
105:
106: l_start_date := trunc (bis_common_parameters.get_global_start_date);
107: l_end_date := trunc (SYSDATE);
108: /** COMMENTING these parameter values
109: Bug: 4956685 Initial load should pick all records from global start date to sysdate
110: l_start_date := trunc(TO_DATE(p_start_date, 'YYYY/MM/DD HH24:MI:SS'));
432:
433: l_stmt_num := 20; /* call api to get get_global_rate_primary */
434:
435: -- Setting Up the global_rate_type and the global_start_date
436: l_prim_rate_type := bis_common_parameters.get_rate_type;
437: l_stmt_num := 21;
438: l_prim_currency_code := bis_common_parameters.get_currency_code;
439: l_stmt_num := 22;
440: l_sec_rate_type := bis_common_parameters.get_secondary_rate_type;
434:
435: -- Setting Up the global_rate_type and the global_start_date
436: l_prim_rate_type := bis_common_parameters.get_rate_type;
437: l_stmt_num := 21;
438: l_prim_currency_code := bis_common_parameters.get_currency_code;
439: l_stmt_num := 22;
440: l_sec_rate_type := bis_common_parameters.get_secondary_rate_type;
441: l_stmt_num := 23;
442: l_sec_currency_code := bis_common_parameters.get_secondary_currency_code;
436: l_prim_rate_type := bis_common_parameters.get_rate_type;
437: l_stmt_num := 21;
438: l_prim_currency_code := bis_common_parameters.get_currency_code;
439: l_stmt_num := 22;
440: l_sec_rate_type := bis_common_parameters.get_secondary_rate_type;
441: l_stmt_num := 23;
442: l_sec_currency_code := bis_common_parameters.get_secondary_currency_code;
443: l_stmt_num:=24;
444: l_start_date := bis_common_parameters.get_global_start_date;
438: l_prim_currency_code := bis_common_parameters.get_currency_code;
439: l_stmt_num := 22;
440: l_sec_rate_type := bis_common_parameters.get_secondary_rate_type;
441: l_stmt_num := 23;
442: l_sec_currency_code := bis_common_parameters.get_secondary_currency_code;
443: l_stmt_num:=24;
444: l_start_date := bis_common_parameters.get_global_start_date;
445:
446: -- If no global currency code was defined
440: l_sec_rate_type := bis_common_parameters.get_secondary_rate_type;
441: l_stmt_num := 23;
442: l_sec_currency_code := bis_common_parameters.get_secondary_currency_code;
443: l_stmt_num:=24;
444: l_start_date := bis_common_parameters.get_global_start_date;
445:
446: -- If no global currency code was defined
447: -- do not try reporting missing secondary currency conversion rates
448: