DBA Data[Home] [Help]

APPS.AMS_ACTMETRICS_ENGINE_PVT dependencies on AMS_METRICS_ALL_B

Line 630: FROM ams_act_metrics_all a, ams_metrics_all_b b

626: metric_calculation_type ,
627: accrual_type ,
628: compute_using_function ,
629: default_uom_code, display_type
630: FROM ams_act_metrics_all a, ams_metrics_all_b b
631: WHERE arc_act_metric_used_by IN
632: (select lookup_code from ams_lookups
633: where lookup_type in ('AMS_METRIC_OBJECT_TYPE', 'AMS_METRIC_ROLLUP_TYPE'))
634: -- Replaced with metadata lookups above.

Line 666: FROM ams_act_metrics_all a, ams_metrics_all_b b

662: metric_calculation_type ,
663: accrual_type ,
664: compute_using_function ,
665: default_uom_code, display_type
666: FROM ams_act_metrics_all a, ams_metrics_all_b b
667: WHERE dirty_flag = G_IS_DIRTY
668: AND a.metric_id = b.metric_id
669: AND b.metric_calculation_type = l_calc_type
670: AND a.arc_act_metric_used_by = l_object_type

Line 705: FROM ams_act_metrics_all a, ams_metrics_all_b b

701: metric_calculation_type ,
702: accrual_type ,
703: compute_using_function ,
704: default_uom_code, display_type
705: FROM ams_act_metrics_all a, ams_metrics_all_b b
706: WHERE activity_metric_id = l_parent_act_metric_id
707: AND a.metric_id = b.metric_id;
708:
709: l_act_metric_rec act_met_ref_rec_type;--c_act_metric_rec%ROWTYPE;

Line 1680: from ams_act_metrics_all a, ams_metrics_all_b m,

1676: /* update ams_act_metrics_all
1677: set dirty_flag = G_IS_DIRTY
1678: where activity_metric_id in
1679: (select a.activity_metric_id
1680: from ams_act_metrics_all a, ams_metrics_all_b m,
1681: ams_metric_formulas f, ams_act_metrics_all b, ams_metrics_all_b c
1682: where a.metric_id = m.metric_id
1683: and m.metric_id = f.metric_id
1684: and b.metric_id = c.metric_id

Line 1681: ams_metric_formulas f, ams_act_metrics_all b, ams_metrics_all_b c

1677: set dirty_flag = G_IS_DIRTY
1678: where activity_metric_id in
1679: (select a.activity_metric_id
1680: from ams_act_metrics_all a, ams_metrics_all_b m,
1681: ams_metric_formulas f, ams_act_metrics_all b, ams_metrics_all_b c
1682: where a.metric_id = m.metric_id
1683: and m.metric_id = f.metric_id
1684: and b.metric_id = c.metric_id
1685: and a.arc_act_metric_used_by = b.arc_act_metric_used_by

Line 1696: from ams_act_metrics_all a, ams_metrics_all_b m,

1692: update ams_act_metrics_all
1693: set dirty_flag = G_IS_DIRTY
1694: where activity_metric_id in
1695: (select a.activity_metric_id
1696: from ams_act_metrics_all a, ams_metrics_all_b m,
1697: ams_metric_formulas f, ams_act_metrics_all b, ams_metrics_all_b c
1698: where a.metric_id = m.metric_id
1699: and m.metric_id = f.metric_id
1700: and b.metric_id = c.metric_id

Line 1697: ams_metric_formulas f, ams_act_metrics_all b, ams_metrics_all_b c

1693: set dirty_flag = G_IS_DIRTY
1694: where activity_metric_id in
1695: (select a.activity_metric_id
1696: from ams_act_metrics_all a, ams_metrics_all_b m,
1697: ams_metric_formulas f, ams_act_metrics_all b, ams_metrics_all_b c
1698: where a.metric_id = m.metric_id
1699: and m.metric_id = f.metric_id
1700: and b.metric_id = c.metric_id
1701: and a.arc_act_metric_used_by = b.arc_act_metric_used_by

Line 1705: from ams_metric_formulas f1, ams_metrics_all_b c1

1701: and a.arc_act_metric_used_by = b.arc_act_metric_used_by
1702: and a.act_metric_used_by_id = b.act_metric_used_by_id
1703: and m.metric_calculation_type = G_FORMULA
1704: and ((b.metric_id in (select decode(c1.summary_metric_id, NULL, f1.source_id,c1.summary_metric_id)
1705: from ams_metric_formulas f1, ams_metrics_all_b c1
1706: where c1.metric_id=f1.source_id) and f.source_type = G_METRIC)
1707: or (c.metric_category = f.source_id and f.source_type = G_CATEGORY))
1708: and b.activity_metric_id = l_act_met_id (l_count));
1709:

Line 2281: FROM ams_metrics_all_b a, ams_act_metrics_all b

2277: CURSOR c_act_metrics_parents IS
2278: SELECT --/*+ first_rows */
2279: a.metric_parent_id, b.activity_metric_id, b.act_metric_used_by_id,
2280: b.arc_act_metric_used_by
2281: FROM ams_metrics_all_b a, ams_act_metrics_all b
2282: WHERE a.metric_parent_id IS NOT NULL
2283: AND b.rollup_to_metric IS NULL
2284: AND a.metric_id = b.metric_id;
2285: --AND a.arc_metric_used_for_object = b.arc_act_metric_used_by;

Line 2292: FROM ams_metrics_all_b a, ams_act_metrics_all b

2288: CURSOR c_act_metrics_parents_by_obj(p_object_type varchar2, p_object_id NUMBER) IS
2289: SELECT /*+ first_rows */
2290: a.metric_parent_id, b.activity_metric_id, b.act_metric_used_by_id,
2291: b.arc_act_metric_used_by
2292: FROM ams_metrics_all_b a, ams_act_metrics_all b
2293: WHERE a.metric_parent_id IS NOT NULL
2294: AND b.rollup_to_metric IS NULL
2295: AND a.metric_id = b.metric_id
2296: AND b.arc_act_metric_used_by = p_object_type

Line 2585: FROM ams_metrics_all_b

2581:
2582: --find parent metric_id
2583: CURSOR c_parent_metric_id (l_metric_id NUMBER) IS
2584: SELECT metric_parent_id
2585: FROM ams_metrics_all_b
2586: WHERE metric_id = l_metric_id;
2587: /**
2588: --check for the parent campaign
2589: CURSOR c_check_parent_campaign(l_act_metric_used_by_id NUMBER) IS

Line 2968: TYPE t_procedures IS TABLE OF ams_metrics_all_b.function_name%TYPE;

2964: l_msg_count NUMBER;
2965: l_msg_data VARCHAR2(4000);
2966: cntr NUMBER := 1;
2967: l_dummy_result NUMBER;
2968: TYPE t_procedures IS TABLE OF ams_metrics_all_b.function_name%TYPE;
2969:
2970: l_function_list t_procedures;
2971: l_function_name ams_metrics_all_b.function_name%TYPE;
2972:

Line 2971: l_function_name ams_metrics_all_b.function_name%TYPE;

2967: l_dummy_result NUMBER;
2968: TYPE t_procedures IS TABLE OF ams_metrics_all_b.function_name%TYPE;
2969:
2970: l_function_list t_procedures;
2971: l_function_name ams_metrics_all_b.function_name%TYPE;
2972:
2973: --All functions
2974: CURSOR c_functions IS
2975: SELECT /*+ first_rows */ activity_metric_id,

Line 2982: FROM ams_metrics_all_b a, ams_act_metrics_all b,

2978: last_calculated_date,
2979: metric_category,
2980: TRANSACTION_CURRENCY_CODE,
2981: functional_currency_code
2982: FROM ams_metrics_all_b a, ams_act_metrics_all b,
2983: ams_lookups lkup
2984: WHERE a.metric_id = b.metric_id
2985: -- BUG4924982: Performance, join to metric definition.
2986: AND a.arc_metric_used_for_object = lkup.lookup_code

Line 3000: FROM ams_metrics_all_b a, ams_act_metrics_all b

2996: last_calculated_date,
2997: metric_category,
2998: TRANSACTION_CURRENCY_CODE,
2999: functional_currency_code
3000: FROM ams_metrics_all_b a, ams_act_metrics_all b
3001: WHERE a.metric_id = b.metric_id
3002: AND b.arc_act_metric_used_by = l_object_type
3003: AND b.act_metric_used_by_id = l_object_id
3004: AND a.metric_calculation_type = G_FUNCTION

Line 3009: FROM ams_metrics_all_b

3005: AND a.function_type = G_IS_FUNCTION;
3006:
3007: CURSOR c_met_procedures IS
3008: SELECT DISTINCT function_name
3009: FROM ams_metrics_all_b
3010: WHERE arc_metric_used_for_object IN
3011: (select lookup_code from ams_lookups
3012: where lookup_type = 'AMS_METRIC_OBJECT_TYPE')
3013: -- Replaced with metadata lookups above.

Line 3024: FROM ams_act_metrics_all a, ams_metrics_all_b b

3020:
3021: CURSOR c_has_procedure(l_function_name varchar2,
3022: l_obj_type varchar2, l_obj_id number) IS
3023: SELECT count(1)
3024: FROM ams_act_metrics_all a, ams_metrics_all_b b
3025: WHERE a.metric_id = b.metric_id
3026: AND b.function_name = l_function_name
3027: AND a.arc_act_metric_used_by = l_obj_type
3028: AND a.act_metric_used_by_id = l_obj_id

Line 3490: FROM ams_metrics_all_b

3486: IS
3487: CURSOR c_sum_metrics(l_metric_id IN NUMBER,
3488: l_arc_act_metric_used_by VARCHAR2) IS
3489: SELECT metric_id
3490: FROM ams_metrics_all_b
3491: WHERE arc_metric_used_for_object = l_arc_act_metric_used_by
3492: START WITH metric_id = l_metric_id
3493: CONNECT BY PRIOR summary_metric_id = metric_id
3494: ORDER BY LEVEL DESC ;

Line 3502: FROM ams_act_metrics_all act,ams_metrics_all_b met

3498: l_arc_act_metric_used_by VARCHAR2,
3499: l_act_metric_used_by_id NUMBER) IS
3500: SELECT act.activity_metric_id activity_metric_id,
3501: met.metric_id metric_id
3502: FROM ams_act_metrics_all act,ams_metrics_all_b met
3503: WHERE met.metric_id = act.metric_id
3504: AND act.arc_act_metric_used_by = l_arc_act_metric_used_by
3505: AND act.act_metric_used_by_id = l_act_metric_used_by_id
3506: AND met.metric_category = l_metric_category ;

Line 3791: FROM ams_act_metrics_all a, ams_metrics_all_b b, ams_act_metrics_all c

3787: a.dirty_flag,
3788: sum(c.trans_actual_value) actual_multiplier,
3789: sum(c.trans_forecasted_value) forecast_multiplier,
3790: max(c.last_update_date) last_update_date
3791: FROM ams_act_metrics_all a, ams_metrics_all_b b, ams_act_metrics_all c
3792: WHERE a.metric_id = b.metric_id
3793: AND b.accrual_type = G_VARIABLE
3794: AND a.arc_act_metric_used_by = c.arc_act_metric_used_by(+)
3795: AND a.act_metric_used_by_id = c.act_metric_used_by_id(+)

Line 3835: FROM ams_act_metrics_all a, ams_metrics_all_b b, ams_act_metrics_all c

3831: a.dirty_flag,
3832: sum(c.trans_actual_value) actual_multiplier,
3833: sum(c.trans_forecasted_value) forecast_multiplier,
3834: max(c.last_update_date) last_update_date
3835: FROM ams_act_metrics_all a, ams_metrics_all_b b, ams_act_metrics_all c
3836: WHERE a.metric_id = b.metric_id
3837: AND b.accrual_type = G_VARIABLE
3838: AND a.arc_act_metric_used_by = l_obj_type
3839: AND a.act_metric_used_by_id = l_obj_id

Line 5976: from ams_act_metrics_all a, ams_metrics_all_b b

5972: return act_metric_formula_type is
5973: select a.activity_metric_id, a.metric_id ,
5974: a.arc_act_metric_used_by, a.act_metric_used_by_id,
5975: a.last_calculated_date, b.display_type
5976: from ams_act_metrics_all a, ams_metrics_all_b b
5977: where a.metric_id = b.metric_id
5978: and b.metric_calculation_type = G_FORMULA
5979: --and a.dirty_flag = G_IS_DIRTY
5980: order by a.metric_id;

Line 5987: from ams_act_metrics_all a, ams_metrics_all_b b

5983: return act_metric_formula_type is
5984: select a.activity_metric_id, a.metric_id,
5985: a.arc_act_metric_used_by, a.act_metric_used_by_id,
5986: a.last_calculated_date, b.display_type
5987: from ams_act_metrics_all a, ams_metrics_all_b b
5988: where a.metric_id = b.metric_id
5989: and b.metric_calculation_type = G_FORMULA
5990: --and a.dirty_flag = G_IS_DIRTY
5991: and a.arc_act_metric_used_by = p_object_type

Line 6026: from ams_act_metrics_all a, ams_metrics_all_b b

6022: group by functional_currency_code;
6023:
6024: cursor c_get_values_by_category(p_category_id number, p_object_type VARCHAR2, p_object_id NUMBER) is
6025: select sum(func_forecasted_value), sum(func_actual_value), functional_currency_code
6026: from ams_act_metrics_all a, ams_metrics_all_b b
6027: where a.metric_id = b.metric_id
6028: and b.metric_category = p_category_id
6029: and a.arc_act_metric_used_by = p_object_type
6030: and a.act_metric_used_by_id = p_object_id

Line 6035: from ams_act_metrics_all a, ams_metrics_all_b b

6031: group by functional_currency_code;
6032:
6033: cursor c_get_values_by_category_only(p_category_id number, p_object_type VARCHAR2, p_object_id NUMBER) is
6034: select sum(func_forecasted_value), sum(func_actual_value), functional_currency_code
6035: from ams_act_metrics_all a, ams_metrics_all_b b
6036: where a.metric_id = b.metric_id
6037: and b.metric_category = p_category_id
6038: and b.metric_sub_category is null
6039: and a.arc_act_metric_used_by = p_object_type

Line 6045: from ams_act_metrics_all a, ams_metrics_all_b b

6041: group by functional_currency_code;
6042:
6043: cursor c_get_values_by_sub_category(p_category_id number, p_sub_category_id number, p_object_type VARCHAR2, p_object_id NUMBER) is
6044: select sum(func_forecasted_value), sum(func_actual_value), functional_currency_code
6045: from ams_act_metrics_all a, ams_metrics_all_b b
6046: where a.metric_id = b.metric_id
6047: and b.metric_category = p_category_id
6048: and b.metric_sub_category = p_sub_category_id
6049: and a.arc_act_metric_used_by = p_object_type

Line 6591: from ams_act_metrics_all h1, ams_metrics_all_b met

6587: sum(decode(met.denorm_code,'METRIC_21',h1.func_forecasted_value,0)) invoiced_roi_forecast,
6588: sum(decode(met.denorm_code,'METRIC_22',h1.func_forecasted_value,0)) responses_forecast,
6589: sum(decode(met.denorm_code,'METRIC_23',h1.func_forecasted_value,0)) contact_group_size_forecast,
6590: sum(decode(met.denorm_code,'METRIC_24',h1.func_forecasted_value,0)) target_group_size_forecast
6591: from ams_act_metrics_all h1, ams_metrics_all_b met
6592: where h1.metric_id = met.metric_id
6593: and met.denorm_code in
6594: (
6595: 'METRIC_01'

Line 6748: from ams_act_metrics_all h1, ams_metrics_all_b met

6744: sum(decode(met.denorm_code,'METRIC_21',h1.func_forecasted_value,0)) invoiced_roi_forecast,
6745: sum(decode(met.denorm_code,'METRIC_22',h1.func_forecasted_value,0)) responses_forecast,
6746: sum(decode(met.denorm_code,'METRIC_23',h1.func_forecasted_value,0)) contact_group_size_forecast,
6747: sum(decode(met.denorm_code,'METRIC_24',h1.func_forecasted_value,0)) target_group_size_forecast
6748: from ams_act_metrics_all h1, ams_metrics_all_b met
6749: where h1.metric_id = met.metric_id
6750: and met.denorm_code in
6751: (
6752: 'METRIC_01'

Line 6780: and exists (select 1 from ams_act_metrics_all amet, ams_metrics_all_b met

6776: and h1.arc_act_metric_used_by(+) = a.object_type
6777: and h1.act_metric_used_by_id(+) = a.object_id
6778: )
6779: where a.last_update_date > l_calc_since
6780: and exists (select 1 from ams_act_metrics_all amet, ams_metrics_all_b met
6781: where amet.last_update_date > a.last_update_date
6782: and amet.metric_id = met.metric_id
6783: and met.denorm_code is not null
6784: and amet.arc_act_metric_used_by = a.object_type

Line 6866: from ams_act_metrics_all h1, ams_metrics_all_b met

6862: sum(decode(met.denorm_code,'METRIC_21',h1.func_forecasted_value,0)) invoiced_roi_forecast,
6863: sum(decode(met.denorm_code,'METRIC_22',h1.func_forecasted_value,0)) responses_forecast,
6864: sum(decode(met.denorm_code,'METRIC_23',h1.func_forecasted_value,0)) contact_group_size_forecast,
6865: sum(decode(met.denorm_code,'METRIC_24',h1.func_forecasted_value,0)) target_group_size_forecast
6866: from ams_act_metrics_all h1, ams_metrics_all_b met
6867: where h1.metric_id = met.metric_id
6868: and met.denorm_code in
6869: (
6870: 'METRIC_01'