DBA Data[Home] [Help]

PACKAGE BODY: APPS.EDW_COLLECTION_HOOK

Source


1 package body EDW_COLLECTION_HOOK AS
2 /*$Header: EDWPCOLB.pls 115.25 2003/02/20 02:38:48 arsantha ship $*/
3 
4 function pre_dimension_coll(p_object_name varchar2) return boolean IS
5 begin
6   if p_object_name = 'EDW_TIME_M' then
7     return FII_TIME_HOOK.Pre_Dim_Collect;
8   elsif p_object_name = 'EDW_PROJECT_M' then
9     return FII_PROJECT_HOOK.pre_dimension_coll;
10   end if;
11 return true;
12 Exception when others then
13  return false;
14 end;
15 
16 function post_dimension_coll(p_object_name varchar2) return boolean  is
17 begin
18 
19 	if p_object_name = 'EDW_MTL_UOM_M' then
20 		OPI_UOM_WH_PUSH_PKG.pushToSource(p_object_name);
21         elsif p_object_name = 'EDW_DUNS_M' then
22                 return EDW_POA_DUNS_HOOK.Post_Dim_Collect(p_object_name);
23         elsif p_object_name = 'EDW_UNSPSC_M' then
24                 return EDW_POA_UNSPSC_HOOK.Post_Dim_Collect(p_object_name);
25         elsif p_object_name = 'EDW_SIC_CODE_M' then
26                 return EDW_SICM_SIC_HOOK.Post_Dim_Collect(p_object_name);
27         end if;
28  return true;
29 Exception when others then
30  return false;
31 end;
32 
33 function pre_fact_coll(p_object_name varchar2) return boolean  is
34 begin
35         if p_object_name = 'POA_EDW_ALINES_F' then
36                 return EDW_POA_ALINES_HOOK.Pre_Fact_Collect(p_object_name);
37         elsif p_object_name = 'POA_EDW_CSTM_MSR_F' then
38                 return EDW_POA_CSTM_MSR_HOOK.Pre_Fact_Collect(p_object_name);
39         elsif p_object_name = 'POA_EDW_CONTRACT_F' then
40                 return EDW_POA_CONTRACT_HOOK.Pre_Fact_Collect(p_object_name);
41         elsif p_object_name = 'POA_EDW_PO_DIST_F' then
42                 return EDW_POA_DIST_HOOK.Pre_Fact_Collect(p_object_name);
43         elsif p_object_name = 'POA_EDW_RCV_TXNS_F' then
44                 return EDW_POA_RCV_TXNS_HOOK.Pre_Fact_Collect(p_object_name);
45         elsif p_object_name = 'POA_EDW_SUP_PERF_F' then
46                 return EDW_POA_SUP_PERF_HOOK.Pre_Fact_Collect(p_object_name);
47         elsif p_object_name = 'FII_AP_HOLD_DATA_F' then
48                 return EDW_SICM_HOLD_DATA_HOOK.Pre_Fact_Collect(p_object_name);
49         elsif p_object_name = 'FII_AP_INV_ON_HOLD_F' then
50                 return EDW_SICM_INV_ON_HOLD_HOOK.Pre_Fact_Collect(p_object_name);
51         elsif p_object_name = 'FII_AP_INV_LINES_F' then
52                 return EDW_SICM_INV_LINES_HOOK.Pre_Fact_Collect(p_object_name);
53         elsif p_object_name = 'FII_AP_INV_PAYMTS_F' then
54                 return EDW_SICM_INV_PAYMTS_HOOK.Pre_Fact_Collect(p_object_name);
55         elsif p_object_name = 'FII_AP_SCH_PAYMTS_F' then
56                 return EDW_SICM_SCH_PAYMTS_HOOK.Pre_Fact_Collect(p_object_name);
57         elsif p_object_name = 'FII_PA_COST_F' then
58                 return FII_PA_COST_HOOK.Pre_Fact_Coll;
59         elsif p_object_name = 'FII_PA_REVENUE_F' then
60                 return FII_PA_REVENUE_HOOK.Pre_Fact_Coll;
61         elsif p_object_name = 'FII_PA_BUDGET_F' then
62                 return FII_PA_BUDGET_HOOK.Pre_Fact_Coll;
63         elsif p_object_name = 'ISC_EDW_SUPPLIES_F' then
64                 return ISC_EDW_SUPPLIES_HOOK.Pre_Fact_Coll;
65         elsif p_object_name = 'ISC_EDW_DEMANDS_F' then
66                 return ISC_EDW_DEMANDS_HOOK.Pre_Fact_Coll;
67         elsif p_object_name = 'ISC_EDW_FORECAST_F' then
68                 return ISC_EDW_FORECAST_HOOK.Pre_Fact_Coll;
69         end if;
70   return true;
71 Exception when others then
72  return false;
73 end;
74 
75 function post_fact_coll(p_object_name varchar2) return boolean  is
76 begin
77 	if p_object_name = 'OPI_EDW_UOM_CONV_F' then
78 		OPI_UOM_WH_PUSH_PKG.pushToSource(p_object_name);
79       end if;
80 	if p_object_name = 'FII_AR_TRX_DIST_F' then
81 		OPI_COLLECTION_HOOK_P.POST_REVENUE_COLL;
82       end if;
83 	if p_object_name = 'OPI_EDW_COGS_F' then
84 		OPI_COLLECTION_HOOK_P.POST_COGS_COLL;
85       end if;
86       if p_object_name = 'OPI_EDW_MARGIN_F' THEN
87         OPI_COLLECTION_HOOK_P.POST_MARGIN_COLL(p_object_name);
88       end if;
89      if p_object_name = 'OPI_EDW_INV_PERD_STAT_F' then
90        OPI_COLLECTION_HOOK_P.POST_IPS_COLL(p_object_name);
91      end if;
92      if p_object_name = 'ISC_EDW_BOOKINGS_F' then
93        ISC_EDW_BOOK_DEL_HOOK.POST_FACT_COLL;
94      end if;
95 
96  return true;
97 Exception when others then
98  return false;
99 end;
100 
101 
102 function pre_mapping_coll(p_object_name varchar2) return boolean  is
103 begin
104 
105 
106  IF (NOT  edw_update_attributes.update_stg(p_object_name, 'LOAD')) THEN
107 	return false;
108  END IF;
109 
110  return true;
111 Exception when others then
112  return false;
113 end;
114 
115 function post_mapping_coll(p_object_name varchar2) return boolean  is
116 begin
117  return true;
118 Exception when others then
119  return false;
120 end;
121 
122 function pre_derived_fact_coll(p_object_name varchar2) return boolean  is
123 begin
124  return true;
125 Exception when others then
126  return false;
127 end;
128 
129 function post_derived_fact_coll(p_object_name varchar2) return boolean  is
130 begin
131   if p_object_name = 'OPI_EDW_INV_PERD_STAT_F' then
132     OPI_COLLECTION_HOOK_P.POST_IPS_COLL(p_object_name);
133   end if;
134  return true;
135 Exception when others then
136  return false;
137 end;
138 
139 
140 /*******************************************************
141 The below procedures namely pre_coll and post_coll are only used with
142 workflow for now...
143 ********************************************************/
144 function pre_coll(p_object_name varchar2) return boolean is
145 begin
146  return true;
147 Exception when others then
148  return false;
149 end;
150 
151 
152 function post_coll(p_object_name varchar2) return boolean is
153 begin
154   if p_object_name in ('OPI_EDW_COGS_F','FII_AR_TRX_DIST_F') then
155 	OPI_COLLECTION_HOOK_P.POST_MARGIN_COLL(p_object_name);
156   end if;
157  return true;
158 Exception when others then
159  return false;
160 end;
161 /**************************************************************/
162 
163 
164 END EDW_COLLECTION_HOOK;